*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Theme variables */
:root {
	/* Dark Theme (Default) - Deep Emerald & Slate */
	--bg: #0a0f14;
	--bg-soft: rgba(16, 23, 30, 0.8);
	--card: rgba(22, 32, 42, 0.7);
	--border: rgba(45, 60, 75, 0.4);
	--text: #f0f4f8;
	--muted: #a0aec0;
	--primary: #4db6ac; /* Muted Sophisticated Teal */
	--primary-hover: #26a69a;
	--primary-contrast: #0a0f14;
	--accent: #ed8936; /* Warm Amber for hints */
	--shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
	--radius: 16px;
	--radius-lg: 24px;
	--container: 1100px;
	--glass: blur(12px);
}

@media (prefers-color-scheme: light) {
  :root { 
    /* Light Theme - Deep Mint & Sand */
	--bg: #E8F3ED; /* Very soft Mint Wash */
	--bg-soft: rgba(210, 230, 220, 0.7); 
	--card: #FFFFFF; 
	--border: rgba(29, 131, 72, 0.15); 
	--text: #1B2631; /* Charcoal Slate */
	--muted: #4A635D; 
	--primary: #107C41; /* Richer Evergreen */
	--primary-hover: #0B5D31;
	--primary-contrast: #ffffff;
	--accent: #B8860B; /* Dark Gold/Brass for contrast */
	--secondary: #90B6A6;
	--shadow: 0 12px 35px rgba(16, 124, 65, 0.1);
  }
}

/* Explicit theme overrides */
[data-theme="dark"] {
    --bg: #0a0f14; --bg-soft: rgba(16, 23, 30, 0.8); --card: rgba(22, 32, 42, 0.7); --border: rgba(45, 60, 75, 0.4); --text: #f0f4f8; --muted: #a0aec0; --primary: #4db6ac; --primary-hover: #26a69a; --primary-contrast: #0a0f14; --accent: #ed8936; --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg: #E8F3ED; 
    --bg-soft: rgba(210, 230, 220, 0.7); 
    --card: #FFFFFF; 
    --border: rgba(29, 131, 72, 0.15); 
    --text: #1B2631; 
    --muted: #4A635D; 
    --primary: #107C41; 
    --primary-hover: #0B5D31;
    --primary-contrast: #ffffff;
    --accent: #B8860B; 
    --secondary: #90B6A6;
    --shadow: 0 12px 35px rgba(16, 124, 65, 0.1);
}

* {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific overrides for glassmorphism to prevent blur lag */
.audio-player, .player-container, header {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html { 
    scroll-behavior: smooth;
    transition: background-color 0.4s ease-in-out;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Locked viewport mode for Radio tab */
body.radio-mode {
    height: 100vh;
    overflow: hidden;
}

body.radio-mode main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    overflow-y: auto; /* Allow internal scrolling if height is too small */
}

body.radio-mode .hero {
    padding: 0.5rem 0;
}

body.radio-mode .main-logo {
    width: 60px;
}

body.radio-mode .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

body.radio-mode .player {
    margin: 0;
    width: 100%;
    max-width: 650px;
}

body.radio-mode .player-container {
    padding: 1rem;
    gap: 1rem;
    border-radius: 0 0 24px 24px;
}

body.radio-mode .reciter-picture {
    width: 70px;
    height: 70px;
}

body.radio-mode .recitation-details {
    margin-bottom: 0.5rem;
}

body.radio-mode .audio-player {
    padding: 1rem;
    gap: 0.75rem;
    border-radius: 24px;
}

body.radio-mode .audio-player .icon {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

main { 
    flex: 1; 
}

main::-webkit-scrollbar { width: 6px; }
main::-webkit-scrollbar-thumb { background-color: var(--border); border-radius: 10px; }

/* Arabic Specific Font */
[lang="ar"], .arabic {
    font-family: 'Amiri', serif;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 2rem 1rem; }

/* A11y */
.skip-link { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem .75rem; background: var(--primary); color: var(--primary-contrast); border-radius: 8px; margin: .5rem; }
/* Screen reader only */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Header */
header {
    background: var(--bg-soft);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.hijri-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.hijri-date span {
    color: var(--text);
}

@media (max-width: 900px) {
    .hijri-date {
        display: none;
    }
}
.nav {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem;
}

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: .3px; }
.brand img { width: 28px; height: 28px; }

.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { 
    color: var(--muted); 
    text-decoration: none; 
    font-weight: 600; 
    padding: .5rem .8rem; 
    border-radius: 8px; 
    transition: all 0.3s ease; 
    border: 1px solid transparent; /* Reserve space for border */
}
.nav-links a[aria-current="page"], .nav-links a:hover { 
    color: var(--text); 
    background: var(--bg-soft); 
    border-color: var(--border); 
}

.nav-tools { display: flex; align-items: center; gap: .8rem; }

.social-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-right: 0.4rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    color: var(--text);
    border-color: var(--primary);
    transform: translateY(-2px);
    background: var(--card);
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000; /* Above nav-links (9999) */
}

.burger-menu span {
    width: 2rem;
    height: 0.2rem;
    background: var(--text);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-origin: center;
}

.burger-menu.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-menu.open span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.burger-menu.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Stylish Inputs and Selects */
.input, select { 
    background: var(--bg-soft); 
    border: 1px solid var(--border); 
    color: var(--text); 
    padding: .6rem 1rem; 
    border-radius: 12px; 
    outline: none; 
    box-shadow: none; 
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1); 
    appearance: none;
    -webkit-appearance: none;
    font-weight: 500;
}

select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0aec0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    cursor: pointer;
}

.input:focus, select:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(89, 225, 199, 0.15);
    background: var(--card);
}

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 54px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--secondary); border-radius: 999px; transition: .25s ease; }
.slider:before { content: ""; position: absolute; height: 24px; width: 24px; left: 2px; top: 2px; background: white; border-radius: 50%; transition: .25s ease; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(26px); }
.hero { text-align: center; padding: 2.5rem 1rem 0; position: relative; }

/* Entrance Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Upcoming Events Widget */
.upcoming-events {
    position: absolute;
    top: 0.5rem;
    left: -11rem;
    text-align: left;
    background: var(--card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 300px;
    z-index: 5;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.events-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.events-close:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.upcoming-events h3 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.event-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.event-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.event-date {
    font-size: 0.75rem;
    color: var(--muted);
}

@media (max-width: 1050px) {
    .upcoming-events {
        position: static;
        max-width: 100%;
        margin: 0 auto 2rem;
        text-align: center;
    }
    .upcoming-events h3 {
        justify-content: center;
    }
    .event-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .event-item {
        background: var(--bg-soft);
        padding: 0.5rem 0.8rem;
        border-radius: 10px;
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .event-list {
        flex-direction: column;
    }
    .event-item {
        min-width: 0;
    }
}

.main-logo { 
    width: 120px; 
    height: auto; 
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    filter: drop-shadow(0 0 25px var(--primary));
    animation: scaleIn 0.8s ease-out forwards;
    opacity: 0;
}
.tagline { 
    margin-top: 1rem; 
    color: var(--muted); 
    animation: fadeInUp 0.8s ease-out 0.1s forwards;
    opacity: 0;
}

/* Player */
.player { 
    width: 100%; 
    max-width: 860px; 
    margin: 1.5rem auto; 
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

/* Immersive/Zen Mode Styles */
body.immersive-mode {
    overflow: hidden !important;
    height: 100vh !important;
}

body.immersive-mode header,
body.immersive-mode .upcoming-events,
body.immersive-mode .tagline,
body.immersive-mode .tabs,
body.immersive-mode #reciterSelect,
body.immersive-mode [data-radios-status],
body.immersive-mode footer,
body.immersive-mode .azkar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-20px);
}

body.immersive-mode .hero {
    display: none !important;
}

.radio-status-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    display: none;
    letter-spacing: 0.5px;
}

body.immersive-mode .radio-status-name {
    display: block !important;
    opacity: 1 !important;
    animation: fadeInUp 0.5s ease-out forwards;
}

body.immersive-mode main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 85vh;
    padding-top: 0;
    margin-top: -6rem;
}

body.immersive-mode .player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 100%;
}

body.immersive-mode .reciter-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 40px rgba(0, 121, 107, 0.4);
    margin-top: 0;
    margin-bottom: 2rem;
    transform: scale(1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.immersive-mode .visualizer-container {
    margin: 2rem 0;
}

body.immersive-mode .player-container {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.immersive-mode .audio-player {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0 0 0;
    padding: 1.5rem 2.5rem;
    max-width: 600px;
}

.immersive-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: var(--glass);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.immersive-toggle:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}

.immersive-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tabs { 
    display: flex; 
    gap: 0; 
    position: relative;
    z-index: 1;
    transition: all 0.5s ease;
}
.tabs button { 
    background: var(--bg-soft); 
    color: var(--muted); 
    border: 1px solid var(--border); 
    border-bottom: none; 
    padding: .8rem 1.5rem; 
    cursor: pointer; 
    font-weight: 700; 
    border-radius: 16px 16px 0 0; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    bottom: -1px; /* Overlap the container border */
}

.tabs button:hover { 
    color: var(--text); 
    background: var(--card);
}

.tabs button.active { 
    background: var(--card); 
    color: var(--primary); 
    border-top: 3px solid var(--primary);
    border-bottom: 1px solid var(--card); /* Match card bg to hide border below */
}

/* Tab content */
.tab-content { display: none; width: 100%; }
.tab-content.active { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.player-container { 
    padding: 2rem; 
    border: 1px solid var(--border); 
    border-radius: 0 0 var(--radius-lg) var(--radius-lg); 
    background: var(--card); 
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    box-shadow: var(--shadow); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    width: 100%;
}

.radios { width: 100%; max-width: 520px; }

.radios select { 
    width: 100%; 
    font-size: 1.1rem; 
    padding: 0.8rem 1.2rem;
    border-radius: 14px;
    text-align: center;
    direction: lcl; 
}

.reciter-picture { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid var(--accent); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.reciter-picture:hover {
    transform: scale(1.05) rotate(5deg);
}
.azkar { font-size: 1.05rem; color: var(--muted); text-align: center; margin-top: .5rem; }

audio { width: 100%; max-width: 560px; }

/* Buttons */
.btn { background: var(--primary); color: var(--primary-contrast); border: none; padding: .6rem .9rem; border-radius: 10px; font-weight: 700; cursor: pointer; transition: transform .05s ease, filter .2s ease; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--primary); }

/* Custom audio player */
.audio-player { 
    display: flex;
    flex-wrap: wrap;
    align-items: center; 
    justify-content: center;
    gap: 1.5rem; 
    width: 100%; 
    max-width: 850px; 
    padding: 1.5rem; 
    border: 1px solid var(--border); 
    background: var(--card); 
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow);
    margin: 2rem auto;
    transition: all 0.3s ease;
}

.audio-player .time-display { 
    min-width: 60px; 
    display: inline-flex; 
    justify-content: center;
    align-items: center; 
    font-variant-numeric: tabular-nums; 
    font-weight: 600;
    color: var(--muted);
}

.audio-player .seek, .audio-player .volume { 
    appearance: none; 
    height: 6px; 
    background: rgba(127,143,255,.1); 
    border-radius: 999px; 
    outline: none; 
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.visualizer-container {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    margin-top: 1rem;
    pointer-events: none;
}

.v-bar {
    width: 4px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    transition: height 0.1s ease;
    min-height: 2px;
}

.audio-player .seek { 
    flex: 1;
    min-width: 150px;
}

.audio-player .volume { width: 80px; }

/* Show volume control on large screens */
@media (min-width: 971px) {
    .audio-player .volume {
        display: block !important;
        width: 100px;
    }
}

@media (max-width: 768px) {
    .audio-player {
        padding: 1rem;
        gap: 0.75rem;
    }

    .audio-player .seek {
        order: 10;
        width: 100%;
        min-width: 100%;
        margin-top: 0.5rem;
    }

    .audio-player .volume, .audio-player .rate {
        display: none;
    }
}
}

/* Range styling */
input[type="range"].seek::-webkit-slider-thumb, input[type="range"].volume::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
input[type="range"].seek::-moz-range-thumb, input[type="range"].volume::-moz-range-thumb { width: 14px; height: 14px; background: var(--primary); border: none; border-radius: 50%; }

@media (max-width: 768px) {
    .nav {
        flex-direction: row; 
        padding: 0.8rem 1rem;
        align-items: center;
        justify-content: space-between;
    }
    
    .burger-menu {
        display: flex;
        order: 3;
    }

    .nav-tools {
        order: 2;
        gap: 0.5rem;
    }

    .social-links {
        margin-right: 0;
    }
    
    .social-link {
        width: 30px;
        height: 30px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }

    .nav-links {
        display: flex; 
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px;
        background: var(--bg-soft);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 5rem;
        align-items: center;
        gap: 0.5rem;
        z-index: 9999;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        transform: translateX(101%);
        border-left: 1px solid var(--border);
        visibility: hidden;
    }

    .nav-links.open {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 90%;
        padding: 1.2rem;
        text-align: center;
        border-bottom: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 0.25rem;
        background: var(--bg-soft);
        color: var(--text);
    }

    .nav-links.open a {
        opacity: 1;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a[aria-current="page"] {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    }

    .hero {
        padding: 2rem 1rem 0;
    }

    .main-logo {
        width: 100px;
    }

    .player-container {
        padding: 1.25rem 1rem;
        border-radius: 0 0 24px 24px;
        gap: 1rem;
    }

    .reciter-picture {
        width: 80px;
        height: 80px;
    }

    .audio-player {
        padding: 1rem;
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .audio-player .seek {
        order: 10;
        width: 100%;
        min-width: 100%;
        margin-top: 0.5rem;
    }

    .audio-player .volume, .audio-player .rate {
        display: none;
    }

    .audio-player .icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    body.radio-mode {
        height: auto;
        overflow: visible;
    }
    
    body.radio-mode main {
        height: auto;
        justify-content: flex-start;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 80px;
    }
    .hero p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .player-container {
        padding: 0.75rem 0.5rem;
        border-radius: 0 0 24px 24px;
    }
    .recitation-details {
        margin-bottom: 0.5rem;
    }
    .reciter-picture {
        width: 70px;
        height: 70px;
    }
    .audio-player {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .audio-player .icon {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    .audio-player .controls {
        gap: 0.75rem;
    }
}

/* Footer */
footer { 
    text-align: center; 
    padding: 0.5rem 1rem; 
    border-top: 1px solid var(--border); 
    background: var(--bg-soft);
    margin-top: auto;
    position: relative;
    backdrop-filter: blur(8px);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Prayer page cards (moved from inline CSS) */
.card-container { padding: 3rem 1rem; max-width: 920px; margin: 0 auto; }
.card { padding: 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card h1 { font-size: 1.3rem; margin: 0 0 12px; letter-spacing: .2px; }
.sub { margin: 0 0 16px; opacity: .8; }

.row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.row > div { background: var(--bg-soft); border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
small { opacity: .8; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.time { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.time h3 { margin: 0 0 6px; font-size: .95rem; }
.muted { opacity: .75; }
.footer-note { margin-top: 10px; opacity: .85; font-size: .9rem; }

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .row { grid-template-columns: 1fr; }
  .player { margin: 1rem auto; }
}

/* Quran Reading Page */
.quran-page { display: grid; grid-template-columns: 320px 1fr; gap: 0; padding: 0; max-width: 100%; }

.surah-list { background: var(--bg-soft); border-right: 1px solid var(--border); height: calc(100vh - 60px); overflow-y: auto; position: sticky; top: 60px; }
.surah-list-header { padding: 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-soft); z-index: 5; }
.surah-list-header h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.filter-tabs { display: flex; gap: .35rem; }
.filter-tabs button { flex: 1; background: var(--bg); border: 1px solid var(--border); padding: .4rem .5rem; border-radius: 8px; font-size: .85rem; cursor: pointer; transition: .2s ease; font-weight: 600; }
.filter-tabs button.active, .filter-tabs button:hover { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }

.surahs { padding: .5rem; }
.surah-item { padding: .75rem; margin-bottom: .35rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: .2s ease; background: var(--bg); }
.surah-item:hover { background: var(--card); border-color: var(--primary); }
.surah-item.active { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.surah-item .surah-number { font-weight: 700; color: var(--muted); font-size: .85rem; }
.surah-item.active .surah-number { color: rgba(255,255,255,.75); }
.surah-item .surah-name { font-weight: 600; margin: .25rem 0; }
.surah-item .surah-detail { font-size: .8rem; opacity: .75; }

.quran-content { padding: 2rem; max-width: 1100px; margin: 0 auto; min-height: calc(100vh - 120px); }
.content-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border); }
.surah-info h1 { margin: 0 0 .5rem; font-size: 2rem; }
.surah-info .muted { margin: 0; font-size: .95rem; }
.content-controls { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.content-controls label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }

.loading { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.spinner { width: 50px; height: 50px; border: 4px solid var(--border); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.ayah-container { display: flex; flex-direction: column; gap: 1.5rem; }
.ayah { padding: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; transition: .2s ease; }
.ayah:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(43,59,224,.12); }
.ayah-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.ayah-number { font-weight: 700; color: var(--primary); font-size: .95rem; background: rgba(43,59,224,.1); padding: .35rem .75rem; border-radius: 8px; }
.ayah-arabic { font-size: 1.9rem; line-height: 2.6; text-align: right; direction: rtl; font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif; margin-bottom: 1rem; color: var(--text); font-weight: 400; }
.ayah-translation { color: var(--muted); line-height: 1.8; font-size: 1.05rem; padding-top: .5rem; }
.ayah-translation.hidden { display: none; }
.ayah-tafseer { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 1rem; margin-top: 1rem; border-radius: 8px; color: var(--muted); line-height: 1.75; font-size: .95rem; }
.ayah-tafseer.hidden { display: none; }
.ayah-tafseer-title { font-weight: 700; color: var(--text); margin-bottom: .5rem; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.ayah-tafseer-title::before { content: "📖"; }

.ayah-container.size-small .ayah-arabic { font-size: 1.5rem; line-height: 2.3; }
.ayah-container.size-medium .ayah-arabic { font-size: 1.9rem; line-height: 2.6; }
.ayah-container.size-large .ayah-arabic { font-size: 2.4rem; line-height: 3; }
.ayah-container.size-xlarge .ayah-arabic { font-size: 2.9rem; line-height: 3.5; }

.bismillah { text-align: center; font-size: 2.5rem; font-family: 'Amiri', serif; color: var(--text); margin: 2rem 0; padding: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; direction: rtl; }

.pagination { display: flex; gap: 1rem; justify-content: center; margin: 2rem 0; padding-top: 2rem; border-top: 1px solid var(--border); }

/* ========== Visual Map Page ========== */
.map-page .page-header { text-align: center; margin: 3rem 0; }
.map-page .page-header h2 { font-size: 2.5rem; margin-bottom: .5rem; }
.map-page .page-header p { color: var(--muted); font-size: 1.1rem; }

.map-controls { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.map-btn { background: var(--card); color: var(--text); border: 2px solid var(--border); padding: .75rem 1.5rem; border-radius: var(--radius); font-size: 1rem; font-weight: 500; cursor: pointer; transition: all .2s; }
.map-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.map-btn.active { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }

.map-view { display: none; animation: fadeIn .4s; }
.map-view.active { display: block; }

.view-header { text-align: center; margin: 2rem 0 1rem; }
.view-header h3 { font-size: 1.8rem; margin-bottom: .5rem; }
.view-header p { color: var(--muted); }

/* Timeline View */
.timeline-legend { display: flex; gap: 2rem; justify-content: center; margin: 1rem 0; }
.legend-item { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: var(--muted); }
.legend-item .dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-item .dot.meccan { background: #10b981; }
.legend-item .dot.medinan { background: #3b82f6; }

.visualization-container { background: var(--card); border-radius: var(--radius-lg); padding: 2rem; min-height: 400px; margin: 2rem 0; box-shadow: var(--shadow); }

#timeline-svg { display: block; margin: 0 auto; }
.timeline-dot { cursor: pointer; transition: r .2s; }
.timeline-dot:hover { r: 8; }

/* Heat Map View */
.heatmap-legend { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; color: var(--muted); font-size: .9rem; }
.gradient-bar { width: 200px; height: 20px; background: linear-gradient(to right, hsl(200, 70%, 60%), hsl(160, 70%, 50%), hsl(120, 70%, 40%)); border-radius: 4px; }

#heatmap-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; padding: 2rem; }
.heatmap-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .85rem; font-weight: 600; color: white; cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.heatmap-cell:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 1; }

/* Juz View */
#juz-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; padding: 2rem; }
.juz-card { background: var(--bg-soft); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: all .2s; }
.juz-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.juz-number { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.juz-info { display: flex; gap: 1.5rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.juz-stat { display: flex; flex-direction: column; gap: .25rem; }
.juz-stat .label { font-size: .85rem; color: var(--muted); }
.juz-stat .value { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.juz-surahs { display: flex; flex-wrap: wrap; gap: .5rem; }
.juz-surah { background: var(--card); padding: .4rem .7rem; border-radius: 6px; font-size: .85rem; font-weight: 500; border: 1px solid var(--border); cursor: pointer; transition: all .2s; }
.juz-surah:hover { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }

/* Statistics View */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow); transition: all .2s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(0,0,0,.15); }
.stat-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: .5rem 0; }
.stat-label { font-size: 1rem; color: var(--muted); font-weight: 500; }

.charts-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin: 3rem 0; }
.chart-card { background: var(--card); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.chart-card h4 { margin-bottom: 1.5rem; font-size: 1.25rem; color: var(--text); }

.bar-chart { display: flex; flex-direction: column; gap: 1rem; }
.bar-item { display: grid; grid-template-columns: 120px 1fr 120px; gap: 1rem; align-items: center; }
.bar-label { font-size: .9rem; font-weight: 500; color: var(--text); }
.bar-bg { background: var(--bg-soft); height: 32px; border-radius: 6px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 6px; transition: width .6s ease; }
.bar-fill.meccan { background: linear-gradient(to right, #10b981, #059669); }
.bar-fill.medinan { background: linear-gradient(to right, #3b82f6, #2563eb); }
.bar-fill.length { background: linear-gradient(to right, var(--primary), var(--accent)); }
.bar-value { font-size: .85rem; font-weight: 600; color: var(--muted); text-align: right; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 920px) {
  .quran-page { grid-template-columns: 1fr; }
  .surah-list { position: relative; height: auto; max-height: 350px; top: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .quran-content { padding: 1.5rem 1rem; }
  .content-controls { flex-direction: column; align-items: stretch; gap: .75rem; }
  .content-controls > * { width: 100%; }
  .content-controls select { padding: .6rem; }
  .ayah { padding: 1rem; }
  .bismillah { font-size: 2rem; padding: 1rem; }
  
  /* Map page responsive */
  .map-controls { gap: .75rem; }
  .map-btn { padding: .6rem 1rem; font-size: .9rem; }
  .map-page .page-header h2 { font-size: 2rem; }
  #heatmap-container { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
  #juz-container { grid-template-columns: 1fr; }
  .charts-container { grid-template-columns: 1fr; }
  .bar-item { grid-template-columns: 100px 1fr 100px; gap: .5rem; font-size: .85rem; }
}

/* ========== Dhikr Reminder System ========== */
.dhikr-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 450px;
  width: calc(100% - 40px);
  max-height: calc(100vh - 120px);
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  transform: translateX(500px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.dhikr-notification::-webkit-scrollbar {
  width: 6px;
}

.dhikr-notification::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

.dhikr-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.dhikr-notification-content {
  padding: 2rem;
  position: relative;
}

.dhikr-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.dhikr-close:hover {
  background: var(--bg-soft);
  color: var(--text);
  transform: rotate(90deg);
}

.dhikr-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.dhikr-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.dhikr-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-weight: 700;
  direction: rtl;
}

.dhikr-transliteration {
  font-size: 0.95rem;
  text-align: center;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.dhikr-translation {
  font-size: 1rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.5;
  font-weight: 500;
}

.dhikr-benefit {
  background: var(--bg-soft);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
}

.dhikr-hadith {
  background: var(--bg-soft);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  border-left: 3px solid var(--primary);
  font-style: italic;
}

.dhikr-counter {
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  color: white;
}

.counter-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-right: 0.5rem;
}

.counter-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.dhikr-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.dhikr-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  flex: 1;
}

.dhikr-btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}

.dhikr-btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 59, 224, 0.3);
}

.dhikr-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.dhikr-btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 2px solid var(--border);
}

.dhikr-btn-secondary:hover {
  border-color: var(--primary);
  background: var(--card);
}

/* Floating Settings Button */
.dhikr-settings-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(43, 59, 224, 0.4);
  z-index: 9999;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dhikr-settings-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 6px 30px rgba(43, 59, 224, 0.6);
}

.dhikr-settings-btn:active {
  transform: scale(0.95);
}

/* Settings Panel */
.dhikr-settings-panel {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 9998;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dhikr-settings-panel.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.dhikr-settings-content {
  padding: 1.5rem;
}

.dhikr-settings-content h3 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.25rem;
  text-align: center;
}

.setting-item {
  margin-bottom: 1.25rem;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}

.setting-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.setting-label span {
  flex: 1;
}

.setting-select {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.setting-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ========== Quran Recitations ========== */
.recitations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
}

.reciter-selector {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.reciter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.label-icon {
  font-size: 1.5rem;
}

.reciter-dropdown {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.reciter-dropdown:hover {
  border-color: var(--primary);
}

.reciter-dropdown:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 59, 224, 0.1);
}

.reciter-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reciter-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  direction: rtl;
}

.reciter-style {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 500;
}

.surah-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.surah-search {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s;
}

.surah-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 59, 224, 0.1);
}

.surah-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.surah-list-container {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.surah-card {
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.surah-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.surah-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.surah-card:hover::before {
  transform: scaleY(1);
}

.surah-card.playing {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-soft) 0%, rgba(89, 225, 199, 0.1) 100%);
  box-shadow: 0 4px 20px rgba(89, 225, 199, 0.3);
}

.surah-card.playing::before {
  transform: scaleY(1);
  background: var(--accent);
}

.surah-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.surah-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.surah-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
}

.surah-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.surah-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  direction: rtl;
}

.surah-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.surah-type {
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.surah-type.meccan {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.surah-type.medinan {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.surah-ayahs {
  color: var(--muted);
  font-weight: 500;
}

.play-surah-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-surah-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(43, 59, 224, 0.4);
}

.play-surah-btn:active {
  transform: scale(0.95);
}

.play-surah-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.play-icon {
  display: inline-block;
  line-height: 1;
}

@keyframes pulse-playing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.surah-card.playing .play-icon {
  animation: pulse-playing 1.5s infinite;
}


.setting-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.setting-actions .dhikr-btn {
  flex: 1;
  padding: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .dhikr-notification {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
    width: calc(100% - 20px);
    max-height: calc(100vh - 90px);
  }
  
  .dhikr-notification-content {
    padding: 1.5rem;
  }
  
  .dhikr-arabic {
    font-size: 1.5rem;
  }
  
  .dhikr-actions {
    flex-direction: column;
  }
  
  .dhikr-settings-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .dhikr-settings-panel {
    bottom: 80px;
    right: 10px;
    left: 10px;
    width: calc(100% - 20px);
  }
  
  /* Recitations responsive */
  .surah-grid {
    grid-template-columns: 1fr;
  }
  
  .surah-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .surah-search {
    min-width: 100%;
  }
  
  .surah-filters {
    flex-wrap: wrap;
  }
  
  .filter-btn {
    flex: 1;
  }
}

