/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #0F6B3A;
    --primary-light: #1A9E55;
    --primary-dark: #0A4425;
    --primary-glow: rgba(26, 158, 85, 0.15);
    --accent: #D4AF37;
    --accent-light: #E8CA6E;
    --accent-glow: rgba(212, 175, 55, 0.2);
    --bg: #F7F5F0;
    --bg-secondary: #EFECE5;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-dark: #0B1D12;
    --text: #1A1A1A;
    --text-secondary: #555555;
    --text-muted: #999999;
    --text-on-primary: #FFFFFF;
    --border: #E5DFD5;
    --border-light: #F0ECE4;
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(15, 107, 58, 0.08);
    --radius: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Amiri', serif;
    --header-height: 60px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(15, 107, 58, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--text-on-primary);
    position: relative;
    z-index: 1;
}

.loading-icon {
    font-size: 4.5rem;
    animation: float 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.loading-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-subtitle {
    font-size: 1rem;
    opacity: 0.6;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 2.5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

.loading-spinner.small {
    width: 22px;
    height: 22px;
    border-width: 2px;
    border-color: rgba(0, 0, 0, 0.08);
    border-top-color: var(--primary);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== App Layout ===== */
.app {
    min-height: 100vh;
    min-height: 100dvh;
}

.app.hidden { display: none; }

/* ===== Header ===== */
.header {
    background: var(--bg-dark);
    color: var(--text-on-primary);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

.header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===== Buttons ===== */
.btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: inherit;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-icon:active { transform: scale(0.93); }

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.btn-text:hover { background: var(--primary-glow); }

.icon { width: 18px; height: 18px; }
.icon-sm { width: 15px; height: 15px; flex-shrink: 0; }

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--accent);
    color: var(--bg-dark);
    font-size: 0.5rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
    line-height: 1.3;
    letter-spacing: 0.03em;
}

.notification-badge.hidden { display: none; }

/* ===== Info Strip (Location + Date) ===== */
.info-strip {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 0.6rem 1.25rem;
}

.info-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.info-strip-left,
.info-strip-right {
    display: flex;
    align-items: center;
}

/* Location Pill */
.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    border: 1px solid var(--border-light);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.location-pill:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.location-pill .icon-sm {
    color: var(--primary);
    flex-shrink: 0;
}

.location-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    position: relative;
}

.location-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.2); opacity: 0; }
}

.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    transition: var(--transition);
    margin-left: 0.15rem;
}

.refresh-btn:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

.refresh-btn:active { transform: rotate(180deg); }

.icon-xs { width: 12px; height: 12px; flex-shrink: 0; }

/* Date Pill */
.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    padding: 0.3rem 0;
}

.hijri-date {
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.date-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.gregorian-date {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 1.25rem;
}

.hero-card {
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    color: var(--text-on-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -25%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(15, 107, 58, 0.35) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 1;
}

.hero-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.55;
    font-weight: 600;
}

.hero-countdown {
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

.hero-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.hero-prayer-name {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-prayer-time {
    font-size: 1.35rem;
    font-weight: 300;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

.hero-progress { position: relative; z-index: 1; }

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 1s linear;
    width: 0%;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== Good Deeds Game ===== */
.deeds-game {
    margin-top: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1.5px solid var(--border-light);
}

.deeds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.deeds-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.reset-deeds-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.reset-deeds-btn:hover {
    background: #fbe9e7;
    color: #d32f2f;
}

.reset-deeds-btn:active { transform: scale(0.9); }

/* Cute Reset Confirmation */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    animation: confirmFadeIn 0.2s ease;
}

.confirm-overlay.confirm-closing {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-overlay.confirm-closing .confirm-popup {
    transform: scale(0.9);
    opacity: 0;
}

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

.confirm-popup {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem 1.75rem 1.5rem;
    text-align: center;
    max-width: 300px;
    width: 85%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--border-light);
    animation: confirmPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

@keyframes confirmPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.confirm-emoji {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    animation: confirmWiggle 0.6s ease 0.2s;
}

@keyframes confirmWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-12deg); }
    40% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(3deg); }
}

.confirm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.confirm-msg {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.confirm-actions {
    display: flex;
    gap: 0.6rem;
}

.confirm-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.confirm-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.confirm-cancel:hover {
    background: var(--border-light);
}

.confirm-yes {
    background: #ef5350;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.25);
}

.confirm-yes:hover {
    background: #e53935;
    box-shadow: 0 4px 16px rgba(239, 83, 80, 0.35);
}

.confirm-btn:active { transform: scale(0.96); }

.deeds-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deeds-basket-icon { font-size: 1.3rem; }

.deeds-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.deeds-streak {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 100, 0, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #e65100;
}

.streak-flame { font-size: 0.85rem; }

/* Happiness / Iman Meter */
.happiness-meter {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.happiness-face {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.happiness-info { flex: 1; min-width: 0; }

.happiness-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.happiness-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.happiness-level-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.happiness-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.happiness-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, #66bb6a, #43a047, var(--accent));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.happiness-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
    border-radius: 0 4px 4px 0;
}

.happiness-xp {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Deed Buttons Grid */
.deeds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.deed-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.7rem 0.35rem;
    background: var(--bg);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.deed-btn:hover {
    border-color: var(--primary-light);
    background: var(--primary-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.deed-btn:active {
    transform: scale(0.94);
    box-shadow: none;
}

.deed-btn-icon {
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.deed-btn:active .deed-btn-icon { transform: scale(1.3); }

.deed-btn-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.deed-btn-count {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.55rem;
    font-weight: 800;
    background: var(--primary);
    color: white;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 4px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.deed-btn-count.visible { opacity: 1; transform: scale(1); }

/* Floating +1 Animation */
.deed-float {
    position: fixed;
    pointer-events: none;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    z-index: 900;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    70% { opacity: 1; transform: translateY(-50px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.8); }
}

/* Collected Deeds Log */
.deeds-log {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.deeds-log.has-items {
    max-height: 200px;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    overflow-y: auto;
}

.deed-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    animation: chipIn 0.3s ease;
    white-space: nowrap;
}

.deed-chip-icon { font-size: 0.75rem; }

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Level Up Toast */
.level-up-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--bg-dark);
    color: var(--text-on-primary);
    padding: 1.75rem 2.25rem;
    border-radius: var(--radius);
    text-align: center;
    z-index: 800;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: levelUpPop 2.2s ease forwards;
    pointer-events: none;
}

.level-up-toast::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes levelUpPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    12% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    22% { transform: translate(-50%, -50%) scale(1); }
    78% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

.level-up-emoji { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }

.level-up-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.level-up-sub {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.3rem;
    position: relative;
    z-index: 1;
}

/* ===== Tab Navigation ===== */
.tab-nav {
    display: flex;
    padding: 0 1.25rem;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    letter-spacing: 0.01em;
}

.tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-glow);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 12px rgba(15, 107, 58, 0.25);
}

.tab-content {
    display: none;
    padding: 0 1.25rem 1.5rem;
}

.tab-content.active { display: block; }

/* ===== Prayer List ===== */
.prayer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prayer-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    border: 1.5px solid var(--border-light);
    border-left: 4px solid transparent;
}

.prayer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    border-left-color: transparent;
}

.prayer-card.active {
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), var(--bg-card));
    box-shadow: var(--shadow), 0 0 0 1px rgba(212, 175, 55, 0.1);
}

.prayer-card.active:hover { border-left-color: var(--accent); }
.prayer-card.passed { opacity: 0.45; }

.prayer-card-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.prayer-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--bg-secondary);
    flex-shrink: 0;
    transition: var(--transition);
}

.prayer-card.active .prayer-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 0 4px 12px var(--accent-glow);
}

.prayer-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.prayer-arabic {
    font-family: var(--font-arabic);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.05rem;
}

.prayer-card-right { text-align: right; }

.prayer-time {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.prayer-card.active .prayer-time { color: var(--primary); }

.prayer-status {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.15rem;
}

.prayer-status.upcoming { color: var(--accent); }
.prayer-status.passed { color: var(--text-muted); }
.prayer-status.current { color: var(--primary); }

/* ===== Mosque Section ===== */
.mosque-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mosque-map {
    width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    position: relative;
    z-index: 0;
}

.mosque-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mosque-loading {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.mosque-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    box-shadow: var(--shadow-xs);
    border: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.mosque-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.mosque-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mosque-info { flex: 1; min-width: 0; }

.mosque-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mosque-address {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}

.mosque-distance {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    background: var(--primary-glow);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.mosque-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.mosque-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: var(--transition);
}

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-header .btn-icon {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-light);
}

.modal-body { padding: 1.5rem; }

/* ===== Settings ===== */
.setting-group { margin-bottom: 1.5rem; }
.setting-group:last-child { margin-bottom: 0; }

.setting-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.setting-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.setting-select.small {
    width: auto;
    min-width: 120px;
}

.setting-toggle-group { display: flex; gap: 0.5rem; }

.toggle-btn {
    flex: 1;
    padding: 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg);
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.setting-row + .setting-row {
    border-top: 1px solid var(--border-light);
}

/* ===== Toggle Switch ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    transition: var(--transition);
    border-radius: 24px;
}

.slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* ===== Utility ===== */
.hidden { display: none !important; }

/* ===========================================================
   RESPONSIVE LAYOUT
   =========================================================== */

/* ===== DESKTOP (1024px+) — Full-width two-column layout ===== */
@media (min-width: 1024px) {
    :root {
        --header-height: 64px;
    }

    body {
        background: var(--bg-secondary);
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .header-content {
        padding: 0 2.5rem;
        max-width: 1440px;
        margin: 0 auto;
    }

    .app {
        padding-top: var(--header-height);
    }

    .info-strip {
        padding: 0.6rem 2.5rem;
    }

    .info-strip-inner {
        max-width: 1440px;
        margin: 0 auto;
    }

    /* Desktop two-column grid */
    .desktop-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        max-width: 1440px;
        margin: 0 auto;
        padding: 1.5rem 2.5rem 2.5rem;
        align-items: start;
    }

    .hero-section {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-self: start;
    }

    .hero-card {
        padding: 1.5rem 1.75rem;
        border-radius: var(--radius);
    }

    .hero-prayer-name { font-size: 2rem; }
    .hero-prayer-time { font-size: 1.5rem; }
    .hero-countdown { font-size: 0.9rem; }

    .content-panel {
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .tab-nav {
        padding: 0;
        margin-bottom: 1rem;
    }

    .tab-content {
        padding: 0;
        flex: 1;
    }

    .prayer-card {
        padding: 1rem 1.25rem;
    }

    .prayer-icon {
        width: 44px;
        height: 44px;
    }

    .prayer-name { font-size: 1rem; }
    .prayer-time { font-size: 1.1rem; }

    .mosque-map { height: 300px; }

    .mosque-card { padding: 1rem 1.25rem; }

    .modal { align-items: center; }
    .modal-content {
        border-radius: var(--radius);
        max-width: 480px;
        max-height: 80vh;
    }
}

/* ===== LARGE DESKTOP (1280px+) ===== */
@media (min-width: 1280px) {
    .desktop-layout {
        gap: 2rem;
        padding: 2rem 3rem 3rem;
    }

    .hero-card { padding: 1.75rem 2rem; }
    .hero-prayer-name { font-size: 2.25rem; }
    .hero-prayer-time { font-size: 1.75rem; }
    .hero-countdown { font-size: 1rem; padding: 0.25rem 0.85rem; }

    .prayer-card { padding: 1.1rem 1.4rem; }
    .prayer-icon { width: 48px; height: 48px; font-size: 1.3rem; }
    .prayer-name { font-size: 1.05rem; }
    .prayer-time { font-size: 1.15rem; }

    .mosque-map { height: 350px; }
}

/* ===== ULTRAWIDE (1600px+) ===== */
@media (min-width: 1600px) {
    .desktop-layout {
        max-width: 1600px;
        gap: 2.5rem;
        padding: 2.5rem 4rem 3.5rem;
    }
}

/* ===== Leaflet Override ===== */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow) !important;
    border: 1px solid var(--border-light) !important;
}

.leaflet-popup-content {
    font-family: var(--font-main) !important;
    font-size: 0.82rem !important;
    margin: 0.75rem 1rem !important;
}

.leaflet-popup-content b {
    font-weight: 600;
    color: var(--primary);
}

/* ===== Azan Alert Overlay ===== */
.azan-alert {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease;
}

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

.azan-alert-content {
    background: var(--bg-dark);
    color: var(--text-on-primary);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
    animation: scaleIn 0.35s ease;
    position: relative;
    overflow: hidden;
}

.azan-alert-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(15, 107, 58, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes scaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.azan-alert-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.azan-alert-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.azan-alert-subtitle {
    font-size: 0.95rem;
    opacity: 0.65;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.azan-alert-time {
    font-size: 2.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
}

.azan-alert-btn {
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
}

.azan-alert-btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ===== Custom Scrollbar (Desktop) ===== */
@media (min-width: 1024px) {
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
}
