* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        #07111f;

    color:
        #ffffff;
}

.container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    font-size: 32px;
}

.header p {
    margin: 5px 0 0;
    opacity: 0.65;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 11px 15px;
    cursor: pointer;
    background: #ffffff;
    color: #07111f;
    font-weight: bold;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


.location-card,
.date-card,
.next-card,
.prayers,
.qibla-card,
.adhan-card {
    background: #101d2d;
    border-radius: 18px;
    margin-bottom: 16px;
}


/* =========================================================
   GPS
   ========================================================= */

.location-card {
    display: flex;
    gap: 15px;
    padding: 18px;
    align-items: center;
}

.location-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #1c3149;

    font-size: 11px;
    font-weight: bold;
}

.location-name {
    font-size: 18px;
    font-weight: bold;
}

.coordinates {
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.55;
}

.gps-status {
    margin-top: 6px;
    font-size: 12px;
}

.gps-status.success,
.gps-status.error,
.gps-status.loading {
    opacity: 0.8;
}


/* =========================================================
   DATES
   ========================================================= */

.date-card {
    padding: 15px;
    text-align: center;
}

#gregorianDate {
    font-size: 17px;
    font-weight: bold;
}

#hijriDate {
    margin-top: 6px;
    opacity: 0.7;
}


/* =========================================================
   PROCHAINE PRIERE
   ========================================================= */

.next-card {
    padding: 25px;
    text-align: center;
}

.next-label {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.55;
}

.arabic {
    margin-top: 15px;
    font-size: 28px;
}

.next-name {
    margin-top: 5px;
    font-size: 20px;
}

.next-time {
    margin-top: 10px;
    font-size: 38px;
    font-weight: bold;
}

.countdown {
    margin-top: 8px;
    font-family: monospace;
    font-size: 20px;
    opacity: 0.75;
}


/* =========================================================
   HORAIRES
   ========================================================= */

.prayers {
    overflow: hidden;
}

.prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px;

    border-bottom:
        1px solid rgba(255,255,255,0.06);

    position: relative;
}

.prayer-row:last-child {
    border-bottom: 0;
}

.prayer-row strong {
    display: block;
    font-size: 16px;
}

.prayer-row span {
    display: block;
    margin-top: 4px;
    opacity: 0.5;
    font-size: 13px;
}

.prayer-time {
    font-size: 22px;
    font-weight: bold;
}

.prayer-row.active {
    background:
        rgba(255,255,255,0.08);
}


/* =========================================================
   CASES DE PRIERE
   ========================================================= */

.prayer-check {
    margin-left: 15px;

    display: flex;
    align-items: center;

    cursor: pointer;
}

.prayer-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.prayer-checkmark {
    width: 23px;
    height: 23px;

    border:
        2px solid rgba(255,255,255,0.35);

    border-radius: 7px;

    display: block;

    position: relative;
}

.prayer-check input:checked
+ .prayer-checkmark {

    background: #ffffff;
    border-color: #ffffff;
}

.prayer-check input:checked
+ .prayer-checkmark::after {

    content: "";

    position: absolute;

    width: 6px;
    height: 11px;

    border-right:
        3px solid #07111f;

    border-bottom:
        3px solid #07111f;

    transform:
        rotate(45deg);

    left: 6px;
    top: 2px;
}

.prayer-row.prayer-completed {
    opacity: 0.65;
}


/* =========================================================
   QIBLA
   ========================================================= */

.qibla-card {
    padding: 22px;
    text-align: center;
}

.qibla-title {
    font-size: 20px;
    font-weight: bold;
}

.qibla-status {
    margin-top: 8px;

    min-height: 18px;

    font-size: 13px;

    opacity: 0.7;
}

.qibla-compass {
    position: relative;

    width: 230px;
    height: 230px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 25px auto;
}

.compass-ring {
    position: relative;

    width: 230px;
    height: 230px;

    border-radius: 50%;

    border:
        4px solid rgba(255,255,255,0.25);

    background: #07111f;

    box-shadow:
        inset 0 0 25px rgba(0,0,0,0.5),
        0 5px 20px rgba(0,0,0,0.3);
}


/* croix centrale */

.compass-ring::before {

    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    width: 2px;
    height: 88%;

    background:
        rgba(255,255,255,0.08);

    transform:
        translate(-50%, -50%);
}

.compass-ring::after {

    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    width: 88%;
    height: 2px;

    background:
        rgba(255,255,255,0.08);

    transform:
        translate(-50%, -50%);
}


.compass-direction {

    position: absolute;

    z-index: 2;

    font-weight: bold;
    font-size: 15px;
}

.compass-direction.north {

    top: 12px;
    left: 50%;

    transform:
        translateX(-50%);
}

.compass-direction.east {

    right: 14px;
    top: 50%;

    transform:
        translateY(-50%);
}

.compass-direction.south {

    bottom: 12px;
    left: 50%;

    transform:
        translateX(-50%);
}

.compass-direction.west {

    left: 14px;
    top: 50%;

    transform:
        translateY(-50%);
}


/* aiguille Qibla */

.qibla-needle {

    position: absolute;

    z-index: 3;

    left: 50%;
    top: 50%;

    width: 74px;
    height: 74px;

    transform:
        translate(-50%, -50%);

    display: flex;

    justify-content: center;
    align-items: center;

    font-size: 34px;

    filter:
        drop-shadow(
            0 3px 5px rgba(0,0,0,0.5)
        );

    transition:
        transform 0.12s linear;
}


.qibla-angle {

    font-size: 30px;
    font-weight: bold;

    margin-top: 5px;
}

.qibla-instruction {

    margin-top: 8px;

    font-size: 13px;

    opacity: 0.65;
}

.qibla-button {

    width: 100%;

    margin-top: 18px;
}


/* =========================================================
   ADHAN
   ========================================================= */

.adhan-card {
    padding: 20px;
}

.adhan-card h2 {
    margin-top: 0;
}

.switch-line {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 10px 0;
}

.switch-line input {

    width: 20px;
    height: 20px;
}

.test-button {

    width: 100%;

    margin-top: 10px;
}

.adhan-status {

    margin-top: 12px;

    font-size: 13px;

    opacity: 0.65;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {

    text-align: center;

    padding: 20px;

    font-size: 12px;

    opacity: 0.45;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .container {
        padding: 12px;
    }

    .header h1 {
        font-size: 27px;
    }

    .next-time {
        font-size: 34px;
    }

    .compass-ring {
        width: 210px;
        height: 210px;
    }

}

.home-btn {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 18px;
    border-radius: 12px;
    background: #2196F3;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}
