/**
 * Quran Mazid - Complete Design System & UI Components
 * Clones Quran Mazid (quranmaziid.vercel.app) aesthetics
 */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Aref+Ruqaa:wght@700&family=Amiri+Quran&family=Scheherazade+New:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Hind+Siliguri:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0a130e;
    --bg-card: #101d16;
    --bg-card-hover: #15261d;
    --bg-secondary: #132219;
    --bg-secondary-hover: #1b2f23;
    --border-color: rgba(16, 185, 129, 0.16);
    --border-hover: rgba(16, 185, 129, 0.4);
    --text-primary: #f0fdf4;
    --text-muted: #86a793;
    --text-dim: #5c7e6b;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --gold-accent: #f59e0b;
    --badge-makki: #d97706;
    --badge-makki-bg: rgba(217, 119, 6, 0.12);
    --badge-madani: #10b981;
    --badge-madani-bg: rgba(16, 185, 129, 0.12);
    --active-highlight: rgba(16, 185, 129, 0.12);
    --player-bg: rgba(16, 29, 22, 0.95);
}

[data-theme="light"] {
    --bg-main: #f6faf7;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f7f2;
    --bg-secondary: #eef5f0;
    --bg-secondary-hover: #e2ede5;
    --border-color: rgba(16, 185, 129, 0.2);
    --border-hover: rgba(16, 185, 129, 0.5);
    --text-primary: #0f291c;
    --text-muted: #4e6e5d;
    --text-dim: #7a9a89;
    --primary-color: #059669;
    --primary-hover: #047857;
    --primary-glow: rgba(5, 150, 105, 0.2);
    --gold-accent: #d97706;
    --badge-makki: #b45309;
    --badge-makki-bg: rgba(180, 83, 9, 0.12);
    --badge-madani: #059669;
    --badge-madani-bg: rgba(5, 150, 105, 0.12);
    --active-highlight: rgba(16, 185, 129, 0.15);
    --player-bg: rgba(255, 255, 255, 0.96);
}

:root .text-muted,
[data-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

[data-theme="light"] .text-muted {
    color: var(--text-muted) !important;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: 96px;
}

.offcanvas.offcanvas-start {
    max-width: 85vw !important;
    width: 320px !important;
}

.font-amiri,
.ayah-arabic-text.font-amiri,
.surah-banner-arabic.font-amiri,
.surah-bismillah-box.font-amiri {
    font-family: 'Amiri', 'Amiri Quran', serif !important;
}

.font-scheherazade,
.ayah-arabic-text.font-scheherazade,
.surah-banner-arabic.font-scheherazade,
.surah-bismillah-box.font-scheherazade {
    font-family: 'Scheherazade New', 'Amiri', serif !important;
}

.font-naskh,
.ayah-arabic-text.font-naskh,
.surah-banner-arabic.font-naskh,
.surah-bismillah-box.font-naskh {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif !important;
}

.font-bangla {
    font-family: 'Hind Siliguri', 'Outfit', sans-serif;
}

/* Watermark Calligraphy Backgrounds */
.quran-bg-watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    user-select: none;
}

.watermark-text-center {
    position: absolute;
    top: clamp(140px, 19vh, 175px);
    margin-top: 20px;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(1.4);
    width: 100vw;
    font-size: clamp(3rem, 13.5vw, 17rem);
    font-family: 'Amiri', 'Amiri Quran', 'Scheherazade New', serif;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.038;
    white-space: nowrap;
    letter-spacing: 0.03em;
    word-spacing: 0.18em;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    text-align: center;
}

[data-theme="light"] .watermark-text-center {
    opacity: 0.042;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .watermark-text-center {
        top: clamp(120px, 17vh, 150px);
        transform: translate(-50%, -50%) scaleX(1.35);
        font-size: clamp(2.8rem, 14vw, 7.5rem);
    }
}

@media (max-width: 480px) {
    .watermark-text-center {
        top: clamp(105px, 16vh, 130px);
        transform: translate(-50%, -50%) scaleX(1.28);
        font-size: clamp(2.4rem, 14.5vw, 5rem);
    }
}

.watermark-text-left,
.watermark-text-right {
    display: none !important;
}

.glow-orb-top {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.05) 50%, transparent 80%);
    border-radius: 50%;
    filter: blur(120px);
}

.glow-orb-right {
    position: absolute;
    top: 40%;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(130px);
}

/* Floating Navigation Bar */
.navbar-floating-container {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    pointer-events: none;
}

.navbar-floating-pill {
    pointer-events: auto;
    width: 100%;
    max-width: 1040px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 8px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.brand-logo-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    flex-shrink: 0;
}

#navBrandText {
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.brand-logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    font-family: 'Amiri', serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: transform 0.2s ease;
}

.brand-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px var(--primary-glow);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: inline-block;
}

.brand-logo-pill:hover .brand-logo-badge,
.brand-logo-pill:hover .brand-logo-img {
    transform: scale(1.08);
}

.nav-links-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 4px;
}

.nav-pill-item {
    padding: 6px 14px;
    border-radius: 9999px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-pill-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary-hover);
}

.nav-pill-item.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.nav-actions-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 8px;
    padding-left: 4px;
    flex-shrink: 0;
}

.btn-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

#themeToggleBtn {
    margin: 0 3px;
}

.btn-icon-circle:hover {
    background: var(--bg-secondary-hover);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.btn-lang-pill {
    padding: 6px 12px;
    border-radius: 9999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-lang-pill:hover {
    border-color: var(--border-hover);
}

/* Mobile Offcanvas Navigation Drawer */
#mobileNavDrawer {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-right: 1px solid var(--border-color) !important;
    z-index: 1060;
    max-width: 320px;
}

#mobileNavDrawer .offcanvas-header {
    border-color: var(--border-color) !important;
    padding: 16px 20px;
}

#mobileNavDrawer .offcanvas-title {
    color: var(--text-primary) !important;
    font-size: 1.15rem;
    font-weight: 700;
}

#mobileNavDrawer .drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 12px;
    color: var(--text-primary) !important;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

#mobileNavDrawer .drawer-nav-item:hover {
    background: var(--bg-secondary-hover);
    border-color: var(--border-hover);
    color: var(--primary-color) !important;
}

#mobileNavDrawer .drawer-nav-item.active {
    background: var(--primary-glow);
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    font-weight: 700;
}

#mobileNavDrawer .drawer-nav-item i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

[data-theme="dark"] #mobileNavDrawer .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="light"] #mobileNavDrawer .btn-close {
    filter: none;
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    z-index: 10;
    padding-top: 76px;
    padding-bottom: 20px;
    text-align: center;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.hero-bismillah {
    font-family: 'Amiri', serif;
    font-size: 1.85rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px var(--primary-glow);
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(180deg, var(--text-primary) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero-wrapper {
        padding-top: 72px;
        padding-bottom: 16px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .hero-title {
        font-size: 2.6rem;
        margin-bottom: 8px;
    }
    .hero-bismillah {
        font-size: 1.4rem;
        margin-top: 26px;
        margin-bottom: 6px;
    }
    .hero-sub-bengali {
        font-size: 1.15rem;
    }
    .hero-sub-english {
        font-size: 0.68rem;
        gap: 8px;
        letter-spacing: 0.12em;
    }
}

@media (max-width: 480px) {
    .hero-wrapper {
        padding-top: 68px;
        padding-bottom: 14px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-bismillah {
        font-size: 1.25rem;
        margin-top: 22px;
        margin-bottom: 6px;
    }
    .hero-sub-bengali {
        font-size: 1rem;
    }
}

.hero-sub-bengali {
    font-size: 1.35rem;
    font-weight: 600;
    font-family: 'Hind Siliguri', sans-serif;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    max-width: 100%;
}

.hero-swoosh {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 10px;
    color: var(--primary-color);
}

.hero-sub-english {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    max-width: 100%;
}

.hero-sub-english .line {
    height: 1px;
    width: 40px;
    background: linear-gradient(90deg, transparent, var(--border-color));
    flex-shrink: 1;
}

.hero-sub-english .line.right {
    background: linear-gradient(90deg, var(--border-color), transparent);
}

.hero-sub-english .dot {
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    transform: rotate(45deg);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .hero-sub-bengali {
        font-size: 1.05rem;
        padding-bottom: 8px;
    }
    .hero-sub-english {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
        gap: 6px;
        padding: 0 4px;
    }
    .hero-sub-english .line {
        width: 16px;
    }
}

/* 3D Stack / Fan Carousel */
.cards-fan-container {
    position: relative;
    max-width: 100%;
    width: 100%;
    height: 320px;
    padding-top: 28px;
    margin: 10px auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.cards-fan-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease;
}

.fan-card-item {
    width: 155px;
    height: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    user-select: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 -22px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.fan-card-item:hover,
.fan-card-item:focus,
.fan-card-item:active {
    transform: translateY(-28px) scale(1.06) rotate(0deg) !important;
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px var(--primary-glow);
    z-index: 50 !important;
}

.fan-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    position: relative;
    transition: background 0.3s;
}

.fan-card-item:hover .fan-card-inner {
    background: rgba(16, 185, 129, 0.08);
}

.fan-card-bg-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Amiri', serif;
    font-size: 3rem;
    color: var(--text-primary);
    opacity: 0.04;
    pointer-events: none;
}

.fan-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.badge-surah-num {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 9999px;
}

.fan-card-quick-play {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px var(--primary-glow);
    padding-left: 2px;
}

.fan-card-quick-play:hover {
    transform: scale(1.18);
    background: var(--primary-hover);
}

.badge-surah-origin {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Hind Siliguri', sans-serif;
}

.fan-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: auto 0;
    position: relative;
    z-index: 2;
    transition: color 0.2s;
}

.fan-card-item:hover .fan-card-arabic {
    color: var(--primary-color);
}

.fan-card-bottom {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
}

.fan-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Outfit', 'Hind Siliguri', sans-serif;
}

.fan-card-verses {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Fan Stack Responsive Rules (after base rules so media queries take precedence) */
@media (max-width: 768px) {
    .cards-fan-container {
        height: 235px;
        padding-top: 20px;
        margin: 16px auto 10px;
        overflow: visible;
    }
    .cards-fan-stack {
        transform: scale(0.96);
    }
    .fan-card-item {
        width: 110px;
        height: 165px;
        margin: 0 -12px;
    }
    .badge-surah-num,
    .badge-surah-origin,
    .fan-card-verses {
        display: none !important;
    }
    .fan-card-top {
        justify-content: center !important;
    }
    .fan-card-name {
        font-size: 0.68rem;
    }
    .fan-card-name.font-bangla {
        font-size: 0.64rem;
    }
}

@media (max-width: 576px) {
    .cards-fan-container {
        height: 205px;
        padding-top: 16px;
        margin: 12px auto 8px;
        overflow: visible;
    }
    .cards-fan-stack {
        transform: scale(0.86);
    }
    .fan-card-item {
        width: 100px;
        height: 145px;
        margin: 0 -9px;
        padding: 4px;
        border-radius: 14px;
    }
    .fan-card-inner {
        padding: 8px 3px 6px;
        border-radius: 12px;
    }
    .fan-card-arabic {
        font-size: 1.25rem;
    }
    .fan-card-bottom {
        padding-top: 4px;
    }
    .fan-card-name {
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: -0.015em;
        margin-bottom: 2px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }
    .fan-card-name.font-bangla {
        font-size: 0.54rem;
        letter-spacing: normal;
    }
    .badge-surah-num,
    .badge-surah-origin,
    .fan-card-verses {
        display: none !important;
    }
    .fan-card-top {
        justify-content: center !important;
    }
    .surah-name-en {
        font-size: 0.88rem;
    }
}

@media (max-width: 400px) {
    .cards-fan-container {
        height: 190px;
        padding-top: 12px;
        margin: 10px auto 6px;
        overflow: visible;
    }
    .cards-fan-stack {
        transform: scale(0.80);
    }
    .fan-card-item {
        width: 92px;
        height: 136px;
        margin: 0 -8px;
        padding: 3px;
        border-radius: 13px;
    }
    .fan-card-inner {
        padding: 6px 2px 4px;
    }
    .fan-card-arabic {
        font-size: 1.15rem;
    }
    .fan-card-bottom {
        padding-top: 3px;
    }
    .fan-card-name {
        font-size: 0.52rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }
    .fan-card-name.font-bangla {
        font-size: 0.48rem;
        letter-spacing: normal;
    }
    .badge-surah-num,
    .badge-surah-origin,
    .fan-card-verses {
        display: none !important;
    }
    .fan-card-top {
        justify-content: center !important;
    }
    .surah-name-en {
        font-size: 0.84rem;
    }
}

@media (max-width: 360px) {
    .fan-card-item {
        width: 84px;
        margin: 0 -7px;
    }
    .fan-card-name {
        font-size: 0.46rem;
        letter-spacing: -0.025em;
    }
    .fan-card-name.font-bangla {
        font-size: 0.43rem;
        letter-spacing: -0.015em;
    }
}

/* Central Search Input */
.hero-search-container {
    max-width: 560px;
    margin: 12px auto 18px;
    padding: 0 16px;
}

.hero-search-box {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 6px 8px 6px 18px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.hero-search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 12px 36px rgba(0, 0, 0, 0.25);
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    padding-right: 12px;
}

.hero-search-input::placeholder {
    color: var(--text-dim);
}

.hero-search-btn {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.08);
}

@media (max-width: 576px) {
    .hero-search-container {
        margin: 14px auto 20px;
        padding: 0 16px;
    }
    .hero-search-box {
        padding: 5px 6px 5px 14px;
    }
    .hero-search-input {
        font-size: 0.84rem;
        padding-right: 8px;
    }
    .hero-search-btn {
        width: 34px;
        height: 34px;
    }
}

/* Last Played Widget */
.last-played-wrapper {
    max-width: 480px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.last-played-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    gap: 14px;
}

.last-played-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px var(--primary-glow);
}

.last-played-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.last-played-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Amiri', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    padding: 0 4px;
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
}

.last-played-info {
    text-align: left;
    min-width: 0;
    flex: 1;
}

.last-played-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.last-played-badge .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

.last-played-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3px;
    font-family: 'Hind Siliguri', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-played-verse {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.last-played-playbtn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 6px 16px var(--primary-glow);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.last-played-card:hover .last-played-playbtn {
    transform: scale(1.08);
}

@media (max-width: 576px) {
    .last-played-wrapper {
        margin: 0 auto 24px;
        padding: 0 16px;
    }
    .last-played-card {
        padding: 12px 14px;
        border-radius: 18px;
        gap: 12px;
    }
    .last-played-left {
        gap: 12px;
    }
    .last-played-icon {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
        border-radius: 12px;
        padding: 0 2px;
    }
    .last-played-title {
        font-size: 0.92rem;
    }
    .last-played-verse {
        font-size: 0.7rem;
    }
    .last-played-playbtn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

/* Popular Recitations Section */
.popular-recitations-container {
    max-width: 1140px;
    margin: 0 auto 36px;
    padding: 0 16px;
}

.section-box-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

@media (max-width: 576px) {
    .popular-recitations-container {
        margin: 0 auto 26px;
        padding: 0 16px;
    }
    .section-box-container {
        padding: 18px 14px;
        border-radius: 20px;
    }
}

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

.section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.section-header-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-header-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.recitation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 992px) {
    .recitation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .recitation-grid {
        grid-template-columns: 1fr;
    }
}

.recitation-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.recitation-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.recitation-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.recitation-num-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recitation-card:hover .recitation-num-circle {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.recitation-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px var(--primary-glow);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.recitation-card:hover .recitation-play-btn {
    transform: scale(1.12);
}

.recitation-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Hind Siliguri', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recitation-reciter {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.recitation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 12px;
    font-size: 0.68rem;
    color: var(--text-dim);
}

.recitation-duration-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* Surahs / Juz / Pages Tabs & Filters */
.explorer-tabs-container {
    max-width: 1140px;
    margin: 0 auto 20px;
    padding: 0 16px;
}

.explorer-header-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.nav-main-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    overflow-x: auto;
}

.main-tab-btn {
    padding: 7px 16px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.main-tab-btn:hover {
    color: var(--text-primary);
}

.main-tab-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.filter-chips-group {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
}

.filter-chip-btn {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-chip-btn:hover {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.filter-chip-btn.active {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Surah Cards Grid */
.surah-grid-container {
    max-width: 1140px;
    margin: 0 auto 30px;
    padding: 0 16px;
}

.surah-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 992px) {
    .surah-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .surah-cards-grid {
        grid-template-columns: 1fr;
    }
}

.surah-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
}

.surah-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), 0 0 15px var(--primary-glow);
}

.surah-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.surah-num-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.surah-card:hover .surah-num-box {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.surah-card-names {
    min-width: 0;
}

.surah-name-en {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Hind Siliguri', sans-serif;
    transition: color 0.2s;
}

.surah-card:hover .surah-name-en {
    color: var(--primary-color);
}

.surah-meaning {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.surah-card-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.surah-arabic-title {
    font-family: 'Amiri', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.surah-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-origin-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.badge-origin-pill.makki {
    color: var(--badge-makki);
    background: var(--badge-makki-bg);
}

.badge-origin-pill.madani {
    color: var(--badge-madani);
    background: var(--badge-madani-bg);
}

.surah-verses-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: monospace;
}

.btn-bookmark-icon {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px;
    transition: color 0.2s;
}

.btn-bookmark-icon:hover, .btn-bookmark-icon.bookmarked {
    color: var(--primary-color);
}

/* Explore More Button */
.explore-all-btn-container {
    text-align: center;
    margin: 25px 0 40px;
}

.btn-explore-all {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.btn-explore-all:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========================================================
   SURAH READER LAYOUT & STYLES
   ======================================================== */
.reader-page-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    inset: 0;
    background: var(--bg-main);
}

/* Left Mini Sidebar */
.reader-mini-sidebar {
    width: 68px;
    height: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 16px;
    z-index: 30;
    flex-shrink: 0;
}

.mini-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.2s ease;
}

.mini-nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.mini-nav-btn.active {
    background: var(--active-highlight);
    color: var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Left Surah Navigator Panel */
.reader-nav-panel {
    width: 320px;
    height: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 25;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    overflow: hidden;
}

@media (min-width: 1025px) {
    .reader-nav-panel.closed {
        width: 0 !important;
        min-width: 0 !important;
        border-right: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 1024px) {
    .reader-nav-panel {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    .reader-nav-panel.open {
        transform: translateX(0);
    }
}

.reader-nav-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.reader-nav-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.reader-search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 12px 8px 36px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.reader-search-input:focus {
    border-color: var(--primary-color);
}

.reader-surah-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.surah-nav-item {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.surah-nav-item:hover {
    background: var(--bg-secondary);
}

.surah-nav-item.active,
.surah-nav-item.selected-surah {
    background: rgba(16, 185, 129, 0.16) !important;
    border: 1px solid var(--primary-color) !important;
    box-shadow: inset 4px 0 0 var(--primary-color), 0 3px 12px var(--primary-glow) !important;
}

.surah-nav-item.active .surah-num-box,
.surah-nav-item.selected-surah .surah-num-box,
.surah-nav-item .surah-num-box.active-num {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-color: var(--primary-color) !important;
}

.surah-nav-item.active h6,
.surah-nav-item.selected-surah h6 {
    color: var(--primary-color) !important;
    font-weight: 800 !important;
}

.surah-nav-sub {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.surah-nav-item.active .surah-nav-sub,
.surah-nav-item.selected-surah .surah-nav-sub {
    color: #ffffff !important;
    font-weight: 600;
}

[data-theme="light"] .surah-nav-sub {
    color: #475569 !important;
    font-weight: 500;
}

[data-theme="light"] .surah-nav-item.active .surah-nav-sub,
[data-theme="light"] .surah-nav-item.selected-surah .surah-nav-sub {
    color: #065f46 !important;
    font-weight: 600;
}

.badge-font-size {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    font-weight: 700 !important;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

[data-theme="light"] .badge-font-size {
    color: #ffffff !important;
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Main Reader Content Area */
.reader-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.reader-top-header {
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 20;
}

.reader-surah-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 4px 14px 4px 6px;
}

#headerSurahTitle {
    font-size: 0.88rem;
    font-weight: 700;
}

.header-surah-meaning {
    display: inline;
}

@media (max-width: 768px) {
    .reader-top-header {
        height: 50px;
        padding: 0 10px;
    }
    .reader-top-header .d-flex.gap-3 {
        gap: 8px !important;
    }
    .reader-top-header .d-flex.gap-2 {
        gap: 5px !important;
    }
    .reader-surah-badge {
        padding: 2px 8px 2px 4px;
        gap: 6px;
        max-width: 155px;
    }
    #headerSurahTitle {
        font-size: 0.75rem !important;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        max-width: 115px;
        vertical-align: middle;
        line-height: 1.2;
    }
    .header-surah-meaning {
        display: none !important;
    }
    .reader-top-header .btn-icon-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.72rem !important;
    }
    #headerQuickPlayBtn {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.6rem !important;
    }
}

@media (max-width: 400px) {
    .reader-top-header {
        height: 46px;
        padding: 0 6px;
    }
    .reader-surah-badge {
        padding: 2px 6px 2px 3px;
        gap: 4px;
        max-width: 130px;
    }
    #headerSurahTitle {
        font-size: 0.7rem !important;
        max-width: 95px;
    }
    .reader-top-header .btn-icon-circle {
        width: 25px !important;
        height: 25px !important;
        font-size: 0.65rem !important;
    }
    #headerQuickPlayBtn {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.55rem !important;
    }
}

.reader-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px 20px 140px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Surah Header Banner */
.surah-header-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px 20px;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.surah-banner-arabic {
    font-family: 'Amiri', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.surah-banner-english {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
}

.surah-banner-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.surah-bismillah-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Ayah Card & List */
.ayah-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.ayah-card.active-playing {
    border: 2px solid var(--primary-color) !important;
    background: rgba(16, 185, 129, 0.1) !important;
    box-shadow: 0 0 25px var(--primary-glow), inset 4px 0 0 var(--primary-color) !important;
}

.ayah-card.shared-highlight {
    animation: ayahSharedPulse 2s ease-in-out 3;
    border: 2px solid var(--primary-color) !important;
}

@keyframes ayahSharedPulse {
    0%, 100% {
        box-shadow: 0 0 25px var(--primary-glow), inset 4px 0 0 var(--primary-color);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 35px rgba(16, 185, 129, 0.45), inset 6px 0 0 var(--primary-color);
        transform: scale(1.008);
    }
}

.ayah-card.active-playing .ayah-number-badge {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.ayah-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.ayah-number-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

.ayah-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ayah-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-ayah-action:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.ayah-arabic-text {
    font-family: 'Amiri', 'Amiri Quran', serif;
    font-size: 25px;
    line-height: 2.2;
    text-align: right;
    direction: rtl;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.ayah-arabic-text.font-amiri {
    font-family: 'Amiri', 'Amiri Quran', serif !important;
}

.ayah-arabic-text.font-scheherazade {
    font-family: 'Scheherazade New', 'Amiri', serif !important;
}

.ayah-arabic-text.font-naskh {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif !important;
}

.ayah-translations-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ayah-translation-item {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    padding-left: 12px;
    border-left: 3px solid var(--border-color);
}

.ayah-translation-item.bangla {
    font-family: 'Hind Siliguri', sans-serif;
    border-left-color: var(--primary-color);
}

.ayah-translation-item.english {
    color: var(--text-muted);
}

.translation-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 2px;
}

/* Word By Word Breakdown */
.wbw-words-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.wbw-word-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 55px;
}

.wbw-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.wbw-trans {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: center;
}

/* Right Settings Drawer */
.reader-settings-panel {
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 25;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    overflow: hidden;
}

/* Desktop Collapse State */
@media (min-width: 1201px) {
    .reader-settings-panel.closed {
        width: 0 !important;
        min-width: 0 !important;
        border-left: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 1200px) {
    .reader-settings-panel {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        transform: translateX(100%);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    .reader-settings-panel.open {
        transform: translateX(0);
    }
}

.settings-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.setting-group-item {
    margin-bottom: 24px;
}

.setting-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-range-slider {
    width: 100%;
    accent-color: var(--primary-color);
}

.custom-select-box {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

/* ========================================================
   GLOBAL FLOATING AUDIO PLAYER BAR
   ======================================================== */
.global-audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 78px;
    background: var(--player-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.global-audio-player-bar.hidden-bar {
    transform: translateY(100%);
}

.audio-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
    min-width: 0;
}

.audio-thumb-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.audio-meta-text {
    min-width: 0;
}

.audio-surah-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Hind Siliguri', sans-serif;
}

.audio-reciter-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls Middle */
.audio-controls-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 550px;
}

.audio-buttons-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 290px;
    margin: 0 auto;
}

.audio-side-ctrls {
    display: flex;
    align-items: center;
}

.audio-side-ctrls.left {
    justify-content: flex-end;
    gap: 14px;
}

.audio-center-play {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}

.audio-side-ctrls.right {
    justify-content: flex-start;
    gap: 14px;
}

.btn-audio-ctrl.audio-speed-ctrl-inline {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    min-width: 32px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-audio-ctrl.audio-speed-ctrl-inline:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.btn-audio-ctrl {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-audio-ctrl:hover {
    color: var(--text-primary);
}

.btn-audio-ctrl.active {
    color: var(--primary-color);
}

.btn-audio-play-main {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 14px var(--primary-glow);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-audio-play-main:hover {
    transform: scale(1.08);
}

.audio-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.audio-time-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: monospace;
    min-width: 52px;
    width: auto;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.audio-seek-slider {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Audio Right Options */
.audio-extra-options {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
    justify-content: flex-end;
}

.audio-speed-btn {
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

@media (min-width: 769px) {
    .audio-speed-btn {
        display: none !important;
    }
}

.audio-vol-container {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.audio-vol-slider {
    width: 70px;
    accent-color: var(--primary-color);
}

@media (max-width: 768px) {
    .global-audio-player-bar {
        padding: 6px 14px 10px;
        height: auto;
        min-height: 64px;
        justify-content: center;
    }
    .audio-extra-options {
        display: none !important;
    }
    .audio-track-info {
        display: none !important;
    }
    .audio-controls-center {
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0 16px !important;
    }
    .audio-buttons-row {
        max-width: 280px;
        margin-bottom: 3px;
        width: 100%;
    }
    .audio-side-ctrls.left,
    .audio-side-ctrls.right {
        gap: 12px;
    }
    .audio-center-play {
        padding: 0 10px;
    }
    .btn-audio-ctrl {
        font-size: 1rem;
    }
    .btn-audio-play-main {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .audio-progress-row {
        width: 84% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        gap: 10px;
    }
    .audio-time-label {
        font-size: 0.70rem;
        min-width: 50px;
        width: auto;
        white-space: nowrap;
        text-align: center;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .global-audio-player-bar {
        padding: 6px 12px 8px;
        min-height: 62px;
    }
    .audio-buttons-row {
        max-width: 250px;
    }
    .audio-side-ctrls.left,
    .audio-side-ctrls.right {
        gap: 10px;
    }
    .audio-center-play {
        padding: 0 8px;
    }
    .btn-audio-ctrl.audio-speed-ctrl-inline {
        font-size: 0.65rem;
        padding: 1px 4px;
        height: 20px;
        min-width: 26px;
    }
    .btn-audio-ctrl {
        font-size: 0.9rem;
    }
    .btn-audio-play-main {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .audio-controls-center {
        padding: 0 8px !important;
    }
    .audio-progress-row {
        width: 80% !important;
        max-width: 275px !important;
        gap: 8px;
    }
    .audio-time-label {
        font-size: 0.68rem;
        min-width: 48px;
    }
}

/* ========================================================
   HEADER QARI CIRCLE BUTTON & DROPDOWN MENU
/* ========================================================
   HEADER QARI CIRCLE BUTTON & QARI SELECTION MODAL
   ======================================================== */
.btn-qari-header-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--primary-glow);
    flex-shrink: 0;
}

.btn-qari-header-circle:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.qari-header-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Global Qari Selection Modal */
.qari-select-modal {
    z-index: 1065 !important;
}

.qari-select-modal .modal-dialog {
    max-width: 460px;
    margin: 1.25rem auto;
}

.qari-modal-content {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card) !important;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .qari-modal-content {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}

.qari-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
}

[data-theme="light"] .qari-modal-header {
    background: #ffffff !important;
    border-bottom-color: #f1f5f9 !important;
}

.qari-modal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.qari-modal-sub {
    font-size: 0.73rem;
    display: block;
    margin-top: 1px;
}

.btn-close-modal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

[data-theme="light"] .btn-close-modal {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.qari-modal-body {
    padding: 14px 16px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-card);
}

[data-theme="light"] .qari-modal-body {
    background: #ffffff !important;
}

.qari-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Qari Item Card */
.qari-select-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

[data-theme="light"] .qari-select-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.qari-select-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary-hover);
    transform: translateY(-1px);
}

[data-theme="light"] .qari-select-card:hover {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
}

.qari-select-card.active {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 1px var(--primary-color), 0 4px 14px var(--primary-glow);
}

[data-theme="light"] .qari-select-card.active {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981, 0 4px 14px rgba(16, 185, 129, 0.15) !important;
}

.qari-card-thumb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.qari-select-card.active .qari-card-thumb {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.qari-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qari-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.qari-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="light"] .qari-card-name {
    color: #0f172a;
}

.qari-select-card.active .qari-card-name {
    color: var(--primary-color);
}

.qari-card-arabic {
    font-family: 'Amiri', serif;
    font-size: 0.82rem;
    color: var(--primary-color);
    direction: rtl;
    white-space: nowrap;
}

.qari-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

[data-theme="light"] .qari-card-meta {
    color: #64748b;
}

.qari-card-badge-active {
    display: none;
    align-items: center;
    gap: 4px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.qari-select-card.active .qari-card-badge-active {
    display: inline-flex;
}

.qari-card-radio-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 0.65rem;
}

[data-theme="light"] .qari-card-radio-icon {
    border-color: #cbd5e1;
}

.qari-select-card.active .qari-card-radio-icon {
    display: none;
}

/* Reading Settings Panel Qari Preview Button */
.qari-setting-preview-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

[data-theme="light"] .qari-setting-preview-btn {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.qari-setting-preview-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary-hover);
}

[data-theme="light"] .qari-setting-preview-btn:hover {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
}

.qari-setting-thumb {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

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

.qari-setting-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

[data-theme="light"] .qari-setting-name {
    color: #0f172a;
}

.qari-setting-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Amiri', serif;
}

.qari-setting-action-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
}

/* Mobile View Adjustments for Qari Modal */
@media (max-width: 576px) {
    .qari-select-modal .modal-dialog {
        margin: 1rem auto;
        max-width: calc(100% - 1.5rem);
        width: calc(100% - 1.5rem);
    }
    .qari-modal-content {
        border-radius: 18px !important;
        max-height: 85vh;
        border: 1px solid var(--border-color);
    }
    .qari-modal-header {
        padding: 12px 14px;
    }
    .qari-modal-header .modal-title {
        font-size: 0.92rem !important;
    }
    .qari-modal-sub {
        font-size: 0.70rem;
    }
    .qari-modal-body {
        padding: 10px 12px 16px 12px;
    }
    .qari-cards-list {
        gap: 7px;
    }
    .qari-select-card {
        padding: 8px 10px;
        gap: 10px;
        border-radius: 12px;
    }
    .qari-card-thumb {
        width: 36px;
        height: 36px;
    }
    .qari-card-name {
        font-size: 0.82rem;
    }
    .qari-card-arabic {
        font-size: 0.80rem;
    }
    .qari-card-meta {
        font-size: 0.67rem;
    }
    .qari-card-badge-active {
        font-size: 0.63rem;
        padding: 2px 6px;
    }
}

/* ========================================================
   LANDING PAGES & TABLES THEME ADAPTATION
   ======================================================== */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(16, 185, 129, 0.08) !important;
    --bs-table-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
}

.table td, .table th {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.table-hover tbody tr:hover td {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

/* ========================================================
   FLOATING PLAY STORE DOWNLOAD BUTTON
   ======================================================== */
.floating-playstore-container {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 998;
    display: flex;
    align-items: center;
    transition: bottom 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

body:has(.global-audio-player-bar:not(.hidden-bar)) .floating-playstore-container,
body.has-audio-bar .floating-playstore-container {
    bottom: 96px;
}

.floating-playstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 29, 22, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--border-color);
    border-radius: 9999px;
    padding: 6px 14px 6px 10px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 12px var(--primary-glow);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="light"] .floating-playstore-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(16, 185, 129, 0.3);
    color: #0f291c;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 0 12px rgba(16, 185, 129, 0.2);
}

.floating-playstore-btn:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
    color: var(--text-primary);
}

[data-theme="light"] .floating-playstore-btn:hover {
    color: #0f291c;
}

.playstore-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #10b981;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.floating-playstore-btn:hover .playstore-icon-wrap {
    transform: scale(1.12);
    background: rgba(16, 185, 129, 0.22);
}

.playstore-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.playstore-sub {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.playstore-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

[data-theme="light"] .playstore-title {
    color: #0f291c;
}

.playstore-close-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    z-index: 1050;
    transition: all 0.2s ease;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.playstore-close-btn::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}

.playstore-close-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .playstore-close-btn {
        width: 30px;
        height: 30px;
        font-size: 0.90rem;
        top: -10px;
        right: -10px;
    }
    .floating-playstore-container {
        bottom: 18px;
        right: 14px;
    }
    body:has(.global-audio-player-bar:not(.hidden-bar)) .floating-playstore-container,
    body.has-audio-bar .floating-playstore-container {
        bottom: 105px;
    }
    .floating-playstore-btn {
        padding: 5px 12px 5px 8px;
        gap: 8px;
    }
    .playstore-icon-wrap {
        width: 24px;
        height: 24px;
        font-size: 0.92rem;
    }
    .playstore-sub {
        font-size: 0.52rem;
    }
    .playstore-title {
        font-size: 0.75rem;
    }
}

/* ========================================================
   READING SETTINGS LANGUAGE TOGGLE (ENGLISH / BANGLA)
   ======================================================== */
.setting-lang-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 6px;
}

.btn-setting-lang {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-setting-lang:hover {
    color: var(--text-primary);
}

.btn-setting-lang.active {
    background: var(--primary-color);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

/* ========================================================
   EMERALD UTILITY BADGES & TEXT (LIGHT & DARK THEMES)
   ======================================================== */
.bg-emerald-subtle,
span.badge.bg-emerald-subtle,
.badge.bg-emerald-subtle {
    background-color: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
    color: #065f46 !important;
    font-weight: 600;
}

.text-emerald {
    color: #059669 !important;
}

[data-theme="dark"] .bg-emerald-subtle,
[data-theme="dark"] span.badge.bg-emerald-subtle,
[data-theme="dark"] .badge.bg-emerald-subtle {
    background-color: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .text-emerald {
    color: #34d399 !important;
}

/* ========================================================
   AUTOPLAY UNLOCK FLOATING PILL & PULSE ATTENTION
   ======================================================== */
@keyframes pulsePlayAttention {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(16, 185, 129, 0);
        transform: scale(1.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

.pulse-play-attention {
    animation: pulsePlayAttention 1.4s infinite !important;
}

@keyframes slideUpFadePill {
    from {
        opacity: 0;
        transform: translate(-50%, 25px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.autoplay-floating-pill {
    position: fixed;
    bottom: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.94), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    padding: 6px 14px 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    animation: slideUpFadePill 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, opacity 0.25s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

[data-theme="light"] .autoplay-floating-pill {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.38);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.autoplay-floating-pill:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.7);
}

.autoplay-floating-pill:active {
    transform: translateX(-50%) scale(0.96);
}

.autoplay-pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    padding-left: 2px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulsePlayAttention 1.4s infinite;
    flex-shrink: 0;
}

.autoplay-pill-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1;
}

[data-theme="light"] .autoplay-floating-pill .autoplay-pill-label {
    color: #064e3b;
}

@media (max-width: 480px) {
    .autoplay-floating-pill {
        bottom: 78px;
        padding: 5px 12px 5px 7px;
        gap: 6px;
    }
    .autoplay-pill-icon {
        width: 22px;
        height: 22px;
        font-size: 0.62rem;
    }
    .autoplay-pill-label {
        font-size: 0.74rem;
    }
}




