/* ============================================================
   DESIGN TOKENS
   Central place for theme colors — update here, applies everywhere.
   ============================================================ */
:root {
    --color-accent:        #f4d571;
    --color-accent-dark:   #e0c45c;
    --color-green-deep:    #1a4d2e;
    --color-green-text:    #0f2818;
    --color-ramadan:       #8b6914;
    --color-ramadan-dark:  #6b5016;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100vh;
    font-family: 'Source Sans 3', sans-serif;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    background: url('../assets/images/bg-green-mobile.jpg') bottom left / auto 100% repeat-x fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 1;
}

body .container {
    position: relative;
    z-index: 10;
}

/* Ramadan Theme - Golden Light with Background Image */
body.ramadan-mode {
    background: url('../assets/images/bg-ramadan.jpg') center center / cover no-repeat fixed;
    color: #3a3939;
}

body.ramadan-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

body.ramadan-mode .container {
    position: relative;
    z-index: 10;
}

body.ramadan-mode .bismillah {
    color: #6b5016;
    text-shadow: none;
}

body.ramadan-mode .current-time {
    color: #8b6914;
    text-shadow: none;
}

body.ramadan-mode .athan-button {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
    font-weight: 600;
}

body.ramadan-mode .settings-button {
    background: #ffffff;
    border: 1px solid #d4a54a;
    color: #6b5016;
    font-weight: 600;
}

body.ramadan-mode .gregorian-date,
body.ramadan-mode .hijri-date {
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(107, 80, 22, 0.4);
    color: #6b5016;
    font-weight: 500;
    text-shadow: none;
}

body.ramadan-mode .next-prayer-section {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(139, 105, 20, 0.4);
}

body.ramadan-mode .next-prayer-info-label,
body.ramadan-mode .next-prayer-time-label,
body.ramadan-mode .countdown-label {
    color: #6b5016;
    font-weight: 500;
    text-shadow: none;
}

body.ramadan-mode .next-prayer-name {
    color: #8b6914;
    font-weight: 700;
    text-shadow: none;
}

body.ramadan-mode .next-prayer-time {
    color: #6b5016;
    font-weight: 700;
    text-shadow: none;
}

body.ramadan-mode .countdown {
    color: #8b6914;
    font-weight: 600;
    text-shadow: none;
}

body.ramadan-mode .prayer-card {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(139, 105, 20, 0.3);
}

body.ramadan-mode .prayer-card.active {
    background: rgba(255, 255, 255, 0.95);
    border-color: #8b6914;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.3);
}

body.ramadan-mode .prayer-card .prayer-label {
    color: #6b5016;
    font-weight: 600;
    text-shadow: none;
}

body.ramadan-mode .prayer-name {
    color: #6b5016;
    font-weight: 700;
    text-shadow: none;
}

body.ramadan-mode .prayer-time {
    color: #8b6914;
    font-weight: 600;
    text-shadow: none;
}

body.ramadan-mode .ramadan-banner {
    background: rgba(139, 105, 20, 0.15);
    color: #6b5016;
    border: 2px solid rgba(107, 80, 22, 0.4);
}

body.ramadan-mode .ramadan-time-box {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(139, 105, 20, 0.4);
}

body.ramadan-mode .prayer-card.ramadan-special {
    background: rgba(255, 255, 255, 0.95);
    border-color: #8b6914;
    border-width: 3px;
    box-shadow: 0 0 20px rgba(139, 105, 20, 0.3);
}

/* ==================== KIDS THEME ==================== */
body.kids-mode {
    background: #FFF8DC;
    background-image: url('../assets/images/bg-kids.jpg');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    font-family: 'Source Sans 3', sans-serif;
    color: #131313;
}

body.kids-mode::before {
    background: rgba(0, 0, 0, 0.2);
}

body.kids-mode .header {
    background: transparent;
    padding: 15px 20px;
    margin-bottom: 15px;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
}

body.kids-mode .header-left {
    margin-bottom: 0;
    text-align: left;
}

body.kids-mode .bismillah {
    color: #00CED1;
    text-shadow:
        3px 3px 0px #FFF,
        -2px -2px 0px #FFF,
        2px -2px 0px #FFF,
        -2px 2px 0px #FFF,
        0 0 10px rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

body.kids-mode .current-time {
    color: #FF1493;
    text-shadow:
        4px 4px 0px #FFF,
        -3px -3px 0px #FFF,
        3px -3px 0px #FFF,
        -3px 3px 0px #FFF,
        0 0 15px rgba(255, 255, 255, 0.9);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 900;
    font-size: 56px;
    letter-spacing: 3px;
}

body.kids-mode .athan-button-container {
    margin-bottom: 10px;
}

body.kids-mode .athan-button {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    color: #FFF;
    font-weight: 800;
    border: 3px solid #FFF;
    font-size: 15px;
    border-radius: 25px;
    padding: 12px 28px;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.5);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

body.kids-mode .athan-button:hover {
    background: linear-gradient(135deg, #FF1493 0%, #FF69B4 100%);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 25px rgba(255, 20, 147, 0.7);
    border-color: #FFD700;
}

body.kids-mode .date-info {
    justify-content: flex-end;
}

body.kids-mode .date-container {
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

body.kids-mode .gregorian-date,
body.kids-mode .hijri-date {
    background: #FFF;
    border: 3px solid #FF8C00;
    color: #000;
    font-weight: 800;
    text-shadow: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

body.kids-mode .settings-button {
    background: #00CED1;
    border: 3px solid #FFF;
    color: #FFF;
    font-size: 24px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 15px rgba(0, 206, 209, 0.5);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

body.kids-mode .settings-button:hover {
    background: #FFD700;
    color: #000;
    border-color: #FF8C00;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    text-shadow: none;
}

body.kids-mode .next-prayer-section {
    background: #FFD700;
    border: none;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    padding: 20px;
}

body.kids-mode .next-prayer-info-label,
body.kids-mode .next-prayer-time-label,
body.kids-mode .countdown-label {
    color: #000;
    font-weight: 700;
    text-shadow: none;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

body.kids-mode .next-prayer-name,
body.kids-mode .next-prayer-time {
    color: #000;
    font-weight: 900;
    text-shadow: none;
    font-size: 26px;
}

body.kids-mode .countdown {
    color: #000;
    font-weight: 700;
    text-shadow: none;
    font-size: 16px;
}

body.kids-mode .date-navigation-badge {
    background: #FFD700;
    border: none;
    border-radius: 15px;
}

body.kids-mode .date-badge-date {
    color: #000;
    font-weight: 700;
    text-shadow: none;
}

body.kids-mode .back-to-today-button {
    background: #00CED1;
    color: #000;
    border: none;
    font-weight: 700;
}

body.kids-mode .back-to-today-button:hover {
    background: #48D1CC;
    transform: scale(1.05);
}

body.kids-mode .date-nav-button {
    background: #00CED1;
    border: none;
    color: #000;
    font-size: 16px;
    font-weight: 700;
}

body.kids-mode .date-nav-button:hover:not(:disabled) {
    background: #48D1CC;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px rgba(0, 206, 209, 0.4);
}

body.kids-mode .prayer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

body.kids-mode .prayer-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 206, 209, 0.3);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 110px;
}

body.kids-mode .prayer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 206, 209, 0.4);
}

body.kids-mode .prayer-card.active {
    background: #00CED1;
    box-shadow: 0 6px 20px rgba(160, 231, 229, 0.6);
    border-top: 5px solid #f4d571;
}

body.kids-mode .prayer-card.active:before {
    display: none;
}

body.kids-mode .prayer-card.passed {
    opacity: 0.7;
}

body.kids-mode .prayer-card .prayer-label {
    background: transparent;
    color: #000;
    font-weight: 700;
    text-shadow: none;
    border-radius: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

body.kids-mode .prayer-name {
    color: #000;
    font-weight: 700;
    text-shadow: none;
    font-size: 15px;
}

body.kids-mode .prayer-time {
    color: #000;
    font-weight: 900;
    text-shadow: none;
    font-size: 22px;
}

body.kids-mode .ramadan-banner {
    background: #FFD700;
    color: #000;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

body.kids-mode .ramadan-banner h2 {
    color: #000;
    text-shadow: none;
    font-size: 20px;
}

body.kids-mode .ramadan-time-box {
    background: #00CED1;
    border: none;
    border-radius: 15px;
}

body.kids-mode .ramadan-time-box h3 {
    color: #000;
    font-weight: 700;
}

body.kids-mode .ramadan-time-box .time {
    color: #000;
    font-weight: 900;
}

body.kids-mode .ramadan-time-box .note {
    color: #2c2c2c;
}

/* Kids theme modals */
body.kids-mode .prayer-modal-content,
body.kids-mode .prayer-details-content,
body.kids-mode .settings-modal-content {
    background: #FFF;
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

body.kids-mode .prayer-modal h2,
body.kids-mode .prayer-details-content h2,
body.kids-mode .settings-modal-content h2 {
    color: #000;
    text-shadow: none;
}

body.kids-mode .prayer-modal-time,
body.kids-mode .prayer-details-time {
    color: #00CED1;
    font-weight: 900;
    text-shadow: none;
}

body.kids-mode .prayer-modal-button,
body.kids-mode .modal-close {
    background: #00CED1;
    color: #000;
    border: none;
    font-weight: 700;
}

body.kids-mode .settings-save-button {
    background: #00CED1;
    color: #000;
    border: none;
    font-weight: 700;
}

body.kids-mode .settings-cancel-button {
    background: #E0E0E0;
    color: #000;
    border: none;
    font-weight: 600;
}

body.kids-mode .settings-copyright {
    color: #666;
    font-weight: 600;
}

body.kids-mode .settings-copyright a {
    color: #00CED1;
    font-weight: 700;
}

body.kids-mode .form-group label {
    color: #2c2c2c;
    font-weight: 600;
}

body.kids-mode .form-group input,
body.kids-mode .form-group select {
    background: #F5F5F5;
    border: 2px solid #E0E0E0;
    color: #2c2c2c;
    font-weight: 500;
}

body.kids-mode .form-group input:focus,
body.kids-mode .form-group select:focus {
    border-color: #00CED1;
    box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.1);
}

body.kids-mode .preview-athan-button {
    background: #FFD700;
    border: none;
    color: #000;
    font-weight: 700;
}

body.kids-mode .preview-athan-button:hover {
    background: #FFA500;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Islamic Pattern Background */
.pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.03) 35px, rgba(255,255,255,.03) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,.03) 35px, rgba(255,255,255,.03) 70px);
    pointer-events: none;
    z-index: 2;
}

.geometric-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(circle at 25% 25%, rgba(244, 213, 113, 0.2) 2%, transparent 0),
                      radial-gradient(circle at 75% 75%, rgba(244, 213, 113, 0.2) 2%, transparent 0);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 2;
}

.container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 25px;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.header-left {
    flex: 1;
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: 20px;
    color: #f4d571;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.current-time {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
    margin: 0;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.athan-button-container {
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.athan-button {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans 3', sans-serif;
    box-shadow: 0 2px 10px rgba(244, 213, 113, 0.3);
    white-space: nowrap;
}

.athan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.5);
}

.athan-button:active {
    transform: translateY(0);
}

.date-info {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.date-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.settings-button {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(244, 213, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Branding symbol: hidden on mobile, shown on tablet/desktop */
.header-symbol {
    display: none;
}

/* Desktop/Tablet: Position settings button to right of date */
@media (min-width: 481px) {
    .header {
        position: relative;
    }

    .header-symbol {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: rgba(244, 213, 113, 0.12);
        border: 1px solid rgba(244, 213, 113, 0.25);
        border-radius: 14px;
        padding: 10px;
    }

    .header-symbol-img {
        width: 80px;
        height: 80px;
    }

    .guide-button {
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
    }

    .settings-button {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

.settings-button:hover {
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.5);
}

/* Guide button (main app header — links to guide.html) */
.guide-button {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(244, 213, 113, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    border: none;
}

.guide-button .material-icons {
    font-size: 18px;
}

.guide-button:hover {
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.5);
}

/* Mobile bottom nav — hidden on desktop, shown on mobile portrait only */
.mobile-bottom-nav {
    display: none;
}

.gregorian-date, .hijri-date {
    font-size: 14px;
    opacity: 1;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(244, 213, 113, 0.5);
    white-space: nowrap;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Ramadan Banner */
.ramadan-banner {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 8px 0;
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.3);
    flex-shrink: 0;
}

.ramadan-banner h2 {
    font-family: 'Amiri', serif;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

.ramadan-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ramadan-time-box {
    background: rgba(26, 77, 46, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(26, 77, 46, 0.3);
    text-align: center;
}

.ramadan-time-box h3 {
    font-size: 12px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.ramadan-time-box .time {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ramadan-time-box .note {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
}

/* Next Prayer Section */
.next-prayer-section {
    margin: 10px 0;
    padding: 18px 30px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 2px solid rgba(244, 213, 113, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    transition: opacity 0.15s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Slide animations for next prayer section */
.next-prayer-section.slide-out-left {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.next-prayer-section.slide-out-right {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.next-prayer-section.slide-in-left {
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.next-prayer-section.slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.next-prayer-label {
    display: none;
}

.next-prayer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.next-prayer-info-label {
    font-size: 10px;
    color: #f4d571;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.next-prayer-name {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.next-prayer-time-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.next-prayer-time-label {
    font-size: 10px;
    color: #f4d571;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.next-prayer-time {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    color: #f4d571;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.countdown-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.countdown-label {
    font-size: 10px;
    color: #f4d571;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.countdown {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* All prayers complete styling */
.countdown-info.all-complete {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
}

.countdown-info.all-complete .countdown {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Main completion message (h2 style) */
.complete-main {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Sub completion message (h3 style) */
.complete-sub {
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Ramadan mode - all complete message */
body.ramadan-mode .complete-main {
    color: #6b5016;
    text-shadow: none;
}

body.ramadan-mode .complete-sub {
    color: #8b6914;
    opacity: 0.85;
    text-shadow: none;
}

/* Kids mode - all complete message */
body.kids-mode .complete-main {
    color: #000;
    font-weight: 700;
}

body.kids-mode .complete-sub {
    color: #1a1a1a;
    font-weight: 500;
    opacity: 0.8;
}

/* Date Navigation */
.next-prayer-section {
    position: relative;
}

/* 4-column layout when viewing a different date */
.next-prayer-section.viewing-different-date {
    grid-template-columns: repeat(4, 1fr);
}

.date-navigation-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.date-badge-label {
    font-size: 10px;
    color: #f4d571;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

body.ramadan-mode .date-badge-label {
    color: #6b5016;
    font-weight: 500;
}

.date-badge-date {
    font-size: 20px;
    font-weight: 600;
    color: #f4d571;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.ramadan-mode .date-badge-date {
    color: #8b6914;
    font-weight: 700;
    text-shadow: none;
}

.back-to-today-button {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 12px;
    background: rgba(244, 213, 113, 0.3);
    border: 1px solid rgba(244, 213, 113, 0.6);
    border-radius: 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    color: #f4d571;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-today-button:hover {
    background: rgba(244, 213, 113, 0.5);
    border-color: #f4d571;
    transform: scale(1.05);
}

.back-to-today-button:active {
    transform: scale(0.95);
}

body.ramadan-mode .back-to-today-button {
    background: linear-gradient(90deg, #b38f10, #8b6914);
    border-color: #8b6914;
    color: #ffffff;
    font-weight: 700;
    text-shadow: none;
}

body.ramadan-mode .back-to-today-button:hover {
    background: linear-gradient(90deg, #b38f10, #8b6914);
    opacity: 0.9;
    border-color: #8b6914;
}

.next-prayer-time-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.date-nav-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 213, 113, 0.3);
    color: #f4d571;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

/* Desktop/Tablet: Position arrows on next-prayer-section */
@media (min-width: 481px) {
    .date-info {
        position: static;
        padding-right: 100px;
    }

    .date-nav-button {
        position: fixed;
        top: 210px;
        transform: translateY(-50%);
    }

    .date-nav-prev {
        left: 70px; /* 60px sidebar + 20px gap */
    }

    .date-nav-next {
        right: 10px;
    }
}

.date-nav-button:hover:not(:disabled) {
    background: rgba(244, 213, 113, 0.3);
    border-color: #f4d571;
    box-shadow: 0 0 15px rgba(244, 213, 113, 0.4);
}

.date-nav-button:active:not(:disabled) {
    transform: translateY(-50%) scale(0.9);
    background: rgba(244, 213, 113, 0.4);
    box-shadow: 0 0 10px rgba(244, 213, 113, 0.6);
}

.date-nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Visual feedback when button is pressed */
.date-nav-button.pressing {
    transform: scale(0.9);
    background: rgba(244, 213, 113, 0.4);
}

body.ramadan-mode .date-nav-button {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(107, 80, 22, 0.5);
    border-width: 2px;
    color: #6b5016;
}

body.ramadan-mode .date-nav-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.8);
    border-color: #8b6914;
    box-shadow: 0 0 15px rgba(139, 105, 20, 0.4);
}

body.ramadan-mode .date-nav-button:active:not(:disabled) {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(139, 105, 20, 0.6);
}

body.ramadan-mode .date-nav-button.pressing {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.9);
}

/* Prayer Times Grid */
.prayer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 10px 0;
    flex: 1;
    align-content: stretch;
    transition: opacity 0.15s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slide animations for date navigation */
.prayer-grid.slide-out-left {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.prayer-grid.slide-out-right {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.prayer-grid.slide-in-left {
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.prayer-grid.slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prayer-card {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 12px 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90px;
    cursor: pointer;
}

.prayer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 213, 113, 0.3);
}

.prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e0c45c, #8b6914);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.prayer-card:hover::before,
.prayer-card.active::before {
    opacity: 1;
}

.prayer-card.active {
    background: rgba(244, 213, 113, 0.22);
    border-color: #f4d571;
    border-width: 3px;
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.4);
    transform: translateY(-2px);
}

.prayer-card.passed {
    opacity: 0.5;
}

.prayer-card.ramadan-special {
    background: linear-gradient(135deg, rgba(244, 213, 113, 0.25), rgba(224, 196, 92, 0.2));
    border-color: #f4d571;
    box-shadow: 0 0 20px rgba(244, 213, 113, 0.3);
}

.prayer-card.ramadan-special::before {
    opacity: 1;
    height: 6px;
}

.prayer-card.ramadan-special .prayer-name::after {
    content: '🌙';
    margin-left: 8px;
}

.prayer-card .prayer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 4px;
    color: #f4d571;
}

.prayer-card .tomorrow-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(244, 213, 113, 0.3);
    color: #f4d571;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(244, 213, 113, 0.5);
}

body.ramadan-mode .prayer-card .tomorrow-label {
    background: rgba(139, 105, 20, 0.2);
    color: #6b5016;
    border-color: rgba(107, 80, 22, 0.5);
    font-weight: 700;
}

.prayer-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #f4d571;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.prayer-time {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: 'Source Sans 3', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    /* Optimize container for mobile portrait */
    body {
        min-height: 100vh;
        height: auto;
    }

    .container {
        padding: 10px 15px;
        min-height: 100vh;
        height: auto;
    }

    /* Compact header for mobile */
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 8px;
        gap: 10px;
    }

    .header-left {
        margin-bottom: 0;
        text-align: left;
        flex: 1;
    }

    .bismillah {
        font-size: 14px;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .current-time {
        font-size: 28px;
        line-height: 1;
    }

    /* Hide athan button on mobile to save space */
    .athan-button-container {
        display: none;
    }

    /* Compact date/settings area */
    .date-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .date-container {
        flex-direction: column;
        gap: 4px;
        align-items: flex-end;
    }

    .gregorian-date,
    .hijri-date {
        font-size: 10px;
        padding: 4px 8px;
        white-space: nowrap;
    }

    .settings-button {
        font-size: 20px;
        padding: 6px;
        width: 32px;
        height: 32px;
    }

    .guide-button {
        width: 32px;
        height: 32px;
    }

    .guide-button .material-icons {
        font-size: 16px;
    }

    /* Compact Ramadan banner */
    .ramadan-banner h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .ramadan-times {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ramadan-time-box {
        padding: 10px;
    }

    .ramadan-time-box h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .ramadan-time-box .time {
        font-size: 20px;
    }

    .ramadan-time-box .note {
        font-size: 10px;
    }

    /* Compact navigation buttons */
    .date-nav-prev {
        left: 6px;
    }

    .date-nav-next {
        right: 6px;
    }

    .date-nav-button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Compact next prayer section */
    .next-prayer-section {
        padding: 12px 40px;
        margin-bottom: 10px;
        gap: 12px;
    }

    .next-prayer-section,
    .next-prayer-section.viewing-different-date {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
    }

    .next-prayer-info,
    .next-prayer-time-info,
    .countdown-info {
        align-items: center;
        text-align: center;
    }

    .next-prayer-info-label,
    .next-prayer-time-label,
    .countdown-label {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .next-prayer-name,
    .next-prayer-time {
        font-size: 24px;
        line-height: 1.2;
    }

    .countdown {
        font-size: 14px;
        line-height: 1.2;
    }

    /* All prayers complete on mobile */
    .countdown-info.all-complete .countdown {
        font-size: 15px;
        padding: 6px 10px;
        line-height: 1.5;
        gap: 6px;
    }

    .complete-main {
        font-size: 17px;
        font-weight: 600;
    }

    .complete-sub {
        font-size: 14px;
        font-weight: 400;
    }

    /* Compact date badge */
    .date-navigation-badge {
        padding: 8px 12px;
        gap: 6px;
    }

    .date-badge-date {
        font-size: 11px;
    }

    .back-to-today-button {
        font-size: 8px;
        padding: 4px 10px;
        letter-spacing: 0.5px;
    }

    /* Compact prayer grid */
    .prayer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 0;
        flex: 1;
        align-content: stretch;
    }

    .prayer-card {
        padding: 10px 8px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .prayer-label {
        font-size: 9px;
        padding: 3px 8px;
        margin-bottom: 6px;
    }

    .prayer-name {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .prayer-time {
        font-size: 18px;
    }

    /* Adjust modals for mobile */
    .prayer-modal-content,
    .prayer-details-content,
    .settings-modal-content {
        padding: 25px 20px;
        max-width: 90%;
    }

    .prayer-modal h2 {
        font-size: 28px;
    }

    .prayer-modal-time {
        font-size: 20px;
    }
}

/* Extra small screens (portrait phones) */
@media (max-width: 480px) and (orientation: portrait) {
    /* Mobile redesign matching Android app */
    body {
        background: #E8F5E9;
    }

    body.ramadan-mode {
        background: #F5F2E8;
    }

    body.kids-mode {
        background: #F0F8FF;
    }

    .container {
        padding: 12px 16px;
        max-width: 100%;
    }

    /* Header container */
    .header {
        border-radius: 20px;
        padding: 16px;
        margin: 0 0 8px 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .header-left {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        padding: 0;
    }

    .bismillah {
        font-size: 16px;
        font-weight: 500;
        text-align: center;
        color: #37474F;
        flex: 1;
    }

    .current-time {
        display: none;
    }

    .header-left .settings-button,
    .header-left .guide-button {
        display: none;
    }

    /* Date navigation row */
    .date-info {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0;
        margin-top: 10px;
        position: relative;
    }

    .date-nav-button {
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        color: #37474F;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        padding: 0;
        position: absolute;
    }

    .date-nav-button.date-nav-prev {
        left: 0;
    }

    .date-nav-button.date-nav-next {
        right: 0;
    }

    .date-nav-button .material-icons {
        font-size: 28px;
    }

    .date-container {
        text-align: center;
        flex: 1;
    }

    .gregorian-date {
        font-size: 16px;
        font-weight: 600 !important;
        color: #FFFFFF;
        line-height: 1.3;
        background: transparent !important;
        border: none !important;
        display: block !important;
        text-align: center;
    }

    .hijri-date {
        font-size: 14px;
        color: #FFFFFF;
        margin-top: -10px;
        line-height: 1.3;
        background: transparent !important;
        border: none !important;
        display: block !important;
        width: 100%;
        text-align: center;
    }

    .date-navigation-badge {
        display: none !important;
    }

    /* Sundial section - no background */
    .next-prayer-section {
        padding: 0 !important;
        margin: 16px 0 8px !important;
        background: transparent !important;
        border-radius: 0 !important;
        border: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 160px;
        position: relative;
    }

    /* Sundial arc - perfect semicircle (wider) */
    .next-prayer-section {
        margin-top: 0 !important;
        position: relative;
        z-index: 10;
    }

    .next-prayer-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 280px;
        height: 140px;
        border: 3px solid rgba(201, 169, 97, 0.3);
        border-bottom: none;
        border-radius: 140px 140px 0 0;
    }

    /* Sun/Moon icon that follows the arc */
    .sundial-icon {
        position: absolute;
        transition: all 0.5s ease-in-out;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sundial-icon .material-icons {
        font-size: 40px;
        color: #C9A961;
    }

    .next-prayer-info-label,
    .next-prayer-time-label,
    .countdown-label {
        display: none;
    }

    .next-prayer-info,
    .next-prayer-time-info,
    .countdown-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .next-prayer-section .next-prayer-info {
        order: 1;
        margin-top: 60px;
    }

    .next-prayer-name {
        font-size: 32px;
        font-weight: bold;
        color: #37474F;
    }

    .next-prayer-section .next-prayer-time-info {
        order: 2;
        margin-top: -10px;
        font-weight: 600;
    }

    .next-prayer-section .next-prayer-time-info .next-prayer-time {
        font-weight: 500;
    }

    .next-prayer-time {
        font-size: 24px;
        font-weight: bold;
        color: #37474F;
    }

    .next-prayer-section .countdown-info {
        order: 3;
        margin-top: -10px;
    }

    .next-prayer-section .countdown-info .countdown-label {
        display: none !important;
    }

    .countdown {
        font-size: 16px;
        font-weight: 600;
        color: #90A4AE;
    }

    .countdown .complete-main {
        margin-top: 80px;
    }

    /* Back to Today button for mobile (past/future dates) */
    .back-to-today-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 24px;
        background: rgba(55, 71, 79, 0.1);
        border: 2px solid rgba(55, 71, 79, 0.3);
        border-radius: 12px;
        color: #37474F;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        z-index: 10;
    }

    .back-to-today-mobile:hover {
        background: rgba(55, 71, 79, 0.2);
        transform: scale(1.05);
    }

    .back-to-today-mobile .material-icons {
        font-size: 20px;
    }

    /* Prayer list - no borders on cards */
    body.ramadan-mode .prayer-card.ramadan-special {
        margin-top: -2px;
    }

    .prayer-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: white;
        border-radius: 20px;
        padding: 16px 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        margin: 8px 0 16px;
    }

    .prayer-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 0 0 16px 0;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        position: relative;
        min-height: 60px;
    }

    .prayer-card.active,
    .prayer-card.ramadan-special,
    .prayer-card.passed {
        background: transparent !important;
        border: none !important;
    }

    /* Timeline circle */
    .prayer-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 10px !important;
        height: 10px !important;
        border-radius: 50%;
        background: white;
        border: 3px solid rgba(55, 71, 79, 0.3);
        z-index: 2;
        opacity: 1;
    }

    /* Timeline vertical line */
    .prayer-card::after {
        content: '';
        position: absolute;
        left: 7px;
        top: 16px;
        width: 2px;
        height: calc(100% - 16px);
        background: rgba(55, 71, 79, 0.2);
        z-index: 1;
    }

    .prayer-card:last-child::after {
        display: none;
    }

    /* Active/Next prayer - filled gold circle */
    .prayer-card.active::before {
        background: #C9A961;
        border-color: #C9A961;
        width: 24px;
        height: 24px;
    }

    /* Passed prayers - filled green circle and thicker line */
    .prayer-card.passed::before {
        background: #C9A961;
        border-color: #C9A961;
    }

    .prayer-card.passed::after {
        background: #C9A961;
        width: 2px;
        left: 7px;
    }

    /* Passed prayer styling - lighter text */
    .prayer-card.passed .prayer-name,
    .prayer-card.passed .prayer-time,
    .prayer-card.passed .prayer-rakats {
        color: #C9A961;
        opacity: 0.6;
    }

    /* Prayer card content */
    .prayer-card > div:first-of-type {
        display: flex;
        flex-direction: column;
        flex: 1;
        text-align: left;
        padding-left: 36px;
    }

    .prayer-name {
        font-size: 18px;
        font-weight: bold;
        color: #37474F;
        margin-bottom: 4px;
    }

    .prayer-rakats {
        font-size: 13px;
        color: #C9A961;
        font-weight: 500;
    }

    .prayer-card > div:last-of-type {
        display: flex;
        align-items: flex-start;
        padding-top: 0;
    }

    .prayer-time {
        font-size: 18px;
        font-weight: bold;
        color: #37474F;
        margin-left: auto;
        padding-left: 16px;
    }

    /* Ramadan banner in prayer grid */
    .ramadan-banner-mobile {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 2px dashed rgba(55, 71, 79, 0.2);
    }

    .ramadan-banner-title {
        text-align: center;
        margin-bottom: 12px;
    }

    .moon-icon {
        font-size: 18px;
        margin-right: 6px;
    }

    .ramadan-text {
        font-size: 16px;
        font-weight: bold;
        color: #37474F;
    }

    .ramadan-times-row {
        display: flex;
        gap: 8px;
    }

    .ramadan-time-box {
        flex: 1;
        padding: 8px;
        background: rgba(76, 175, 80, 0.1);
        border: 1px solid rgba(76, 175, 80, 0.3);
        border-radius: 8px;
        text-align: center;
    }

    .ramadan-time-label {
        font-size: 13px;
        font-weight: bold;
        color: #37474F;
    }

    .ramadan-time-sublabel {
        font-size: 10px;
        color: #90A4AE;
        margin-top: 2px;
    }

    .ramadan-time-value {
        font-size: 16px;
        font-weight: bold;
        color: #4CAF50;
    }

    /* All prayers complete */
    .countdown-info.all-complete .complete-main {
        font-size: 16px;
    }

    .countdown-info.all-complete .complete-sub {
        font-size: 14px;
    }

    /* Ramadan theme colors */
    body.ramadan-mode {

    }

    body.ramadan-mode .bismillah {
        color: #8B6914;
        font-size: 18px;
    }

    body.ramadan-mode .gregorian-date {
        color: #5D4E37;
        background: none;
        border: none;
        width: 100%;
        text-align: center;
    }

    body.ramadan-mode .hijri-date {
        color: #8B6914;
        background: none;
        border: none;
        width: 100%;
        text-align: center;
    }

    body.ramadan-mode .settings-button {
        background: transparent;
        color: #8B6914;
    }

    body.ramadan-mode .date-nav-button {
        background: rgba(196, 165, 116, 0.3);
        border-color: #C4A574;
        color: #8B6914;
    }

    body.ramadan-mode .next-prayer-section::before {
        border-color: rgba(196, 165, 116, 0.6);
    }

    body.ramadan-mode .next-prayer-name,
    body.ramadan-mode .next-prayer-time {
        color: #8B6914;
    }

    body.ramadan-mode .countdown-info::before {
        color: #B8935F;
        display: none;
    }

    body.ramadan-mode .countdown {
        color: #B8935F;
    }

    body.ramadan-mode .prayer-grid {
        background: rgba(255, 255, 255, 0.7);
    }

    body.ramadan-mode .prayer-name {
        color: #5D4E37;
    }

    body.ramadan-mode .prayer-rakats {
        color: #B8935F;
    }

    body.ramadan-mode .prayer-time {
        color: #8B6914;
    }

    body.ramadan-mode .prayer-card.active::before,
    body.ramadan-mode .prayer-card.passed::before {
        background: #D4A54A;
        border-color: #D4A54A;
    }

    body.ramadan-mode .prayer-card.passed .prayer-name,
    body.ramadan-mode .prayer-card.passed .prayer-time {
        color: #C4A574;
    }

    body.ramadan-mode .prayer-card.passed::after {
        background: #D4A54A;
    }

    body.ramadan-mode .ramadan-text {
        color: #5D4E37;
    }

    body.ramadan-mode .ramadan-time-box {
        background: rgba(212, 165, 74, 0.1);
        border-color: rgba(196, 165, 116, 0.4);
    }

    body.ramadan-mode .ramadan-time-label {
        color: #5D4E37;
    }

    body.ramadan-mode .ramadan-time-sublabel {
        color: #B8935F;
    }

    body.ramadan-mode .ramadan-time-value {
        color: #8B6914;
    }

    body.ramadan-mode .back-to-today-mobile {
        background: rgba(196, 165, 116, 0.2);
        border-color: #C4A574;
        color: #8B6914;
    }

    body.ramadan-mode .back-to-today-mobile:hover {
        background: rgba(196, 165, 116, 0.3);
    }

    /* Default Green Theme colors for mobile */
    body:not(.ramadan-mode):not(.kids-mode) * {
        text-shadow: none !important;
        background: transparent !important;
        color: #ffffff;
    }
    body:not(.ramadan-mode):not(.kids-mode) {
        background: url(../assets/images/bg-green-mobile.jpg) bottom center / cover no-repeat fixed;
    }

    body:not(.ramadan-mode):not(.kids-mode) .mobile-bottom-nav {
        background: rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }

    body:not(.ramadan-mode):not(.kids-mode) .header {
        background: transparent !important;
        /* backdrop-filter: blur(10px); */
    }

    body:not(.ramadan-mode):not(.kids-mode) .settings-save-button {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.4);
        color: #FFFFFF;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-grid {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    body:not(.ramadan-mode):not(.kids-mode) .bismillah {
        color: #FFFFFF;
        font-weight: 700;
    }

    body:not(.ramadan-mode):not(.kids-mode) .gregorian-date {
        color: #FFFFFF;
        font-weight: 700;
    }

    body:not(.ramadan-mode):not(.kids-mode) .hijri-date {
        color: #FFFFFF;
        font-weight: 600;
        opacity: 0.9;
    }

    body:not(.ramadan-mode):not(.kids-mode) .settings-button .material-icons {
        color: #FFFFFF;
        font-size: 26px;
    }

    body:not(.ramadan-mode):not(.kids-mode) .date-nav-button {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    body:not(.ramadan-mode):not(.kids-mode) .date-nav-button .material-icons {
        color: #FFFFFF;
        font-size: 30px;
    }

    body:not(.ramadan-mode):not(.kids-mode) .next-prayer-section::before {
        border-color: rgba(255, 255, 255, 0.4);
    }

    body:not(.ramadan-mode):not(.kids-mode) .sundial-icon .material-icons {
        color: #FFFFFF;
    }

    body:not(.ramadan-mode):not(.kids-mode) .next-prayer-name {
        color: #FFFFFF;
        font-weight: 700;
    }

    body:not(.ramadan-mode):not(.kids-mode) .next-prayer-time {
        color: #FFFFFF;
        font-weight: 600;
    }

    body:not(.ramadan-mode):not(.kids-mode) .countdown {
        color: #FFFFFF;
        opacity: 0.9;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-card::before {
        border-color: rgba(255, 255, 255, 0.4);
        background: transparent;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-card::after {
        background: rgba(255, 255, 255, 0.3);
    }

    body:not(.ramadan-mode):not(.kids-mode) .ramadan-banner-mobile {
        border-top: 1px dashed rgba(255, 255, 255, 0.3);
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.active::before,
    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.passed::before {
        background: #FFFFFF;
        border-color: #FFFFFF;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.passed::after {
        background: #FFFFFF;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-name {
        color: #FFFFFF;
        font-weight: 600;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-rakats {
        color: #FFFFFF;
        opacity: 0.8;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-time {
        color: #FFFFFF;
        font-weight: 600;
    }

    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.passed .prayer-name,
    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.passed .prayer-time,
    body:not(.ramadan-mode):not(.kids-mode) .prayer-card.passed .prayer-rakats {
        opacity: 0.4;
    }

    body:not(.ramadan-mode):not(.kids-mode) .ramadan-time-box {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    body:not(.ramadan-mode):not(.kids-mode) .ramadan-time-label {
        color: #FFFFFF;
        font-weight: 600;
    }

    body:not(.ramadan-mode):not(.kids-mode) .ramadan-time-sublabel {
        color: #FFFFFF;
        opacity: 0.8;
    }

    body:not(.ramadan-mode):not(.kids-mode) .ramadan-time-value {
        color: #FFFFFF;
        font-weight: 700;
    }

    body:not(.ramadan-mode):not(.kids-mode) .back-to-today-mobile {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
        color: #FFFFFF;
    }

    body:not(.ramadan-mode):not(.kids-mode) .back-to-today-mobile:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Kids Theme colors for mobile (matching green theme) */
    body.kids-mode * {
        text-shadow: none !important;
        background: transparent;
        color: #ffffff;
    }

    body.kids-mode {
        background: url(../assets/images/bg-kids.jpg) bottom center / cover no-repeat fixed;
    }

    body.kids-mode .container {
        padding: 12px 16px;
        max-width: 100%;
    }

    body.kids-mode .header {
        background: transparent !important;
        display: block;
        width: 100%;
        text-align: center;
    }

    body.kids-mode .gregorian-date, body.kids-mode .hijri-date {
        background: transparent !important;
        border: none !important;
        width: 100%;
        text-align: center;
        box-shadow: none;
    }

    body.kids-mode .countdown .complete-main,
    body.kids-mode .countdown .complete-sub {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        color: #ffffff;
    }

    body.kids-mode .prayer-grid {
        background: #019da0;
        /* backdrop-filter: blur(10px); */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        gap: 0;
    }

    body.kids-mode .bismillah {
        color: #FFFFFF;
        font-weight: 700;
    }

    body.kids-mode .gregorian-date {
        color: #FFFFFF;
        font-weight: 700;
    }

    body.kids-mode .hijri-date {
        color: #FFFFFF;
        font-weight: 600;
        opacity: 0.9;
    }

    body.kids-mode .settings-button {
        background: transparent;
        border: none;
        color: #FFFFFF;
    }

    body.kids-mode .settings-button .material-icons {
        color: #FFFFFF;
        font-size: 20px;
        border: none;
    }

    body.kids-mode .date-nav-button {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.3);
    }

    body.kids-mode .date-nav-button .material-icons {
        color: #FFFFFF;
        font-size: 30px;
    }

    body.kids-mode .next-prayer-section::before {
        border-color: rgba(255, 255, 255, 0.4);
    }

    body.kids-mode .sundial-icon .material-icons {
        color: #FFFFFF;
    }

    body.kids-mode .next-prayer-name {
        color: #FFFFFF;
        font-weight: 700;
    }

    body.kids-mode .next-prayer-time {
        color: #FFFFFF;
        font-weight: 600;
    }

    body.kids-mode .countdown {
        color: #FFFFFF;
        opacity: 0.9;
    }

    body.kids-mode .prayer-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 0 0 16px 0;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        position: relative;
        min-height: 60px;
    }

    body.kids-mode .prayer-card::before {
        border-color: rgba(255, 255, 255, 0.4);
        background: transparent;
    }

    body.kids-mode .prayer-card::after {
        background: rgba(255, 255, 255, 0.2);
    }

    body.kids-mode .prayer-name {
        color: #FFFFFF;
        font-size: 18px;
        font-weight: 600;
    }

    body.kids-mode .prayer-rakats {
        color: #FFFFFF;
        opacity: 0.8;
    }

    body.kids-mode .prayer-time {
        color: #FFFFFF;
        font-weight: 700;
    }

    body.kids-mode .prayer-card.active {
        border-color: rgba(255, 255, 255, 0.6);
    }

    body.kids-mode .prayer-card.active::before {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
    }

    body.kids-mode .prayer-card.passed {
        opacity: 1;
    }

    body.kids-mode .prayer-card.passed .prayer-name, body.kids-mode .prayer-card.passed .prayer-time, body.kids-mode .prayer-card.passed .prayer-rakats {
        color: #FFFFFF;
        opacity: 0.6;
    }

    body.kids-mode .prayer-card.passed::before {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
    }

    body.kids-mode .ramadan-banner-mobile {
        backdrop-filter: blur(10px);
        border-top: 1px dashed rgba(255, 255, 255, 0.4);
    }

    body.kids-mode .ramadan-text {
        color: #FFFFFF;
    }

    body.kids-mode .ramadan-time-label {
        color: #FFFFFF;
        opacity: 0.9;
    }

    body.kids-mode .ramadan-time-box {
        background: rgba(0,0,0,0.15);
        border: none;
        border-radius: 20px;
        box-shadow: 0 4px 10px rgba(0, 206, 209, 0.3);
    }

    body.kids-mode .ramadan-time-value {
        color: #FFFFFF;
        font-weight: 700;
    }

    body.kids-mode .back-to-today-mobile {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.4);
        color: #FFFFFF;
    }

    body.kids-mode .back-to-today-mobile:hover {
        background: rgba(255, 255, 255, 0.3) !important;
    }

    /* ── Mobile bottom navigation bar ── */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(55, 71, 79, 0.12);
        z-index: 300;
        align-items: stretch;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: rgba(55, 71, 79, 0.45);
        text-decoration: none;
        padding: 6px 8px;
        transition: color 0.15s ease;
        font-family: 'Source Sans 3', sans-serif;
        position: relative;
    }

    .bottom-nav-item:active {
        opacity: 0.6;
    }

    .bottom-nav-item .material-icons {
        font-size: 22px;
    }

    .bottom-nav-item .nav-symbol-img {
        width: 22px;
        height: 22px;
        opacity: 0.45;
    }

    .bottom-nav-item.active .nav-symbol-img {
        opacity: 1;
    }

    .bottom-nav-label {
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.2px;
    }

    /* Active state */
    .bottom-nav-item.active {
        color: #C9A961;
    }

    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 28%;
        right: 28%;
        height: 2px;
        background: #C9A961;
        border-radius: 0 0 3px 3px;
    }

    /* Push content above the bottom nav */
    .container {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Ramadan bottom nav */
    body.ramadan-mode .mobile-bottom-nav {
        background: rgba(255, 248, 235, 0.97);
        border-top-color: rgba(139, 105, 20, 0.12);
    }

    body.ramadan-mode .bottom-nav-item {
        color: rgba(139, 105, 20, 0.45);
    }

    body.ramadan-mode .bottom-nav-item.active {
        color: #8B6914;
    }

    body.ramadan-mode .bottom-nav-item.active::before {
        background: #8B6914;
    }

    /* Kids bottom nav */
    body.kids-mode .mobile-bottom-nav {
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    body.kids-mode .bottom-nav-item {
        color: rgba(255, 255, 255, 0.45);
    }

    body.kids-mode .bottom-nav-item.active {
        color: #FFFFFF;
    }

    body.kids-mode .bottom-nav-item.active::before {
        background: #FFFFFF;
    }

    /* ── Install nudge ── */
    .install-nudge {
        position: fixed;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 10px);
        left: 12px;
        right: 12px;
        background: rgba(15, 40, 24, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(244, 213, 113, 0.3);
        border-radius: 12px;
        padding: 11px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        z-index: 299;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .install-nudge.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .install-nudge-icon {
        color: #f4d571;
        font-size: 22px !important;
        flex-shrink: 0;
    }

    .install-nudge-text {
        flex: 1;
        font-size: 13px;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.88);
    }

    .install-nudge-link {
        font-size: 13px;
        font-weight: 700;
        color: #f4d571;
        text-decoration: none;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .install-nudge-dismiss {
        background: none;
        border: none;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.45);
        padding: 0;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        line-height: 1;
    }

    .install-nudge-dismiss .material-icons {
        font-size: 18px !important;
    }
}

/* ============================================================
   PWA / HOME SCREEN STANDALONE MODE
   Extra breathing room when the app is installed to the
   home screen and runs outside the browser chrome.
   Applies on iOS (Add to Home Screen) and Android (Install App).
   ============================================================ */
@media (display-mode: standalone) {
    /* Taller nav bar so tap targets never compete with the
       iOS home indicator swipe gesture area */
    .mobile-bottom-nav {
        height: calc(68px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Push page content up to match the taller bar */
    @media (max-width: 768px) {
        .container {
            padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        }
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Error state (shown in the prayer grid on timeout or network failure) */
.error-state { text-align: center; padding: 20px; }
.error-state .error-icon    { font-size: 48px; margin-bottom: 15px; }
.error-state .error-title   { font-size: 16px; margin-bottom: 10px; }
.error-state .error-message { font-size: 13px; opacity: 0.8; margin-bottom: 15px; }

.action-btn-primary,
.action-btn-secondary {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Source Sans 3', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.action-btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-green-deep);
    margin-right: 8px;
}
.action-btn-secondary {
    border: 2px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
}
.action-btn-primary:hover,
.action-btn-secondary:hover { transform: translateY(-1px); }

/* Landscape Optimization for Fire Tablet 7 */
@media (orientation: landscape) and (max-height: 600px) {
    .bismillah {
        font-size: 16px;
    }

    .current-time {
        font-size: 42px;
    }

    .prayer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Prayer Time Modal */
.prayer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.prayer-modal.show {
    display: flex;
}

.prayer-modal-content {
    background: linear-gradient(135deg, #1a4d2e 0%, #0f2818 100%);
    border: 3px solid #f4d571;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(244, 213, 113, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

body.ramadan-mode .prayer-modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: #8b6914;
}

body.ramadan-mode .prayer-modal h2 {
    color: #6b5016;
    font-weight: 700;
}

body.ramadan-mode .prayer-modal-time {
    color: #8b6914;
    font-weight: 600;
}

body.ramadan-mode .prayer-modal-button {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
    font-weight: 700;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.prayer-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 1s linear infinite;
}

.prayer-modal h2 {
    font-family: 'Amiri', serif;
    font-size: 36px;
    color: #f4d571;
    margin-bottom: 10px;
}

.prayer-modal-time {
    font-size: 24px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.prayer-modal-info {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

body.ramadan-mode .prayer-modal-info {
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(107, 80, 22, 0.3);
    color: #6b5016;
}

.prayer-modal-button {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans 3', sans-serif;
}

.prayer-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(244, 213, 113, 0.4);
}

.prayer-modal-button:active {
    transform: translateY(0);
}

/* Prayer Details Modal */
.prayer-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.prayer-details-modal.show {
    display: flex;
}

.prayer-details-content {
    background: linear-gradient(135deg, #1a4d2e 0%, #0f2818 100%);
    border: 3px solid #f4d571;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(244, 213, 113, 0.5);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

body.ramadan-mode .prayer-details-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: #8b6914;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.ramadan-mode .modal-close {
    background: rgba(139, 105, 20, 0.2);
    color: #6b5016;
    border: 1px solid rgba(107, 80, 22, 0.3);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

body.ramadan-mode .modal-close:hover {
    background: rgba(139, 105, 20, 0.3);
    border-color: #8b6914;
}

.prayer-details-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center;
}

.prayer-details-content h2 {
    font-family: 'Amiri', serif;
    font-size: 32px;
    color: #f4d571;
    margin-bottom: 10px;
    text-align: center;
}

body.ramadan-mode .prayer-details-content h2 {
    color: #6b5016;
    font-weight: 700;
}

.prayer-details-time {
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
    color: #fff;
}

body.ramadan-mode .prayer-details-time {
    color: #8b6914;
    opacity: 1;
    font-weight: 600;
}

.rakats-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

body.ramadan-mode .rakats-info {
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(107, 80, 22, 0.3);
    color: #6b5016;
}

.rakats-info .rakat-item {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.ramadan-mode .rakats-info .rakat-item {
    border-bottom-color: rgba(107, 80, 22, 0.2);
}

.rakats-info .rakat-item:last-child {
    border-bottom: none;
}

.rakats-info .rakat-type {
    font-weight: 600;
    color: #f4d571;
}

body.ramadan-mode .rakats-info .rakat-type {
    color: #6b5016;
    font-weight: 700;
}

/* Required vs Optional rakats styling */
.rakat-item.rakat-required {
    font-weight: 600;
}

.rakat-item.rakat-required .rakat-type {
    color: #4CAF50;
    font-weight: 700;
}

.rakat-item.rakat-optional {
    opacity: 0.7;
    font-weight: 400;
}

.rakat-item.rakat-optional .rakat-type {
    color: #90CAF9;
    font-weight: 500;
}

body.ramadan-mode .rakat-item.rakat-required .rakat-type {
    color: #2E7D32;
}

body.ramadan-mode .rakat-item.rakat-optional .rakat-type {
    color: #1976D2;
}

body.kids-mode .rakat-item.rakat-required .rakat-type {
    color: #00C853;
}

body.kids-mode .rakat-item.rakat-optional .rakat-type {
    color: #2196F3;
}

.prayer-description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    text-align: center;
    color: #fff;
}

body.ramadan-mode .prayer-description {
    color: #6b5016;
    opacity: 1;
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.settings-modal.show {
    display: flex;
}

.settings-modal-content {
    background: linear-gradient(135deg, #1a4d2e 0%, #0f2818 100%);
    border: 3px solid #f4d571;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(244, 213, 113, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

body.ramadan-mode .settings-modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: #8b6914;
}

.settings-modal h2 {
    font-family: 'Amiri', serif;
    font-size: 32px;
    color: #f4d571;
    margin-bottom: 20px;
    text-align: center;
}

body.ramadan-mode .settings-modal h2 {
    color: #6b5016;
    font-weight: 700;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 14px;
    color: #f4d571;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.ramadan-mode .form-group label {
    color: #2c2c2c;
}

.zip-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    position: relative;
}

.zip-input-group input {
    flex: 1;
}

.detect-location-button {
    padding: 12px 16px;
    border: 2px solid rgba(244, 213, 113, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #f4d571;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detect-location-button .material-icons {
    font-size: 20px;
}

.detect-location-button:hover {
    background: rgba(244, 213, 113, 0.2);
    border-color: #f4d571;
    transform: scale(1.05);
}

.detect-location-button:active {
    transform: scale(0.95);
}

.detect-location-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.ramadan-mode .detect-location-button {
    background: #ffffff;
    border-color: rgba(107, 80, 22, 0.4);
    color: #8b6914;
}

body.ramadan-mode .detect-location-button:hover {
    background: rgba(139, 105, 20, 0.1);
    border-color: #8b6914;
}

body.kids-mode .detect-location-button {
    background: #F5F5F5;
    border: 2px solid #E0E0E0;
    color: #00CED1;
}

body.kids-mode .detect-location-button:hover {
    background: #E8F8F8;
    border-color: #00CED1;
}

/* Location autocomplete dropdown */
.location-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 300;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: rgba(14, 40, 22, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(244, 213, 113, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.location-suggestion-item {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.1s ease;
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover,
.location-suggestion-item.active {
    background: rgba(244, 213, 113, 0.14);
}

.suggestion-primary {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.suggestion-secondary {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.ramadan-mode .location-suggestions {
    background: rgba(255, 248, 230, 0.98);
    border-color: rgba(139, 105, 20, 0.3);
    box-shadow: 0 8px 24px rgba(100, 70, 0, 0.2);
}

body.ramadan-mode .location-suggestion-item {
    border-bottom-color: rgba(139, 105, 20, 0.1);
}

body.ramadan-mode .location-suggestion-item:hover,
body.ramadan-mode .location-suggestion-item.active {
    background: rgba(139, 105, 20, 0.1);
}

body.ramadan-mode .suggestion-primary {
    color: #3c2c05;
}

body.ramadan-mode .suggestion-secondary {
    color: rgba(60, 44, 5, 0.55);
}

body.kids-mode .location-suggestions {
    background: rgba(240, 252, 255, 0.98);
    border-color: rgba(0, 206, 209, 0.4);
    box-shadow: 0 8px 24px rgba(0, 100, 120, 0.2);
}

body.kids-mode .location-suggestion-item {
    border-bottom-color: rgba(0, 206, 209, 0.12);
}

body.kids-mode .location-suggestion-item:hover,
body.kids-mode .location-suggestion-item.active {
    background: rgba(0, 206, 209, 0.1);
}

body.kids-mode .suggestion-primary {
    color: #1a3a5c;
}

body.kids-mode .suggestion-secondary {
    color: rgba(26, 58, 92, 0.6);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid rgba(244, 213, 113, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Source Sans 3', sans-serif;
    transition: all 0.3s ease;
}

.form-group select {
    padding-right: 40px;
}

.form-group select option {
    background: #ffffff;
    color: #1a1a1a;
}

body.ramadan-mode .form-group input,
body.ramadan-mode .form-group select {
    background: #ffffff;
    border-color: rgba(107, 80, 22, 0.4);
    border-width: 2px;
    color: #2c1f0a;
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f4d571;
    box-shadow: 0 0 10px rgba(244, 213, 113, 0.3);
}

body.ramadan-mode .form-group input:focus,
body.ramadan-mode .form-group select:focus {
    border-color: #8b6914;
    box-shadow: 0 0 10px rgba(139, 105, 20, 0.3);
}

.preview-athan-button {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans 3', sans-serif;
    border: 2px solid rgba(244, 213, 113, 0.5);
    background: linear-gradient(135deg, rgba(244, 213, 113, 0.2) 0%, rgba(224, 196, 92, 0.2) 100%);
    color: #f4d571;
    margin-top: 8px;
}

body.ramadan-mode .preview-athan-button {
    background: linear-gradient(135deg, rgba(212, 165, 74, 0.2) 0%, rgba(184, 144, 62, 0.2) 100%);
    border-color: rgba(139, 105, 20, 0.5);
    color: #8b6914;
}

body.kids-mode .preview-athan-button {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    border-color: #FF1493;
    color: #fff;
    font-weight: 700;
}

.preview-athan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 213, 113, 0.3);
    border-color: #f4d571;
}

body.ramadan-mode .preview-athan-button:hover {
    box-shadow: 0 5px 15px rgba(139, 105, 20, 0.3);
    border-color: #8b6914;
}

body.kids-mode .preview-athan-button:hover {
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.preview-athan-button:active {
    transform: translateY(0);
}

.settings-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.settings-save-button,
.settings-cancel-button {
    flex: 1;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans 3', sans-serif;
    border: none;
}

.settings-save-button {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
}

body.ramadan-mode .settings-save-button {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
    font-weight: 700;
}

.settings-cancel-button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(244, 213, 113, 0.3);
}

body.ramadan-mode .settings-cancel-button {
    background: rgba(139, 105, 20, 0.1);
    color: #6b5016;
    border-color: rgba(107, 80, 22, 0.4);
    font-weight: 600;
}

.settings-save-button:hover,
.settings-cancel-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(244, 213, 113, 0.4);
}

.settings-save-button:active,
.settings-cancel-button:active {
    transform: translateY(0);
}

.settings-copyright {
    text-align: center;
    font-size: 13px;
    margin-top: 24px;
    opacity: 0.7;
    color: #f4d571;
    font-weight: 300;
}

.settings-copyright a {
    color: #f4d571;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.2s ease;
}

.settings-copyright a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

body.ramadan-mode .settings-copyright {
    color: #6b5016;
    opacity: 0.8;
}

body.ramadan-mode .settings-copyright a {
    color: #8b6914;
    font-weight: 600;
}

/* ============================================================
   GUIDE PAGE
   ============================================================ */

/* Page header (back button + title + symbol) */
.guide-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.guide-back-btn {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(244, 213, 113, 0.3);
    transition: box-shadow 0.3s ease;
}

.guide-back-btn:hover {
    box-shadow: 0 4px 15px rgba(244, 213, 113, 0.5);
}

.guide-back-btn .material-icons {
    font-size: 20px;
}

.guide-page-title-area {
    flex: 1;
}

.guide-page-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.guide-page-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin: 3px 0 0;
    font-family: 'Source Sans 3', sans-serif;
}

.guide-page-symbol {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    opacity: 0.9;
}

/* Sections container */
.guide-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 32px;
}

/* Individual accordion section */
.guide-section {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.guide-section.open {
    border-color: rgba(244, 213, 113, 0.5);
}

/* Clickable section header */
.guide-section-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 12px;
    transition: background 0.2s ease;
    text-align: left;
}

.guide-section-header:hover {
    background: rgba(255, 255, 255, 0.07);
}

.guide-section-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.guide-section-icon {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1;
}

.guide-section-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guide-section-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #f4d571;
    line-height: 1.2;
}

.guide-section-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Source Sans 3', sans-serif;
}

.guide-chevron {
    color: rgba(255, 255, 255, 0.45);
    font-size: 24px !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Collapsible body */
.guide-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-section-body-inner {
    padding: 4px 20px 22px;
}

/* Intro paragraph */
.guide-intro {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    border-left: 3px solid rgba(244, 213, 113, 0.5);
}

/* Sub-section heading */
.guide-sub-heading {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #f4d571;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 20px 0 12px;
}

/* Numbered steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.guide-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.guide-step-num {
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
    font-family: 'Source Sans 3', sans-serif;
}

.guide-step-content {
    flex: 1;
}

.guide-step-content strong {
    display: block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.guide-step-content p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

.guide-step-content em {
    color: #f4d571;
    font-style: normal;
    font-weight: 500;
}

/* Icon + text point list */
.guide-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.guide-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.guide-point-icon {
    color: #f4d571;
    font-size: 20px !important;
    flex-shrink: 0;
    margin-top: 1px;
}

.guide-point p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Info note box */
.guide-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(244, 213, 113, 0.1);
    border-radius: 8px;
    border-left: 3px solid rgba(244, 213, 113, 0.55);
    margin-top: 20px;
}

.guide-note-icon {
    color: #f4d571;
    font-size: 18px !important;
    flex-shrink: 0;
    margin-top: 1px;
}

.guide-note p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

/* Rakat table */
.guide-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 8px;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
}

.guide-table th {
    background: rgba(244, 213, 113, 0.18);
    color: #f4d571;
    font-weight: 700;
    padding: 10px 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.guide-table th:first-child {
    text-align: left;
}

.guide-table td {
    padding: 10px 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.fard-cell {
    font-weight: 700;
    color: #f4d571 !important;
}

.prayer-name-cell {
    text-align: left !important;
    font-weight: 600;
    color: #ffffff;
}

/* Eid type cards */
.guide-eid-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.guide-eid-type {
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.guide-eid-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    font-family: 'Source Sans 3', sans-serif;
    letter-spacing: 0.3px;
}

.guide-eid-type p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

/* ── Guide page overrides ── */
body.guidePage .bismillah {
    display: block;
    flex: none;
    padding: 10px 0 15px;
    text-align: center;
}
body.guidePage .guide-page-header {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    text-align: center;
    flex-direction: row;
    gap: 8px;
}

/* ── Ramadan theme overrides ── */
body.ramadan-mode .guide-page-header {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(139, 105, 20, 0.3);
}

body.ramadan-mode .guide-page-header .bismillah {
    color: #8b6914;
    text-shadow: none;
}

body.ramadan-mode .guide-page-title {
    color: #6b5016;
    text-shadow: none;
}

body.ramadan-mode .guide-page-subtitle {
    color: rgba(107, 80, 22, 0.7);
}

body.ramadan-mode .guide-back-btn {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
}

body.ramadan-mode .guide-section {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(139, 105, 20, 0.22);
}

body.ramadan-mode .guide-section.open {
    border-color: rgba(139, 105, 20, 0.5);
}

body.ramadan-mode .guide-section-header:hover {
    background: rgba(212, 165, 74, 0.08);
}

body.ramadan-mode .guide-section-title {
    color: #6b5016;
}

body.ramadan-mode .guide-section-subtitle {
    color: rgba(107, 80, 22, 0.65);
}

body.ramadan-mode .guide-chevron {
    color: rgba(107, 80, 22, 0.5);
}

body.ramadan-mode .guide-intro {
    color: #3a3939;
    background: rgba(212, 165, 74, 0.08);
    border-left-color: rgba(212, 165, 74, 0.6);
}

body.ramadan-mode .guide-sub-heading {
    color: #8b6914;
}

body.ramadan-mode .guide-step-num {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
}

body.ramadan-mode .guide-step-content strong {
    color: #3a3939;
}

body.ramadan-mode .guide-step-content p {
    color: #555;
}

body.ramadan-mode .guide-step-content em {
    color: #8b6914;
}

body.ramadan-mode .guide-note {
    background: rgba(212, 165, 74, 0.1);
    border-left-color: rgba(212, 165, 74, 0.65);
}

body.ramadan-mode .guide-note p {
    color: #555;
}

body.ramadan-mode .guide-note-icon {
    color: #8b6914;
}

body.ramadan-mode .guide-point p {
    color: #3a3939;
}

body.ramadan-mode .guide-point-icon {
    color: #8b6914;
}

body.ramadan-mode .guide-table-wrapper {
    border-color: rgba(139, 105, 20, 0.2);
}

body.ramadan-mode .guide-table th {
    background: rgba(212, 165, 74, 0.15);
    color: #6b5016;
}

body.ramadan-mode .guide-table td {
    color: #3a3939;
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.ramadan-mode .fard-cell {
    color: #8b6914 !important;
}

body.ramadan-mode .prayer-name-cell {
    color: #3a3939;
}

body.ramadan-mode .guide-eid-type {
    background: rgba(212, 165, 74, 0.07);
    border-color: rgba(139, 105, 20, 0.18);
}

body.ramadan-mode .guide-eid-type p {
    color: #555;
}

body.ramadan-mode .guide-eid-badge {
    background: linear-gradient(135deg, #d4a54a 0%, #b8903e 100%);
    color: #2c1f0a;
}

/* ── Kids theme overrides ── */
body.kids-mode .guide-page-header {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body.kids-mode .guide-page-header .bismillah {
    color: #009B9E;
    text-shadow: none;
}

body.kids-mode .guide-page-title {
    color: #131313;
    text-shadow: none;
}

body.kids-mode .guide-page-subtitle {
    color: #666;
}

body.kids-mode .guide-back-btn {
    background: #00CED1;
    color: #000;
    box-shadow: 0 2px 10px rgba(0, 206, 209, 0.3);
}

body.kids-mode .guide-section {
    background: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    backdrop-filter: none;
}

body.kids-mode .guide-section.open {
    border-color: #00CED1;
}

body.kids-mode .guide-section-header:hover {
    background: rgba(0, 206, 209, 0.06);
}

body.kids-mode .guide-section-title {
    color: #00CED1;
    font-size: 18px;
}

body.kids-mode .guide-section-subtitle {
    color: #666;
}

body.kids-mode .guide-chevron {
    color: #aaa;
}

body.kids-mode .guide-intro {
    color: #333;
    background: rgba(0, 206, 209, 0.06);
    border-left-color: #00CED1;
}

body.kids-mode .guide-intro strong {
    color: #131313;
}

body.kids-mode .guide-sub-heading {
    color: #00CED1;
}

body.kids-mode .guide-step-num {
    background: #00CED1;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 206, 209, 0.3);
}

body.kids-mode .guide-step-content strong {
    color: #131313;
}

body.kids-mode .guide-step-content p {
    color: #555;
}

body.kids-mode .guide-step-content em {
    color: #009B9E;
    font-weight: 600;
}

body.kids-mode .guide-note {
    background: rgba(0, 206, 209, 0.07);
    border-left-color: #00CED1;
}

body.kids-mode .guide-note p {
    color: #555;
}

body.kids-mode .guide-note-icon {
    color: #00CED1;
}

body.kids-mode .guide-point p {
    color: #333;
}

body.kids-mode .guide-point-icon {
    color: #00CED1;
}

body.kids-mode .guide-table-wrapper {
    border-color: #e8e8e8;
}

body.kids-mode .guide-table th {
    background: rgba(0, 206, 209, 0.1);
    color: #009B9E;
}

body.kids-mode .guide-table td {
    color: #333;
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.kids-mode .fard-cell {
    color: #00868A !important;
}

body.kids-mode .prayer-name-cell {
    color: #131313;
}

body.kids-mode .guide-eid-type {
    background: rgba(0, 206, 209, 0.05);
    border-color: #e8e8e8;
}

body.kids-mode .guide-eid-type p {
    color: #555;
}

body.kids-mode .guide-eid-badge {
    background: #00CED1;
    color: #000;
}

/* ── Guide page responsive ── */
@media (max-width: 768px) {
    .guide-page-header {
        gap: 12px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .guide-page-title {
        font-size: 20px;
    }

    .guide-page-symbol {
        width: 36px;
        height: 36px;
    }

    .guide-eid-types {
        grid-template-columns: 1fr;
    }

    .guide-back-btn {
        width: 36px;
        height: 36px;
    }
}

/* ══════════════════════════════════════════
   About Page
   ══════════════════════════════════════════ */

body.aboutPage .bismillah {
    display: block;
    flex: none;
    padding: 10px 0 15px;
    text-align: center;
    font-size: 22px;
}

.about-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 28px;
}

.about-logo {
    max-width: 340px;
    width: 100%;
    height: auto;
}

.about-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 32px;
}

.about-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 22px 24px;
}

.about-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #f4d571;
    margin: 0 0 16px;
    line-height: 1.2;
}

.about-card-icon {
    font-size: 20px !important;
    flex-shrink: 0;
}

.about-body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 12px;
}

.about-body:last-child {
    margin-bottom: 0;
}

/* Feature list */
.about-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-feature-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.about-feature-icon {
    color: #f4d571;
    font-size: 20px !important;
    flex-shrink: 0;
    margin-top: 2px;
}

.about-feature-list li div {
    flex: 1;
}

.about-feature-list li strong {
    display: block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 3px;
}

.about-feature-list li p {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

/* GitHub card */
.about-card-github {
    border-color: rgba(244, 213, 113, 0.35);
}

.about-github-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 12px rgba(244, 213, 113, 0.3);
}

.about-github-link:hover {
    box-shadow: 0 4px 18px rgba(244, 213, 113, 0.5);
    transform: translateY(-1px);
}

.about-github-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.about-link-arrow {
    font-size: 16px !important;
}

/* Inline link within about body text */
.about-inline-link {
    color: #f4d571;
    text-decoration: none;
}

.about-inline-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* Support card */
.about-card-support {
    border-color: rgba(244, 213, 113, 0.35);
}

.about-bmc-wrapper {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

/* Credits */
.about-credits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-credit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
}

.about-credit-label {
    color: rgba(255, 255, 255, 0.55);
    min-width: 110px;
    flex-shrink: 0;
}

.about-credit-link {
    color: #f4d571;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.15s ease;
}

.about-credit-link:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ── Ramadan overrides ── */
body.ramadan-mode .about-card {
    background: rgba(255, 248, 235, 0.18);
    border-color: rgba(139, 105, 20, 0.2);
}

body.ramadan-mode .about-card-title {
    color: #8B6914;
}

body.ramadan-mode .about-card-icon {
    color: #8B6914;
}

body.ramadan-mode .about-tagline {
    color: #8B6914;
}

body.ramadan-mode .about-body {
    color: rgba(60, 40, 5, 0.82);
}

body.ramadan-mode .about-feature-list li strong {
    color: rgba(60, 40, 5, 0.9);
}

body.ramadan-mode .about-feature-list li p {
    color: rgba(60, 40, 5, 0.65);
}

body.ramadan-mode .about-feature-icon {
    color: #8B6914;
}

body.ramadan-mode .about-github-link {
    background: linear-gradient(135deg, #c8941e 0%, #a67a10 100%);
    color: #fff8e7;
}

body.ramadan-mode .about-credit-label {
    color: rgba(60, 40, 5, 0.5);
}

body.ramadan-mode .about-credit-link {
    color: #8B6914;
}

body.ramadan-mode .about-card-github {
    border-color: rgba(139, 105, 20, 0.35);
}

body.ramadan-mode .about-card-support {
    border-color: rgba(139, 105, 20, 0.35);
}

body.ramadan-mode .about-inline-link {
    color: #8B6914;
}

/* ── Kids overrides ── */
body.kids-mode .about-card-title {
    color: #ffffff;
}

body.kids-mode .about-tagline {
    color: rgba(255, 255, 255, 0.85);
}

body.kids-mode .about-github-link {
    color: #1a3a5c;
}

body.kids-mode .about-credit-link {
    color: #ffffff;
}

body.kids-mode .about-inline-link {
    color: #ffffff;
}

/* ══════════════════════════════════════════
   Settings Page
   ══════════════════════════════════════════ */

body.settingsPage .bismillah {
    display: block;
    flex: none;
    padding: 10px 0 15px;
    text-align: center;
    font-size: 22px;
}

.settings-page-header {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.settings-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.settings-page-title-icon {
    color: #f4d571;
    font-size: 24px !important;
}

.settings-page-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 32px;
}

.settings-page-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 22px 24px;
}

.settings-page-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.settings-page-actions .settings-cancel-button,
.settings-page-actions .settings-save-button {
    min-width: 100px;
}

/* Ramadan theme overrides */
body.ramadan-mode .settings-page-header {
    background: rgba(255, 248, 235, 0.2);
    border-color: rgba(139, 105, 20, 0.25);
}

body.ramadan-mode .settings-page-title {
    color: #6b5016;
    text-shadow: none;
}

body.ramadan-mode .settings-page-title-icon {
    color: #8b6914;
}

body.ramadan-mode .settings-page-card {
    background: rgba(255, 248, 235, 0.18);
    border-color: rgba(139, 105, 20, 0.2);
}

/* Kids theme overrides */
body.kids-mode .settings-page-title {
    color: #ffffff;
}

/* ══════════════════════════════════════════
   Desktop / tablet side navigation
   ══════════════════════════════════════════ */

/* ── Desktop / tablet side navigation ── */
.desktop-side-nav {
    display: none;
}

@media (min-width: 481px) {
    /* Offset body so content clears the 60px sidebar */
    body {
        padding-left: 60px;
    }

    .desktop-side-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 60px;
        background: rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 200;
        align-items: center;
        justify-content: center;
        gap: 5vh;
    }

    .side-nav-item {
        position: relative;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        color: rgba(255, 255, 255, 0.5);
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease;
        font-family: 'Source Sans 3', sans-serif;
    }

    .side-nav-item:hover,
    .side-nav-item:focus {
        color: #f4d571;
        background: rgba(255, 255, 255, 0.1);
        outline: none;
    }

    .side-nav-item.active {
        color: #f4d571;
        background: rgba(244, 213, 113, 0.18);
    }

    .side-nav-item .material-icons {
        font-size: 22px;
    }

    .side-nav-item .nav-symbol-img {
        width: 26px;
        height: 26px;
        opacity: 0.5;
        transition: opacity 0.15s ease;
    }

    .side-nav-item:hover .nav-symbol-img,
    .side-nav-item:focus .nav-symbol-img {
        opacity: 0.9;
    }

    .side-nav-item.active .nav-symbol-img {
        opacity: 1;
    }

    .side-nav-tooltip {
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.82);
        color: #ffffff;
        font-size: 12px;
        font-weight: 500;
        font-family: 'Source Sans 3', sans-serif;
        padding: 5px 10px;
        border-radius: 6px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s ease;
        z-index: 500;
    }

    .side-nav-item:hover .side-nav-tooltip {
        opacity: 1;
    }

    /* Hide header nav buttons — sidebar handles navigation on desktop */
    .header-left .guide-button,
    .header-left .settings-button {
        display: none;
    }

    /* Remove padding-right reserved for header buttons */
    .date-info {
        padding-right: 0 !important;
    }

    /* Ramadan theme sidebar */
    body.ramadan-mode .desktop-side-nav {
        background: rgba(255, 248, 235, 0.18);
        border-right-color: rgba(139, 105, 20, 0.15);
    }

    body.ramadan-mode .side-nav-item {
        color: rgba(139, 105, 20, 0.5);
    }

    body.ramadan-mode .side-nav-item:hover,
    body.ramadan-mode .side-nav-item:focus {
        color: #8B6914;
        background: rgba(139, 105, 20, 0.1);
    }

    body.ramadan-mode .side-nav-item.active {
        color: #8B6914;
        background: rgba(139, 105, 20, 0.12);
    }

    /* Kids theme sidebar */
    body.kids-mode .desktop-side-nav {
        background: rgba(0, 0, 0, 0.4);
        border-right-color: rgba(255, 255, 255, 0.15);
    }

    body.kids-mode .side-nav-item {
        color: rgba(255, 255, 255, 0.45);
    }

    body.kids-mode .side-nav-item:hover,
    body.kids-mode .side-nav-item:focus {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.12);
    }

    body.kids-mode .side-nav-item.active {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.18);
    }
}

/* ============================================================
   ONBOARDING MODAL
   ============================================================ */

.onboarding-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-modal.show {
    display: flex;
}

.onboarding-content {
    background: linear-gradient(160deg, rgba(26, 77, 46, 0.97) 0%, rgba(10, 35, 20, 0.99) 100%);
    border: 2px solid rgba(244, 213, 113, 0.35);
    border-radius: 24px;
    padding: 40px 36px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.35s ease-out;
}

.onboarding-arabic {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: rgba(244, 213, 113, 0.75);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.onboarding-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1) opacity(0.9);
}

.onboarding-title {
    font-family: 'Amiri', serif;
    font-size: 30px;
    color: #f4d571;
    margin-bottom: 10px;
    font-weight: 700;
}

.onboarding-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    margin-bottom: 28px;
}

.onboarding-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    position: relative;
    margin-bottom: 16px;
}

.onboarding-location-input {
    flex: 1;
    padding: 13px 16px;
    font-size: 15px;
    border: 2px solid rgba(244, 213, 113, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Source Sans 3', sans-serif;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.onboarding-location-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.onboarding-location-input:focus {
    border-color: #f4d571;
    box-shadow: 0 0 10px rgba(244, 213, 113, 0.25);
}

.onboarding-location-input.error {
    border-color: #ff6b6b;
    animation: shake 0.4s ease;
}

.onboarding-detect-btn {
    padding: 0 14px;
    border: 2px solid rgba(244, 213, 113, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4d571;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-detect-btn:hover {
    background: rgba(244, 213, 113, 0.15);
    border-color: #f4d571;
}

.onboarding-detect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.onboarding-save-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f4d571 0%, #e0c45c 100%);
    color: #1a4d2e;
    cursor: pointer;
    font-family: 'Source Sans 3', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 4px;
}

.onboarding-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 213, 113, 0.4);
}

.onboarding-save-btn:active {
    transform: translateY(0);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    60%       { transform: translateX(6px); }
    80%       { transform: translateX(-3px); }
}
