/* ==========================================================================
   TANZEEL QUR'AN STUDIO - DEDICATED MEDIA PLAYER STYLESHEET
   Unified 3-Panel Architecture (Inspired by YouTube Music & Spotify Desktop)
   ========================================================================== */

/* --- 1. Global Page Scoping & Typography --- */
body.recitation-page {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: var(--tz-cream, #FAF7F2);
    color: var(--tz-dark-navy, #2F4858);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.recitation-page h1,
body.recitation-page h2,
body.recitation-page h3,
body.recitation-page h4,
body.recitation-page h5,
body.recitation-page h6,
body.recitation-page button,
body.recitation-page input,
body.recitation-page select,
body.recitation-page textarea,
body.recitation-page .nav-link,
body.recitation-page .mobile-nav-link,
body.recitation-page .cta-main,
body.recitation-page .cta-small {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -0.01em;
}

body.recitation-page .font-arabic,
body.recitation-page .bismillah-calligraphy,
body.recitation-page .ayah-arabic-text,
body.recitation-page .ayah-end-sign,
body.recitation-page .player-surah-arabic,
body.recitation-page .surah-item-arabic,
body.recitation-page .bar-surah-arabic,
body.recitation-page .modal-surah-arabic {
    font-family: 'Amiri', 'Scheherazade New', serif !important;
}

/* --- 2. Top Hero & Container --- */
body.recitation-page .recitation-hero-section {
    padding: clamp(98px, 7.5vw, 116px) 0 6px !important;
    background-color: var(--tz-cream, #FAF7F2);
    position: relative;
    overflow: hidden;
}

.recitation-page .studio-container {
    width: calc(100% - 32px) !important;
    max-width: 2200px !important;
    margin: 0 auto;
    padding: 0 !important;
    box-sizing: border-box;
    position: relative;
}

/* Slide-Out Drawer Backdrop (YouTube Music Mobile/Tablet Experience) */
.studio-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 33, 43, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 490;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.studio-drawer-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* --- 3. UNIFIED STUDIO APP SHELL (One Single Media Box) --- */
body.recitation-page .quran-studio-layout {
    display: grid !important;
    grid-template-columns: 320px minmax(0, 1fr) 350px !important;
    grid-template-rows: 1fr !important; /* CRITICAL: 1fr eliminates dead 2nd row space completely */
    height: clamp(620px, calc(100vh - 215px), 880px) !important;
    gap: 0 !important; /* Unified single box: zero gaps between columns */
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 6px auto 10px !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    border-radius: 18px !important;
    border: 1px solid rgba(47, 72, 88, 0.12) !important;
    box-shadow: 0 16px 48px rgba(47, 72, 88, 0.08), 0 2px 8px rgba(47, 72, 88, 0.03) !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
    scroll-margin-top: 104px !important;
    transition: grid-template-columns 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Collapsed Sidebar States on Desktop (YouTube Music style) */
body.recitation-page .quran-studio-layout.surahs-collapsed {
    grid-template-columns: 0px minmax(0, 1fr) 350px !important;
}

body.recitation-page .quran-studio-layout.qaris-collapsed {
    grid-template-columns: 320px minmax(0, 1fr) 0px !important;
}

body.recitation-page .quran-studio-layout.surahs-collapsed.qaris-collapsed {
    grid-template-columns: 0px minmax(0, 1fr) 0px !important;
}

/* Immersive / Full-Screen Quran Mode */
body.recitation-page .quran-studio-layout.is-immersive {
    grid-template-columns: 1fr !important;
    max-width: 1360px !important;
    margin: 6px auto 10px !important;
}

body.recitation-page .quran-studio-layout.is-immersive .studio-surahs-column,
body.recitation-page .quran-studio-layout.is-immersive .studio-qaris-column {
    display: none !important;
}

body.recitation-page .quran-studio-layout.is-immersive .studio-door-pull-tab {
    display: none !important;
}

/* --- 4. LEFT COLUMN: SURAHS PLAYLIST (114 SURAHS) --- */
body.recitation-page .studio-surahs-column {
    background: #F9FAFB !important;
    border-right: 1px solid rgba(47, 72, 88, 0.09) !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: opacity 0.3s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.32s ease !important;
}

body.recitation-page .quran-studio-layout.surahs-collapsed .studio-surahs-column {
    opacity: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    border-width: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.studio-surahs-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.09);
    background: #F4F5F8;
    flex-shrink: 0;
}

.studio-surahs-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.09);
    background: #F4F5F8;
    flex-shrink: 0;
}

/* Column Header Titles Declutter (User feedback: remove column headers in full view) */
body.recitation-page .studio-surahs-title-wrap,
body.recitation-page .studio-qaris-title-wrap {
    display: none !important;
}

@media (min-width: 1151px) {
    body.recitation-page .studio-surahs-heading-row,
    body.recitation-page .studio-qaris-heading-row {
        display: none !important;
    }
    body.recitation-page .studio-surahs-header {
        padding: 12px 14px 8px !important;
    }
    body.recitation-page .studio-qaris-header {
        padding: 12px 14px 8px !important;
    }
}

@media (max-width: 1150px) {
    body.recitation-page .studio-surahs-heading-row {
        display: flex !important;
        justify-content: flex-end !important;
        margin-bottom: 6px !important;
    }
    body.recitation-page .studio-qaris-heading-row {
        display: flex !important;
        justify-content: flex-end !important;
        margin-bottom: 6px !important;
    }
}

.studio-surahs-heading-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
}

.studio-surah-search-box {
    position: relative;
    margin-bottom: 8px;
}

.studio-surah-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tz-text-muted, #7A8B99);
    pointer-events: none;
}

.studio-surah-search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: #FFFFFF;
    border: 1px solid rgba(47, 72, 88, 0.12);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--tz-dark-navy, #2F4858);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
}

.studio-surah-search-box input:focus {
    border-color: var(--tz-pink, #E93E7D);
    box-shadow: 0 0 0 3px rgba(233, 62, 125, 0.12);
}

.studio-surah-filter-chips {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.surah-filter-tab {
    background: #FFFFFF;
    border: 1px solid rgba(47, 72, 88, 0.12);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--tz-text-muted, #7A8B99);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.surah-filter-tab:hover {
    color: var(--tz-dark-navy, #2F4858);
    border-color: rgba(47, 72, 88, 0.22);
}

.surah-filter-tab.is-active {
    background: var(--tz-dark-navy, #2F4858);
    color: #FFFFFF;
    border-color: var(--tz-dark-navy, #2F4858);
}

.studio-surahs-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 72, 88, 0.15) transparent;
}

.studio-surah-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.studio-surah-row:hover {
    background: rgba(47, 72, 88, 0.04);
}

.studio-surah-row.is-active {
    background: rgba(233, 62, 125, 0.08);
    border-color: rgba(233, 62, 125, 0.2);
}

.studio-surah-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.studio-surah-number-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(47, 72, 88, 0.06);
    color: var(--tz-dark-navy, #2F4858);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    flex-shrink: 0;
}

.studio-surah-row.is-active .studio-surah-number-badge {
    background: var(--tz-pink, #E93E7D);
    color: #FFFFFF;
}

.studio-surah-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.studio-surah-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tz-dark-navy, #2F4858);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-surah-row.is-active .studio-surah-name {
    color: var(--tz-pink, #E93E7D);
    font-weight: 700;
}

.studio-surah-meta {
    font-size: 0.72rem;
    color: var(--tz-text-muted, #7A8B99);
}

.studio-surah-arabic-name {
    font-family: 'Amiri', serif !important;
    font-size: 1.15rem;
    color: var(--tz-dark-navy, #2F4858);
    direction: rtl;
    flex-shrink: 0;
    margin-left: 6px;
}

.studio-surah-row.is-active .studio-surah-arabic-name {
    color: var(--tz-pink, #E93E7D);
}

/* --- 5. CENTER COLUMN: QUR'AN RECITATION & TRANSLATION STAGE --- */
body.recitation-page .studio-center-stage {
    background: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.recitation-page .studio-center-stage .main-player-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.recitation-page .studio-center-stage .tanzeel-player-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Single-Row Unified Toolbar Header */
.player-top-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.09);
    margin-bottom: 0;
    background: #FAFBFC;
    flex-shrink: 0;
    gap: 14px;
}

.player-current-surah-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.player-surah-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-surah-pill {
    background: var(--tz-dark-navy, #2F4858);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.player-surah-heading {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--tz-dark-navy, #2F4858);
    margin: 0 !important;
    line-height: 1.2;
    white-space: nowrap;
}

.player-surah-arabic {
    font-family: 'Amiri', serif !important;
    font-size: 1.4rem;
    color: var(--tz-pink, #E93E7D);
    direction: rtl;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.player-top-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.studio-door-pull-tab {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.14);
    background: #FFFFFF;
    color: var(--tz-dark-navy, #2F4858);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quran-studio-layout.qaris-collapsed .studio-door-pull-tab {
    display: inline-flex;
}

.studio-door-pull-tab:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.04);
}

.mushaf-quick-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mushaf-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.12);
    background: #FFFFFF;
    color: var(--tz-dark-navy, #2F4858);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mushaf-tool-btn:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.04);
}

.mushaf-tool-btn.is-active {
    background: var(--tz-pink, #E93E7D);
    border-color: var(--tz-pink, #E93E7D);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(233, 62, 125, 0.25);
}

.mushaf-font-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(47, 72, 88, 0.12);
    border-radius: 999px;
    background: #FFFFFF;
    overflow: hidden;
}

.mushaf-font-btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--tz-dark-navy, #2F4858);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mushaf-font-btn:hover {
    background: rgba(233, 62, 125, 0.08);
    color: var(--tz-pink, #E93E7D);
}

.mushaf-font-btn:first-child {
    border-right: 1px solid rgba(47, 72, 88, 0.08);
}

/* Mobile More Options (...) Overflow Dropdown */
.mushaf-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mushaf-more-btn {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    cursor: pointer;
}

.mushaf-more-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1B2832;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 175px;
    z-index: 650;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mushaf-more-dropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mushaf-more-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mushaf-more-dropdown .mushaf-font-group {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.mushaf-more-dropdown .mushaf-font-btn {
    color: #FFFFFF !important;
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
}

.mushaf-more-dropdown .mushaf-font-btn:hover {
    background: rgba(233, 62, 125, 0.3) !important;
    color: #FFFFFF !important;
}

.mushaf-more-dropdown .mushaf-font-btn:first-child {
    border-right-color: rgba(255, 255, 255, 0.15) !important;
}

.mushaf-more-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.mushaf-more-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease;
}

.mushaf-more-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tz-pink, #E93E7D);
}

.player-badges-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.repetition-badge {
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink, #E93E7D);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    display: none;
}

/* Embedded Mushaf Reading Canvas */
body.recitation-page .mushaf-embedded-box {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 16px 36px 24px !important;
    box-sizing: border-box !important;
}

.mushaf-bismillah-banner {
    flex-shrink: 0;
    text-align: center;
    padding: 4px 0 12px;
    border-bottom: 1px dashed rgba(47, 72, 88, 0.09);
    margin-bottom: 12px;
}

.bismillah-calligraphy {
    font-family: 'Amiri', serif !important;
    font-size: 1.8rem;
    color: var(--tz-dark-navy, #2F4858);
    direction: rtl;
    line-height: 1.3;
}

.mushaf-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 12px 24px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 72, 88, 0.16) transparent;
}

.mushaf-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--tz-text-muted, #7A8B99);
    font-size: 0.92rem;
}

/* Ayah Block */
.mushaf-ayah-card {
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 12px;
    background: #FAFBFD;
    border: 1px solid rgba(47, 72, 88, 0.07);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.mushaf-ayah-card:hover {
    background: #FFFFFF;
    border-color: rgba(233, 62, 125, 0.28);
    box-shadow: 0 4px 14px rgba(47, 72, 88, 0.05);
}

.mushaf-ayah-card.is-active-ayah {
    background: #FFF9FA;
    border-color: var(--tz-pink, #E93E7D);
    box-shadow: 0 4px 20px rgba(233, 62, 125, 0.12);
}

.ayah-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    direction: ltr;
}

.ayah-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tz-text-muted, #7A8B99);
    background: rgba(47, 72, 88, 0.05);
    padding: 2px 8px;
    border-radius: 999px;
}

.mushaf-ayah-card.is-active-ayah .ayah-badge-pill {
    background: var(--tz-pink, #E93E7D);
    color: #FFFFFF;
}

.ayah-speaker-badge {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tz-pink, #E93E7D);
}

.mushaf-ayah-card.is-active-ayah .ayah-speaker-badge {
    display: inline-flex;
}

.ayah-arabic-wrap {
    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

.ayah-arabic-text {
    font-family: 'Amiri', 'Scheherazade New', serif !important;
    font-size: 1.85rem;
    line-height: 2.4;
    color: var(--tz-dark-navy, #2F4858);
    display: inline;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv01", "cv02", "liga", "mkmk", "mark";
}

/* ==========================================================================
   VISUAL QURAN TAJWEED READER: DAR AL-MA'RIFAH STANDARD COLOR CODING
   ========================================================================== */

/* Qalqalah (Echoing / Bouncing): Light Blue (#26BFFD) */
.tajweed-q {
    color: #26BFFD !important;
}

/* Ghunnah (Nasalization in Noon/Meem): Emerald Green (#169200) */
.tajweed-g {
    color: #169200 !important;
}

/* Ikhfa' (Concealment) & Alif Khanjariyyah: Warm Orange (#FC8400) */
.tajweed-f,
.tajweed-w,
.tajweed-k,
.tajweed-n {
    color: #FC8400 !important;
}

/* Idgham (Merging): Olive Green (#537E34) */
.tajweed-i,
.tajweed-a,
.tajweed-u,
.tajweed-d,
.tajweed-j,
.tajweed-b {
    color: #537E34 !important;
}

/* Madd Compulsory / Lazim (6 Harakat): Deep Royal Blue (#0D5CA4) */
.tajweed-m {
    color: #0D5CA4 !important;
}

/* Madd Permissible / Munfasil (4-5 Harakat): Rich Purple (#7B1FA2) */
.tajweed-o {
    color: #7B1FA2 !important;
}

/* Madd 'Arid lis-Sukoon / Prolongation (2, 4, 6 Harakat): Coral Red (#D32F2F) */
.tajweed-p {
    color: #D32F2F !important;
}

/* Silent Letters, Hamzat ul-Wasl, Lam Shamsiyyah: Soft Grey (#888888) */
.tajweed-h,
.tajweed-s,
.tajweed-l,
.tajweed-e {
    color: #888888 !important;
    opacity: 0.75;
}

.mushaf-ayah-card.is-active-ayah .ayah-arabic-text {
    font-weight: 700;
}

/* Plain Mode: When Tajweed toggle is switched off */
.mushaf-embedded-box.plain-script [class*="tajweed-"] {
    color: inherit !important;
    opacity: 1 !important;
}

/* Tajweed Legend Bar */
.tajweed-legend-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 16px;
    background: #F8FAFC;
    border-bottom: 1px solid rgba(47, 72, 88, 0.07);
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 0.76rem;
    color: var(--tz-dark-navy, #2F4858);
}
.tajweed-legend-bar::-webkit-scrollbar {
    display: none;
}
.tajweed-legend-title {
    font-weight: 700;
    color: var(--tz-pink, #E93E7D);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.68rem;
    white-space: nowrap;
}
.tajweed-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-weight: 600;
}
.tajweed-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.tajweed-legend-dot.dot-q { background-color: #26BFFD; }
.tajweed-legend-dot.dot-g { background-color: #169200; }
.tajweed-legend-dot.dot-f { background-color: #FC8400; }
.tajweed-legend-dot.dot-i { background-color: #537E34; }
.tajweed-legend-dot.dot-m { background-color: #0D5CA4; }
.tajweed-legend-dot.dot-o { background-color: #7B1FA2; }
.tajweed-legend-dot.dot-p { background-color: #D32F2F; }
.tajweed-legend-dot.dot-s { background-color: #888888; }

.tajweed-legend-guide-btn {
    margin-left: auto;
    background: rgba(233, 62, 125, 0.08);
    color: var(--tz-pink, #E93E7D);
    border: none;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}
.tajweed-legend-guide-btn:hover {
    background: rgba(233, 62, 125, 0.16);
}

/* ==========================================================================
   TAJWEED RULES POP-UP GUIDE MODAL / MOBILE BOTTOM SHEET
   ========================================================================== */
.tajweed-modal-backdrop,
.reciter-modal-backdrop {
    z-index: 10005 !important;
}

.tajweed-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 33, 43, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tajweed-modal-backdrop.is-open {
    display: flex;
    opacity: 1;
}

.tajweed-modal-dialog {
    background: #FFFFFF;
    border-radius: 28px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 72px rgba(18, 33, 43, 0.35), 0 0 0 1px rgba(47, 72, 88, 0.08);
    overflow: hidden;
    transform: translateY(24px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tajweed-modal-backdrop.is-open .tajweed-modal-dialog {
    transform: translateY(0) scale(1);
}

.tajweed-modal-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(47, 72, 88, 0.08);
    background: #FAFBFC;
}

.tajweed-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tajweed-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink, #E93E7D);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tajweed-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--tz-dark-navy, #2F4858);
    margin: 0;
    line-height: 1.25;
}

.tajweed-modal-subtitle {
    font-size: 0.78rem;
    color: var(--tz-text-muted, #6B7280);
    margin: 3px 0 0;
    font-weight: 500;
}

.tajweed-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(47, 72, 88, 0.06);
    color: var(--tz-dark-navy, #2F4858);
    font-size: 1.35rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tajweed-modal-close:hover {
    background: rgba(233, 62, 125, 0.12);
    color: var(--tz-pink, #E93E7D);
}

/* Master Toggle Switch inside Modal */
.tajweed-modal-toggle-row {
    padding: 12px 24px;
    background: #F3F6F8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(47, 72, 88, 0.08);
}

.tajweed-toggle-info {
    display: flex;
    flex-direction: column;
}

.tajweed-toggle-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tz-dark-navy, #2F4858);
}

.tajweed-toggle-desc {
    font-size: 0.74rem;
    color: var(--tz-text-muted, #6B7280);
}

/* iOS-style toggle switch */
.tajweed-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.tajweed-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #CBD5E1;
    transition: 0.3s;
    border-radius: 26px;
}

.tajweed-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.18);
}

.tajweed-switch input:checked + .tajweed-slider {
    background-color: var(--tz-pink, #E93E7D);
}

.tajweed-switch input:checked + .tajweed-slider:before {
    transform: translateX(20px);
}

/* Scrollable Rules List */
.tajweed-rules-list {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 52vh;
    overscroll-behavior: contain;
}

.tajweed-rule-card {
    display: flex;
    align-items: stretch;
    background: #FAFBFC;
    border: 1px solid rgba(47, 72, 88, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tajweed-rule-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 72, 88, 0.05);
    background: #FFFFFF;
}

.tajweed-rule-color-bar {
    width: 6px;
    flex-shrink: 0;
}

.tajweed-rule-body {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.tajweed-rule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tajweed-rule-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--tz-dark-navy, #2F4858);
}

.tajweed-rule-ar {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tz-pink, #E93E7D);
}

.tajweed-rule-letters {
    font-size: 0.77rem;
    color: #4A5568;
    margin: 0;
}

.tajweed-rule-letters strong {
    color: var(--tz-dark-navy, #2F4858);
    font-family: 'Amiri', serif;
    font-size: 0.96rem;
}

.tajweed-rule-explanation {
    font-size: 0.73rem;
    color: var(--tz-text-muted, #6B7280);
    margin: 0;
    line-height: 1.4;
}

.tajweed-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(47, 72, 88, 0.08);
    background: #FAFBFC;
    display: flex;
    justify-content: flex-end;
}

.tajweed-modal-confirm-btn {
    padding: 8px 24px;
    background: var(--tz-dark-navy, #2F4858);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tajweed-modal-confirm-btn:hover {
    background: var(--tz-pink, #E93E7D);
}

/* Mobile Bottom Sheet Adaptation (<= 640px) */
@media (max-width: 640px) {
    .tajweed-modal-backdrop {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .tajweed-modal-dialog {
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        max-height: 80vh !important;
        transform: translateY(100%) !important;
    }

    .tajweed-modal-backdrop.is-open .tajweed-modal-dialog {
        transform: translateY(0) !important;
    }

    .tajweed-modal-header {
        padding: 16px 20px 12px !important;
    }

    .tajweed-rules-list {
        padding: 12px 16px !important;
        flex: 1 1 auto !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
    }

    .tajweed-modal-footer {
        padding: 12px 20px 20px !important;
    }
}

.ayah-end-sign {
    font-family: 'Amiri', serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-pink, #E93E7D);
    font-size: 1.15em;
    font-weight: 700;
    margin: 0 6px 0 10px;
    vertical-align: baseline;
    user-select: none;
}

.ayah-translation-text {
    direction: ltr;
    text-align: left;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.05rem;
    color: #334450;
    line-height: 1.68;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(47, 72, 88, 0.07);
    display: none;
    letter-spacing: -0.005em;
}

.tanzeel-player-card.show-translation .ayah-translation-text,
#mushafCard.show-translation .ayah-translation-text {
    display: block;
}

/* --- 6. RIGHT COLUMN: RECITERS DIRECTORY (250+ QARIS) --- */
body.recitation-page .studio-qaris-column {
    background: #F9FAFB !important;
    border-left: 1px solid rgba(47, 72, 88, 0.09) !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    width: 350px !important;
    box-sizing: border-box !important;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.recitation-page .quran-studio-layout.qaris-collapsed .studio-qaris-column {
    opacity: 0 !important;
    transform: translateX(30px) !important;
    width: 0;
    min-width: 0;
    max-width: 0;
    border-width: 0;
    padding: 0;
    pointer-events: none;
    visibility: hidden;
}

.studio-qaris-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.09);
    background: #F4F5F8;
    flex-shrink: 0;
}

.studio-qaris-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.studio-qaris-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-qaris-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tz-dark-navy, #2F4858);
    margin: 0;
}

.studio-qaris-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink, #E93E7D);
    padding: 2px 8px;
    border-radius: 999px;
}

.studio-roll-close-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(47, 72, 88, 0.14);
    background: #FFFFFF;
    color: var(--tz-text-muted, #7A8B99);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.studio-roll-close-btn:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.06);
}

/* Remove reciter circle initial avatars across the board */
.spotlight-avatar,
.studio-qari-avatar,
.reciter-modal-avatar,
.reciter-chip-avatar {
    display: none !important;
}

/* Active Reciter Spotlight Card (Uncluttered without avatar initial) */
.studio-active-qari-spotlight {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(135deg, rgba(22, 33, 43, 0.96) 0%, rgba(38, 54, 70, 0.96) 100%);
    color: #FFFFFF;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.spotlight-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    gap: 3px;
}

.spotlight-eyebrow {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.spotlight-name-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.spotlight-name {
    font-size: 0.92rem !important;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    display: inline-block;
    white-space: nowrap;
}

.spotlight-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.qari-class-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.spotlight-badges .qari-class-badge.badge-synced {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.spotlight-riwayah {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.qari-drawer-filter-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.qari-filter-tab {
    background: #FFFFFF;
    border: 1px solid rgba(47, 72, 88, 0.12);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--tz-text-muted, #7A8B99);
    cursor: pointer;
    transition: all 0.18s ease;
}

.qari-filter-tab:hover {
    color: var(--tz-dark-navy, #2F4858);
}

.qari-filter-tab.is-active {
    background: var(--tz-dark-navy, #2F4858);
    color: #FFFFFF;
    border-color: var(--tz-dark-navy, #2F4858);
}

.qari-drawer-search-wrap {
    position: relative;
    margin-bottom: 6px;
}

.qari-drawer-search-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tz-text-muted, #7A8B99);
    pointer-events: none;
}

.qari-drawer-search-wrap input {
    width: 100%;
    padding: 7px 12px 7px 36px;
    background: #FFFFFF;
    border: 1px solid rgba(47, 72, 88, 0.12);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--tz-dark-navy, #2F4858);
    box-sizing: border-box;
    outline: none;
}

.qari-drawer-search-wrap input:focus {
    border-color: var(--tz-pink, #E93E7D);
    box-shadow: 0 0 0 3px rgba(233, 62, 125, 0.12);
}

.studio-qari-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 72, 88, 0.15) transparent;
}

.studio-qari-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.studio-qari-row:hover {
    background: rgba(47, 72, 88, 0.04);
}

.studio-qari-row.is-active {
    background: rgba(233, 62, 125, 0.08);
    border-color: rgba(233, 62, 125, 0.2);
}

.qari-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qari-row-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(47, 72, 88, 0.06);
    color: var(--tz-dark-navy, #2F4858);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.studio-qari-row.is-active .qari-row-avatar {
    background: var(--tz-pink, #E93E7D);
    color: #FFFFFF;
}

.qari-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qari-row-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--tz-dark-navy, #2F4858);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-qari-row.is-active .qari-row-name {
    color: var(--tz-pink, #E93E7D);
    font-weight: 700;
}

.qari-row-sub {
    font-size: 0.72rem;
    color: var(--tz-text-muted, #7A8B99);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qari-drawer-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(47, 72, 88, 0.08);
    background: #F4F4F8;
    flex-shrink: 0;
}

.open-full-directory-btn {
    width: 100%;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.15);
    background: #FFFFFF;
    color: var(--tz-dark-navy, #2F4858);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.open-full-directory-btn:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.04);
}

/* Attribution Credit to MP3Quran.net Resources */
.studio-player-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0 10px;
    font-size: 0.78rem;
    color: var(--tz-text-muted, #7A8B99);
    text-align: center;
    margin-bottom: 92px;
}

.studio-player-credit a {
    color: var(--tz-dark-navy, #2F4858);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(233, 62, 125, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.studio-player-credit a:hover {
    color: var(--tz-pink, #E93E7D);
    text-decoration-color: var(--tz-pink, #E93E7D);
}

/* --- 7. MASTER FIXED BOTTOM PLAYER BAR (Full-Width YouTube Music Style) --- */
.master-bottom-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1B2832;
    color: #FFFFFF;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    padding: 0 24px 8px;
    box-sizing: border-box;
}

.bar-timeline-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.bar-time {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    min-width: 32px;
}

.bar-slider-track {
    flex: 1;
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
}

.bar-progress-filled {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--tz-pink, #E93E7D);
    border-radius: 999px;
}

.bar-audio-progress {
    position: absolute;
    left: 0;
    top: -6px;
    width: 100%;
    height: 16px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.bar-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.bar-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 320px;
}

.bar-track-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bar-track-labels {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bar-surah-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-surah-arabic {
    font-family: 'Amiri', serif !important;
    font-size: 1.1rem;
    color: var(--tz-pink, #E93E7D);
    direction: rtl;
}

.bar-reciter-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-center-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bar-ctrl-btn {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.18s ease;
}

.bar-ctrl-btn:hover {
    color: var(--tz-pink, #E93E7D);
    transform: scale(1.1);
}

#playerRewindBtn svg,
#playerForwardBtn svg {
    overflow: visible;
}

#playerRewindBtn svg text,
#playerForwardBtn svg text {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 800 !important;
    font-size: 7.5px !important;
    letter-spacing: -0.5px !important;
    fill: #FFFFFF !important;
    stroke: none !important;
    user-select: none;
}

.bar-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tz-pink, #E93E7D);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(233, 62, 125, 0.35);
    transition: all 0.2s ease;
}

.bar-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(233, 62, 125, 0.45);
}

.speed-pills-group {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 2px;
}

.speed-pill-btn {
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.speed-pill-btn.is-active {
    background: #FFFFFF;
    color: var(--tz-dark-navy, #2F4858);
}

.bar-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- 8. RESPONSIVE YOUTUBE MUSIC-STYLE DRAWER & ADAPTIVE STYLES --- */

/* Left Group & Hamburger Button in Top Bar */
.player-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.studio-hamburger-btn {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.16);
    background: #FFFFFF;
    color: var(--tz-dark-navy, #2F4858);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(47, 72, 88, 0.05);
}

.studio-hamburger-btn:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.05);
}

.studio-drawer-close-btn {
    display: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(47, 72, 88, 0.14);
    background: #FFFFFF;
    color: var(--tz-text-muted, #7A8B99);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.studio-drawer-close-btn:hover {
    border-color: var(--tz-pink, #E93E7D);
    color: var(--tz-pink, #E93E7D);
    background: rgba(233, 62, 125, 0.06);
}

/* Ensure Lists Fill Column Height 100% (No bottom dead space) */
body.recitation-page .studio-surahs-list,
body.recitation-page .mushaf-content,
body.recitation-page .studio-qari-list {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
}

body.recitation-page .studio-surahs-column,
body.recitation-page .studio-center-stage,
body.recitation-page .studio-qaris-column {
    grid-row: 1 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
}

/* Tablet & Smaller Laptops (<= 1150px): YouTube Music Drawer Pattern */
@media (max-width: 1150px) {
    /* Hide old mobile nav tabs if any */
    .studio-mobile-nav-tabs {
        display: none !important;
    }

    body.recitation-page .studio-container {
        width: calc(100% - 20px) !important;
    }

    body.recitation-page .quran-studio-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr !important;
        height: clamp(580px, calc(100vh - 190px), 820px) !important;
        position: relative !important;
        overflow: hidden !important;
        margin: 4px auto 90px !important;
        border-radius: 16px !important;
    }

    /* Center Recitation Stage takes full 100% width */
    body.recitation-page .studio-center-stage {
        width: 100% !important;
        flex: 1 1 0 !important;
        display: flex !important;
        min-height: 0 !important;
    }

    /* Show the Hamburger button and Reciters pull-tab in toolbar */
    .studio-hamburger-btn {
        display: inline-flex !important;
    }

    .studio-door-pull-tab {
        display: inline-flex !important;
    }

    /* Surahs Column -> YouTube Music Slide-Out Left Drawer */
    body.recitation-page .studio-surahs-column {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: min(340px, 86vw) !important;
        height: 100% !important;
        max-height: 100% !important;
        background: #FFFFFF !important;
        z-index: 500 !important;
        box-shadow: 10px 0 36px rgba(18, 33, 43, 0.25) !important;
        transform: translateX(-105%) !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        border-right: 1px solid rgba(47, 72, 88, 0.12) !important;
        border-radius: 0 !important;
    }

    body.recitation-page .studio-surahs-column.drawer-open,
    body.recitation-page #quranStudioLayout.surahs-drawer-open .studio-surahs-column {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Qaris Column -> YouTube Music Slide-Out Right Drawer */
    body.recitation-page .studio-qaris-column {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: min(350px, 88vw) !important;
        height: 100% !important;
        max-height: 100% !important;
        background: #FFFFFF !important;
        z-index: 500 !important;
        box-shadow: -10px 0 36px rgba(18, 33, 43, 0.25) !important;
        transform: translateX(105%) !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        border-left: 1px solid rgba(47, 72, 88, 0.12) !important;
        border-radius: 0 !important;
    }

    body.recitation-page .studio-qaris-column.drawer-open,
    body.recitation-page #quranStudioLayout.qaris-drawer-open .studio-qaris-column {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .studio-drawer-close-btn {
        display: flex !important;
    }
}

/* Mobile Screens (<= 768px): Sleek Responsive Player Toolbar & Canvas */
@media (max-width: 768px) {
    /* Hide cramped horizontal Tajweed strip on mobile in favour of Tajweed Guide pop-up */
    .tajweed-legend-bar {
        display: none !important;
    }

    body.recitation-page .recitation-hero-section {
        padding: clamp(88px, 14vw, 104px) 0 4px !important;
    }

    body.recitation-page .studio-container {
        width: calc(100% - 14px) !important;
    }

    body.recitation-page .quran-studio-layout {
        height: clamp(520px, calc(100vh - 170px), 760px) !important;
        margin: 2px auto 86px !important;
        border-radius: 14px !important;
    }

    .player-top-status {
        padding: 10px 12px 8px !important;
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        grid-template-areas:
            "surahbtn surahmeta reciterbtn"
            "tools tools tools" !important;
        align-items: center !important;
        gap: 8px 8px !important;
    }

    .player-left-group,
    .player-top-actions-group {
        display: contents !important;
    }

    .studio-hamburger-btn {
        grid-area: surahbtn !important;
        display: inline-flex !important;
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
    }

    .player-current-surah-meta {
        grid-area: surahmeta !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-align: center !important;
    }

    .studio-door-pull-tab {
        grid-area: reciterbtn !important;
        display: inline-flex !important;
        padding: 5px 10px !important;
        font-size: 0.74rem !important;
    }

    .mushaf-quick-tools {
        grid-area: tools !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        width: 100% !important;
    }

    .player-surah-badge-wrap {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
    }

    .player-surah-pill {
        flex-shrink: 0 !important;
        font-size: 0.74rem !important;
        padding: 3px 8px !important;
    }

    .player-surah-heading {
        font-size: 0.94rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: none !important;
        margin: 0 !important;
    }

    /* Hide Arabic chapter name on mobile to prevent any cutoff of the Surah number & title */
    .player-surah-arabic {
        display: none !important;
    }

    .mushaf-tool-btn {
        padding: 4px 9px !important;
        font-size: 0.72rem !important;
    }

    .mushaf-quick-tools > .mushaf-font-group {
        display: none !important;
    }

    #mushafMaximizeBtn {
        display: none !important;
    }

    .mushaf-more-btn {
        display: inline-flex !important;
    }

    .mushaf-more-dropdown .mushaf-font-group {
        display: inline-flex !important;
    }

    .mushaf-embedded-box {
        padding: 12px 14px 18px !important;
    }

    .bismillah-calligraphy {
        font-size: 1.45rem !important;
    }

    .ayah-arabic-text {
        font-size: 1.4rem !important;
        line-height: 2.1 !important;
    }

    .ayah-translation-text {
        font-size: 0.94rem !important;
        line-height: 1.55 !important;
    }

    .mushaf-ayah-card {
        padding: 14px 14px !important;
        margin-bottom: 10px !important;
    }

    /* Master Bottom Bar on Mobile */
    .master-bottom-player-bar {
        padding: 0 12px 6px !important;
    }

    .bar-content-row {
        gap: 8px !important;
    }

    .bar-track-info {
        max-width: 140px !important;
    }

    .bar-surah-title {
        font-size: 0.78rem !important;
    }

    .bar-reciter-title {
        font-size: 0.68rem !important;
    }

    .bar-center-controls {
        gap: 8px !important;
    }

    .bar-play-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .speed-pills-group {
        display: none !important; /* Hide speed pills on small phone screens to save space */
    }

    .bar-right-actions {
        gap: 6px !important;
    }
}


/* ==========================================================================
   Migrated from style.css — Legacy recitation classes (style.css cleanup)
   ========================================================================== */
/* ==========================================================================
   Tanzeel Qur'an Recitation & MP3 Audio Player Styles
   ========================================================================== */

/* Arabic Font Definition */


.font-arabic {
    font-family: 'Amiri', 'Scheherazade New', serif;
    direction: rtl;
}

/* Recitation Page Hero Customisations */
.recitation-hero-section {
    background-color: var(--tz-cream);
    padding: clamp(90px, 10vw, 120px) 0 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.recitation-hero-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(233, 62, 125, 0.08) 0%, rgba(245, 235, 225, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.recitation-hero-content {
    position: relative;
    z-index: 2;
    max-width: 840px;
    margin: 0 auto;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(233, 62, 125, 0.09);
    color: var(--tz-pink);
    border: 1px solid rgba(233, 62, 125, 0.2);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-pill-badge .badge-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tz-pink);
    box-shadow: 0 0 10px var(--tz-pink);
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Reciters Quick Select Row */
.reciter-selector-wrap {
    margin-top: 36px;
    position: relative;
}

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

.reciter-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reciter-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reciter-scroll-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(47, 72, 88, 0.14);
    color: var(--tz-dark-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.reciter-scroll-arrow:hover {
    background: var(--tz-pink);
    border-color: var(--tz-pink);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(233, 62, 125, 0.35);
}

.reciter-scroll-arrow:active {
    transform: scale(0.92);
}

.reciter-chips-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 4px 14px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.reciter-chips-scroll::-webkit-scrollbar {
    height: 6px;
}
.reciter-chips-scroll::-webkit-scrollbar-thumb {
    background: rgba(47, 72, 88, 0.15);
    border-radius: 10px;
}

.reciter-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    border-radius: 50px;
    padding: 8px 18px 8px 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    text-align: left;
    flex-shrink: 0;
}

.reciter-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(233, 62, 125, 0.35);
    box-shadow: 0 8px 20px rgba(233, 62, 125, 0.1);
}

.reciter-chip.is-active {
    background: var(--tz-dark-navy);
    border-color: var(--tz-dark-navy);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(47, 72, 88, 0.25);
}

.reciter-chip-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(233, 62, 125, 0.12);
    color: var(--tz-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.reciter-chip.is-active .reciter-chip-avatar {
    background: var(--tz-pink);
    color: #ffffff;
}

.reciter-chip-info {
    display: flex;
    flex-direction: column;
}

.reciter-chip-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.reciter-chip-tag {
    font-size: 0.75rem;
    color: var(--tz-text-muted);
    line-height: 1.2;
    margin-top: 2px;
}

.reciter-chip.is-active .reciter-chip-tag {
    color: rgba(255, 255, 255, 0.75);
}

.reciter-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38ef7d;
    box-shadow: 0 0 8px #38ef7d;
    margin-left: 4px;
}

.browse-all-reciters-btn {
    background: transparent;
    border: 1.5px solid var(--tz-dark-navy);
    color: var(--tz-dark-navy);
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.browse-all-reciters-btn:hover {
    background: var(--tz-dark-navy);
    color: #ffffff;
}

/* ==========================================================================
   Master Audio Player Card
   ========================================================================== */
.main-player-wrapper {
    margin: 32px auto 50px;
    max-width: 980px;
    position: relative;
    z-index: 5;
}

.tanzeel-player-card {
    background: #ffffff;
    border-radius: 36px;
    border: 1px solid rgba(47, 72, 88, 0.08);
    box-shadow: 0 24px 64px rgba(47, 72, 88, 0.08), 0 4px 16px rgba(0, 0, 0, 0.02);
    padding: clamp(24px, 4vw, 44px);
    position: relative;
    overflow: hidden;
}

.tanzeel-player-card::after,
.studio-surahs-column::after,
.studio-qaris-column::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--tz-pink);
    z-index: 10;
    pointer-events: none;
}

.player-top-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.reciter-playing-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reciter-playing-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(47, 72, 88, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-dark-navy);
}

.reciter-playing-labels h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--tz-dark-navy);
    margin: 0;
    line-height: 1.25;
}

.reciter-playing-labels span {
    font-size: 0.8rem;
    color: var(--tz-text-muted);
}

.player-badges-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tajweed-badge {
    background: rgba(47, 72, 88, 0.06);
    color: var(--tz-dark-navy);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
}

.repetition-badge {
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    display: none;
    align-items: center;
    gap: 6px;
}

/* Compact Surah Header (Minimizes when audio plays so Live Sync Ayahs take center stage) */
.surah-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(250, 247, 242, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-radius: 18px;
    border: 1px solid rgba(47, 72, 88, 0.08);
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(47, 72, 88, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.surah-compact-pill {
    background: var(--tz-dark-navy);
    color: #FFFFFF;
    font-family: 'Parkinsans', sans-serif;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(47, 72, 88, 0.15);
    transition: all 0.25s ease;
}

.surah-compact-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.surah-compact-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.surah-compact-english {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tz-dark-navy);
    margin: 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
    transition: font-size 0.25s ease;
}

.surah-compact-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.45rem;
    color: var(--tz-dark-navy);
    direction: rtl;
    line-height: 1;
    font-weight: 700;
    transition: font-size 0.25s ease;
}

.surah-compact-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--tz-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.25s ease;
}

.surah-compact-meaning {
    color: var(--tz-pink);
    font-weight: 600;
}

.surah-compact-dot {
    color: rgba(47, 72, 88, 0.3);
}

.surah-compact-meta {
    color: var(--tz-text-muted);
    font-weight: 500;
}

.surah-compact-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Sound Wave bars animation */
.sound-wave-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    padding: 0 4px;
}

.sound-wave-bar {
    width: 3px;
    height: 6px;
    background: var(--tz-pink);
    border-radius: 999px;
    transition: height 0.2s ease;
}

.surah-compact-header.is-playing .sound-wave-bar {
    animation: soundWaveBounce 1.2s infinite ease-in-out;
}
.surah-compact-header.is-playing .sound-wave-bar:nth-child(1) { animation-delay: 0.0s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(2) { animation-delay: 0.2s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(3) { animation-delay: 0.4s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(4) { animation-delay: 0.1s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(5) { animation-delay: 0.3s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(6) { animation-delay: 0.5s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(7) { animation-delay: 0.25s; }
.surah-compact-header.is-playing .sound-wave-bar:nth-child(8) { animation-delay: 0.15s; }

@keyframes soundWaveBounce {
    0%, 100% { height: 6px; opacity: 0.35; }
    50% { height: 22px; opacity: 1; }
}

/* Minimization on Play (Takes minimal vertical space so live sync takes center stage) */
.surah-compact-header.is-playing {
    padding: 8px 16px;
    background: rgba(250, 247, 242, 0.7);
    margin-bottom: 10px;
}

.surah-compact-header.is-playing .surah-compact-english {
    font-size: 1.02rem;
}

.surah-compact-header.is-playing .surah-compact-arabic {
    font-size: 1.2rem;
}

.surah-compact-header.is-playing .surah-compact-sub {
    font-size: 0.74rem;
}

/* Sound Wave Animation */
.sound-wave-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 32px;
    margin: 16px auto 0;
}

.sound-wave-bar {
    width: 3.5px;
    height: 4px;
    background: var(--tz-pink);
    border-radius: 4px;
    transition: height 0.12s ease;
}

/* Timeline & Scrubber Bar */
.player-timeline-wrap {
    margin-bottom: 28px;
}

.timeline-slider-track {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
}

.audio-progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e8eaed;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.audio-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tz-pink);
    box-shadow: 0 2px 8px rgba(233, 62, 125, 0.5);
    cursor: pointer;
    border: 2px solid #ffffff;
    transition: transform 0.15s ease;
}

.audio-progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.audio-progress-bar::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tz-pink);
    box-shadow: 0 2px 8px rgba(233, 62, 125, 0.5);
    cursor: pointer;
    border: 2px solid #ffffff;
}

.timeline-timestamps {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tz-text-muted);
}

/* Main Player Buttons */
.player-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.player-left-tools,
.player-right-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-center-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 auto;
}

.ctrl-btn {
    background: rgba(47, 72, 88, 0.05);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-dark-navy);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.ctrl-btn:hover {
    background: rgba(47, 72, 88, 0.12);
    transform: scale(1.08);
}

.ctrl-btn:active {
    transform: scale(0.95);
}

.main-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tz-pink) 0%, #ff5292 100%);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(233, 62, 125, 0.4);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 34px rgba(233, 62, 125, 0.55);
}

.main-play-btn:active {
    transform: scale(0.94);
}

/* Speed Pills */
.speed-pills-group {
    display: inline-flex;
    background: rgba(47, 72, 88, 0.05);
    padding: 3px;
    border-radius: 999px;
}

.speed-pill-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tz-text-muted);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-pill-btn.is-active {
    background: #ffffff;
    color: var(--tz-dark-navy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Loop Button States */
.loop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(47, 72, 88, 0.05);
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    cursor: pointer;
    transition: all 0.2s ease;
}

.loop-btn:hover {
    background: rgba(47, 72, 88, 0.12);
}

.loop-btn.mode-one {
    background: rgba(233, 62, 125, 0.12);
    color: var(--tz-pink);
    border: 1px solid rgba(233, 62, 125, 0.3);
}

.loop-btn.mode-all {
    background: rgba(47, 72, 88, 0.12);
    color: var(--tz-dark-navy);
}

.favorite-btn.is-favorited svg {
    fill: var(--tz-pink);
    stroke: var(--tz-pink);
}

.player-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 5px;
    background: #e8eaed;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--tz-dark-navy);
    cursor: pointer;
}

/* ==========================================================================
   Surah Catalog & Smart Filters
   ========================================================================== */
.surah-catalog-section {
    padding: 30px 0 100px;
}

.surah-filters-container {
    background: #ffffff;
    border-radius: 28px;
    padding: 20px 24px;
    border: 1px solid rgba(47, 72, 88, 0.08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.03);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.surah-filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.surah-filter-tab {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tz-text-muted);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.surah-filter-tab:hover {
    color: var(--tz-dark-navy);
    background: rgba(47, 72, 88, 0.04);
}

.surah-filter-tab.is-active {
    background: var(--tz-pink);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(233, 62, 125, 0.3);
}

.surah-search-box {
    position: relative;
    min-width: 260px;
    flex-grow: 1;
    max-width: 360px;
}

.surah-search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    font-family: inherit;
    font-size: 0.92rem;
    background: #fafafa;
    outline: none;
    transition: all 0.2s ease;
}

.surah-search-box input:focus {
    background: #ffffff;
    border-color: var(--tz-pink);
    box-shadow: 0 0 0 4px rgba(233, 62, 125, 0.12);
}

.surah-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tz-text-muted);
    pointer-events: none;
}

/* Surah Cards Grid */
.surah-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.surah-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px;
    border: 1px solid rgba(47, 72, 88, 0.07);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.surah-card:hover {
    transform: translateY(-4px);
    border-color: rgba(233, 62, 125, 0.3);
    box-shadow: 0 14px 32px rgba(233, 62, 125, 0.08);
}

.surah-card.is-active {
    border: 2px solid var(--tz-pink);
    background: #fffdfd;
    box-shadow: 0 12px 32px rgba(233, 62, 125, 0.12);
}

.surah-card.is-active::before {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 5px;
    border-radius: 0 4px 4px 0;
    background: var(--tz-pink);
}

.surah-card.is-unavailable {
    opacity: 0.55;
}

.surah-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.surah-number-pill {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.surah-badges-wrap {
    display: flex;
    gap: 6px;
}

.surah-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
}

.surah-badge.juz-badge {
    background: rgba(47, 72, 88, 0.08);
    color: var(--tz-dark-navy);
}

.surah-badge.rev-badge {
    background: rgba(0, 0, 0, 0.04);
    color: var(--tz-text-muted);
}

.surah-card-body {
    margin-bottom: 18px;
}

.surah-arabic-title {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    line-height: 1.3;
    text-align: right;
    margin-bottom: 4px;
}

.surah-english-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    margin: 0 0 2px 0;
}

.surah-translation {
    font-size: 0.85rem;
    color: var(--tz-text-muted);
    font-style: italic;
}

.surah-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(47, 72, 88, 0.06);
    padding-top: 14px;
}

.surah-info-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--tz-text-muted);
    font-weight: 500;
}

.surah-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.surah-fav-toggle {
    background: transparent;
    border: none;
    color: var(--tz-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.surah-fav-toggle:hover {
    color: var(--tz-pink);
    transform: scale(1.15);
}

.surah-card-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(47, 72, 88, 0.06);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-dark-navy);
    cursor: pointer;
    transition: all 0.2s ease;
}

.surah-card:hover .surah-card-play {
    background: var(--tz-pink);
    color: #ffffff;
    transform: scale(1.08);
}

.surah-card.is-active .surah-card-play {
    background: var(--tz-pink);
    color: #ffffff;
}

/* Empty State */
.empty-surah-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 28px;
    border: 1px dashed rgba(47, 72, 88, 0.15);
}

.empty-surah-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-surah-state h3 {
    font-size: 1.4rem;
    color: var(--tz-dark-navy);
    margin-bottom: 6px;
}

.empty-surah-state p {
    color: var(--tz-text-muted);
    margin-bottom: 18px;
}

/* ==========================================================================
   Sticky Floating Bottom Mini-Player
   ========================================================================== */
.sticky-mini-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 140%);
    width: calc(100% - 40px);
    max-width: 900px;
    background: rgba(47, 72, 88, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    border-radius: 60px;
    padding: 10px 20px 10px 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.sticky-mini-player.is-visible {
    transform: translate(-50%, 0);
}

.mini-progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--tz-pink);
    width: 0%;
    transition: width 0.15s linear;
}

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

.mini-player-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tz-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.mini-player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mini-surah-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-reciter-title {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mini-ctrl-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mini-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mini-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tz-pink);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.mini-timestamp {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    font-variant-numeric: tabular-nums;
    margin-right: 8px;
    white-space: nowrap;
}

.mini-stop-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.mini-stop-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}

/* ==========================================================================
   Reciter Directory Modal
   ========================================================================== */
.reciter-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(47, 72, 88, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.reciter-modal-backdrop.is-open {
    display: flex;
    opacity: 1;
}

.reciter-modal-dialog {
    background: #ffffff;
    border-radius: 36px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reciter-modal-backdrop.is-open .reciter-modal-dialog {
    transform: translateY(0);
}

.reciter-modal-header {
    padding: 28px 32px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(47, 72, 88, 0.08);
}

.reciter-modal-close {
    background: rgba(47, 72, 88, 0.06);
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--tz-dark-navy);
    transition: all 0.2s ease;
}

.reciter-modal-close:hover {
    background: var(--tz-pink);
    color: #ffffff;
    transform: rotate(90deg);
}

.reciter-modal-search-wrap {
    padding: 16px 32px;
    background: #fafafa;
    border-bottom: 1px solid rgba(47, 72, 88, 0.08);
}

.reciter-modal-search {
    width: 100%;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    font-family: inherit;
    font-size: 0.95rem;
    background: #ffffff;
    outline: none;
}

.reciter-modal-search:focus {
    border-color: var(--tz-pink);
    box-shadow: 0 0 0 4px rgba(233, 62, 125, 0.1);
}

.reciter-alphabet-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 4px;
}

.alpha-pill {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tz-text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.alpha-pill:hover,
.alpha-pill.is-active {
    background: var(--tz-dark-navy);
    color: #ffffff;
}

.reciter-directory-grid {
    padding: 24px 32px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    flex-grow: 1;
}

.reciter-modal-card {
    background: #ffffff;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.reciter-modal-card:hover {
    border-color: var(--tz-pink);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 62, 125, 0.08);
}

.reciter-modal-card.is-selected {
    border-color: var(--tz-dark-navy);
    background: rgba(47, 72, 88, 0.03);
}

.reciter-modal-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.reciter-modal-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(47, 72, 88, 0.08);
    color: var(--tz-dark-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.reciter-modal-details h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.reciter-modal-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: var(--tz-text-muted);
}

.reciter-modal-meta {
    font-size: 0.75rem;
    color: var(--tz-text-muted);
    margin-top: 2px;
}

.reciter-modal-select-action {
    text-align: right;
}

.selected-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
}

.select-btn {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tz-pink);
}

/* Toast Notifications */
.tanzeel-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--tz-dark-navy);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tanzeel-toast.is-active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .player-controls-row {
        flex-direction: column;
        gap: 16px;
    }
    .player-left-tools,
    .player-right-tools {
        width: 100%;
        justify-content: center;
    }
    .sticky-mini-player {
        padding: 8px 14px;
        bottom: 12px;
        width: calc(100% - 24px);
    }
    .mini-timestamp {
        display: none;
    }
    .surah-filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    .surah-search-box {
        max-width: 100%;
    }
}

/* ==========================================================================
   VISUAL MUSHAF & SYNCHRONIZED AYAH READER (UNIFIED ALL-IN-ONE BOX)
   ========================================================================== */
.player-top-actions-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mushaf-quick-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mushaf-embedded-box {
    margin: 22px 0 26px 0;
    background: #FAF7F2;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    border-radius: 24px;
    padding: 18px 22px;
    box-shadow: inset 0 2px 6px rgba(47, 72, 88, 0.03);
    position: relative;
}

.mushaf-embedded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.07);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.mushaf-embedded-hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.08);
    padding: 4px 12px;
    border-radius: 999px;
}

.mushaf-sync-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--tz-text-muted);
}

.sync-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: syncPulse 2s infinite ease-in-out;
}

@keyframes syncPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.75; }
}

.mushaf-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    background: var(--tz-cream);
    color: var(--tz-dark-navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mushaf-tool-btn:hover {
    border-color: var(--tz-pink);
    color: var(--tz-pink);
}

.mushaf-tool-btn.is-active {
    background: var(--tz-pink);
    border-color: var(--tz-pink);
    color: #FFFFFF;
}

.mushaf-font-group {
    display: inline-flex;
    align-items: center;
    background: var(--tz-cream);
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    padding: 2px;
}

.mushaf-font-btn {
    width: 30px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--tz-dark-navy);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mushaf-font-btn:hover {
    background: #FFFFFF;
    color: var(--tz-pink);
}

.mushaf-bismillah-banner {
    text-align: center;
    padding: 12px 0 10px 0;
    border-bottom: 1px dashed rgba(47, 72, 88, 0.08);
    margin-bottom: 14px;
}

.bismillah-calligraphy {
    font-family: 'Amiri', serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    display: inline-block;
    direction: rtl;
}

.mushaf-content {
    max-height: clamp(520px, 62vh, 760px);
    min-height: 420px;
    overflow-y: auto;
    padding: 10px 14px 16px 6px;
    scroll-behavior: smooth;
}

.mushaf-content::-webkit-scrollbar {
    width: 6px;
}
.mushaf-content::-webkit-scrollbar-track {
    background: var(--tz-cream);
    border-radius: 10px;
}
.mushaf-content::-webkit-scrollbar-thumb {
    background: rgba(47, 72, 88, 0.2);
    border-radius: 10px;
}
.mushaf-content::-webkit-scrollbar-thumb:hover {
    background: var(--tz-pink);
}

.mushaf-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 12px;
    color: var(--tz-text-muted);
    font-size: 0.92rem;
}

/* Ayah Block */
.mushaf-ayah-card {
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #FFFFFF;
    border: 1.5px solid rgba(47, 72, 88, 0.06);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.mushaf-ayah-card:hover {
    background: rgba(245, 235, 225, 0.45);
    border-color: rgba(233, 62, 125, 0.25);
    transform: translateY(-1px);
}

.mushaf-ayah-card.is-active-ayah {
    background: rgba(233, 62, 125, 0.07);
    border-color: var(--tz-pink);
    box-shadow: 0 4px 16px rgba(233, 62, 125, 0.12);
}

.ayah-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    direction: ltr;
}

.ayah-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tz-text-muted);
    background: var(--tz-cream);
    padding: 2px 8px;
    border-radius: 999px;
}

.mushaf-ayah-card.is-active-ayah .ayah-badge-pill {
    background: var(--tz-pink);
    color: #FFFFFF;
}

.ayah-speaker-badge {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tz-pink);
}

.mushaf-ayah-card.is-active-ayah .ayah-speaker-badge {
    display: inline-flex;
}

.ayah-speaker-badge svg {
    animation: speakerPulse 1.2s infinite ease-in-out;
}

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

.ayah-arabic-wrap {
    direction: rtl;
    text-align: right;
}

.ayah-arabic-text {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    line-height: 2.2;
    color: var(--tz-dark-navy);
    display: inline;
    letter-spacing: 0.01em;
}

.mushaf-ayah-card.is-active-ayah .ayah-arabic-text {
    color: #1a2a35;
    font-weight: 700;
}

.ayah-end-sign {
    font-family: 'Amiri', serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-pink);
    font-size: 1.15em;
    font-weight: 700;
    margin: 0 6px 0 10px;
    vertical-align: baseline;
    user-select: none;
}

.ayah-translation-text {
    direction: ltr;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    color: #4a5c68;
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(47, 72, 88, 0.08);
    display: none;
}

.tanzeel-player-card.show-translation .ayah-translation-text,
#mushafCard.show-translation .ayah-translation-text {
    display: block;
}

@media (max-width: 767px) {
    .player-top-actions-group {
        justify-content: flex-start;
        width: 100%;
    }
    .mushaf-embedded-box {
        padding: 14px 12px;
        border-radius: 18px;
        margin: 16px 0 20px 0;
    }
    .mushaf-content {
        max-height: 300px;
    }
    .bismillah-calligraphy {
        font-size: 1.45rem;
    }
    .ayah-arabic-text {
        font-size: 1.4rem;
        line-height: 2.0;
    }
}

/* ==========================================================================
/* --- Mobile Segmented Navigation Tabs (Spotify Mobile Style) --- */
.studio-mobile-nav-tabs {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(47, 72, 88, 0.1);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(47, 72, 88, 0.08);
    margin: 10px auto 20px;
    max-width: 480px;
    width: calc(100% - 32px);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.studio-mobile-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--tz-text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.studio-mobile-tab-btn:hover {
    color: var(--tz-dark-navy);
}

.studio-mobile-tab-btn.is-active {
    background: var(--tz-dark-navy);
    color: #FFFFFF;
    box-shadow: 0 3px 12px rgba(47, 72, 88, 0.22);
}

/* ==========================================================================
   SPOTIFY / YOUTUBE MUSIC DESKTOP 3-PANEL STUDIO LAYOUT
   ========================================================================== */
.quran-studio-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr) 320px;
    grid-template-rows: clamp(560px, calc(100vh - 235px), 760px) auto;
    gap: 12px 22px;
    align-items: stretch;
    max-width: 1540px;
    margin: 16px auto 100px;
    padding: 0 24px;
    position: relative;
    transition: grid-template-columns 0.4s cubic-bezier(0.16, 1, 0.3, 1), gap 0.4s ease, max-width 0.4s ease;
}

/* Rolling Door Collapsed State: Center stage smoothly expands to take center stage */
.quran-studio-layout.qaris-collapsed {
    grid-template-columns: 290px minmax(0, 1fr) 0px;
    gap: 12px 0px;
}

/* Immersive / Maximized Quran Mode (Focus on Ayahs & Calligraphy) */
.quran-studio-layout.is-immersive {
    grid-template-columns: 1fr;
    max-width: 1220px;
    gap: 12px 0;
}

.quran-studio-layout.is-immersive .studio-surahs-column,
.quran-studio-layout.is-immersive .studio-qaris-column {
    display: none !important;
}

.quran-studio-layout.is-immersive .studio-door-pull-tab {
    display: none !important;
}

.quran-studio-layout.is-immersive .tanzeel-player-card {
    padding: 24px 34px;
    box-shadow: 0 20px 60px rgba(47, 72, 88, 0.08);
}

.quran-studio-layout.is-immersive .mushaf-ayah-card {
    padding: 18px 24px;
    margin-bottom: 12px;
}

.quran-studio-layout.is-immersive .ayah-arabic-text {
    font-size: 1.85rem;
    line-height: 2.15;
}

.studio-center-stage {
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Attribution Credit to MP3Quran.net Resources */
.studio-player-credit {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 4px;
    font-size: 0.78rem;
    color: var(--tz-text-muted);
    text-align: center;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.2px;
}

.quran-studio-layout.is-immersive .studio-player-credit {
    grid-column: 1;
}

.studio-player-credit a {
    color: var(--tz-dark-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(233, 62, 125, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.studio-player-credit a:hover {
    color: var(--tz-pink);
    text-decoration-color: var(--tz-pink);
}

.studio-player-credit a svg {
    color: var(--tz-pink);
    transition: transform 0.2s ease;
}

.studio-player-credit a:hover svg {
    transform: translate(1px, -1px);
}

/* Reciters Drawer Toggle Button (Uniform part of the player box actions) */
.studio-door-pull-tab {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.14);
    background: #FFFFFF;
    color: var(--tz-dark-navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.studio-door-pull-tab svg {
    color: var(--tz-pink);
    transition: transform 0.2s ease;
}

.studio-door-pull-tab:hover {
    border-color: var(--tz-pink);
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.04);
    box-shadow: 0 4px 12px rgba(233, 62, 125, 0.12);
}

.studio-door-pull-tab:hover svg {
    transform: translateX(-2px);
}

.quran-studio-layout.qaris-collapsed .studio-door-pull-tab {
    display: inline-flex;
}

.studio-center-stage .main-player-wrapper {
    margin: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.studio-center-stage .tanzeel-player-card {
    border-radius: 28px;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    box-shadow: 0 12px 32px rgba(47, 72, 88, 0.04);
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 22px;
    box-sizing: border-box;
}

.studio-center-stage .player-top-status {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.studio-center-stage .mushaf-embedded-box {
    margin: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 18px 16px;
}

.studio-center-stage .mushaf-bismillah-banner {
    flex-shrink: 0;
    padding: 6px 0 8px;
    margin-bottom: 8px;
}

.studio-center-stage .mushaf-content {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 6px 12px 14px 4px;
}

/* --- Left Column: All 114 Surahs Playlist --- */
.studio-surahs-column {
    grid-row: 1;
    background: #FFFFFF;
    border-radius: 28px;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    box-shadow: 0 12px 32px rgba(47, 72, 88, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.studio-surahs-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.07);
    background: #FAFAFA;
}

.studio-surahs-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.studio-surahs-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-surahs-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    margin: 0;
}

.studio-surahs-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink);
    padding: 2px 8px;
    border-radius: 999px;
}

.studio-surahs-sub {
    font-size: 0.75rem;
    color: var(--tz-text-muted);
}

.studio-surah-search-box {
    position: relative;
    margin-bottom: 10px;
}

.studio-surah-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tz-text-muted);
    pointer-events: none;
}

.studio-surah-search-box input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.12);
    background: #FFFFFF;
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    color: var(--tz-dark-navy);
    outline: none;
    transition: all 0.2s;
}

.studio-surah-search-box input:focus {
    border-color: var(--tz-pink);
    box-shadow: 0 0 0 3px rgba(233, 62, 125, 0.12);
}

.studio-surah-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.studio-surah-filter-chips::-webkit-scrollbar {
    display: none;
}

.studio-surah-filter-chips .surah-filter-tab {
    font-size: 0.76rem;
    padding: 4px 10px;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.1);
    background: #FFFFFF;
    color: var(--tz-text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.studio-surah-filter-chips .surah-filter-tab:hover {
    color: var(--tz-dark-navy);
    border-color: rgba(47, 72, 88, 0.25);
}

.studio-surah-filter-chips .surah-filter-tab.is-active {
    background: var(--tz-dark-navy);
    color: #FFFFFF;
    border-color: var(--tz-dark-navy);
}

/* Surahs list rows */
.studio-surahs-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.studio-surahs-list::-webkit-scrollbar {
    width: 5px;
}
.studio-surahs-list::-webkit-scrollbar-track {
    background: transparent;
}
.studio-surahs-list::-webkit-scrollbar-thumb {
    background: rgba(47, 72, 88, 0.15);
    border-radius: 999px;
}
.studio-surahs-list::-webkit-scrollbar-thumb:hover {
    background: var(--tz-pink);
}

.studio-surah-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    gap: 8px;
    width: 100%;
    text-align: left;
}

.studio-surah-row:hover {
    background: rgba(245, 235, 225, 0.55);
    border-color: rgba(47, 72, 88, 0.06);
}

.studio-surah-row.is-active {
    background: rgba(233, 62, 125, 0.08);
    border-color: rgba(233, 62, 125, 0.25);
}

.studio-surah-row-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.studio-surah-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(47, 72, 88, 0.05);
    color: var(--tz-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.studio-surah-row.is-active .studio-surah-num {
    background: var(--tz-pink);
    color: #FFFFFF;
}

.studio-surah-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.studio-surah-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.studio-surah-details {
    font-size: 0.72rem;
    color: var(--tz-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-surah-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.studio-surah-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: var(--tz-dark-navy);
    direction: rtl;
}

.studio-surah-play-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tz-pink);
    opacity: 0;
    transition: opacity 0.2s;
}

.studio-surah-row:hover .studio-surah-play-indicator,
.studio-surah-row.is-active .studio-surah-play-indicator {
    opacity: 1;
}

/* --- Qari Classification Badges (Monotone & Site-aligned) --- */
.qari-class-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.3;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.2px;
}

.qari-class-badge svg {
    flex-shrink: 0;
}

.qari-class-badge.badge-synced {
    background: rgba(47, 72, 88, 0.07);
    color: var(--tz-dark-navy);
    border: 1px solid rgba(47, 72, 88, 0.15);
}

.qari-class-badge.badge-audio-only {
    background: rgba(47, 72, 88, 0.04);
    color: var(--tz-text-muted);
    border: 1px solid rgba(47, 72, 88, 0.12);
}

.spotlight-badges .qari-class-badge.badge-synced {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.spotlight-badges .qari-class-badge.badge-audio-only {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.reciter-name-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.studio-switch-qari-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.15);
    background: #FFFFFF;
    color: var(--tz-dark-navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.studio-switch-qari-btn:hover {
    border-color: var(--tz-pink);
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.05);
}

/* --- Right Column: Dedicated Qari Studio Panel (Desktop 3rd Column) --- */
.studio-qaris-column {
    grid-row: 1;
    background: #FFFFFF;
    border-radius: 28px;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    box-shadow: 0 12px 32px rgba(47, 72, 88, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    width: 320px;
    box-sizing: border-box;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.35s ease;
}

/* Rolling Door Closed: Qari column slides away smoothly */
.quran-studio-layout.qaris-collapsed .studio-qaris-column {
    opacity: 0;
    transform: translateX(40px);
    width: 0;
    min-width: 0;
    max-width: 0;
    border-width: 0;
    padding: 0;
    pointer-events: none;
    visibility: hidden;
}

.studio-qaris-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(47, 72, 88, 0.07);
    background: #FAFAFA;
}

.studio-qaris-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.studio-qaris-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-roll-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(47, 72, 88, 0.12);
    background: #FFFFFF;
    color: var(--tz-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.studio-roll-close-btn:hover {
    border-color: var(--tz-pink);
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.06);
    transform: translateX(2px);
}

.studio-qaris-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-qaris-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    margin: 0;
}

.studio-qaris-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink);
    padding: 2px 8px;
    border-radius: 999px;
}

.studio-qaris-sub {
    font-size: 0.75rem;
    color: var(--tz-text-muted);
}

/* Active Reciter Spotlight Card */
.studio-active-qari-spotlight {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(22, 33, 43, 0.96) 0%, rgba(38, 54, 70, 0.96) 100%);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.spotlight-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tz-pink);
    color: #FFFFFF;
    font-family: 'Parkinsans', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(233, 62, 125, 0.45);
}

.spotlight-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    gap: 2px;
}

.spotlight-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.spotlight-name-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.spotlight-name-container.is-scrolling-wrap {
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 14px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 14px), transparent 100%);
}

.spotlight-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.spotlight-name.is-scrolling {
    animation: spotlightNameScroll 7s ease-in-out 1.2s infinite alternate;
}

@keyframes spotlightNameScroll {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(var(--spotlight-scroll-dist, -40px));
    }
}

.spotlight-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotlight-badges .qari-class-badge {
    font-size: 0.68rem;
    padding: 1px 7px;
}

.spotlight-riwayah {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qari-drawer-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 24px 8px;
    overflow-x: auto;
}

.qari-filter-tab {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(47, 72, 88, 0.12);
    background: #FFFFFF;
    color: var(--tz-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.qari-filter-tab:hover {
    color: var(--tz-dark-navy);
    border-color: rgba(47, 72, 88, 0.25);
}

.qari-filter-tab.is-active {
    background: var(--tz-dark-navy);
    color: #FFFFFF;
    border-color: var(--tz-dark-navy);
}

.qari-drawer-search-wrap {
    position: relative;
    padding: 8px 24px 12px;
}

.qari-drawer-search-wrap svg {
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tz-text-muted);
    pointer-events: none;
}

.qari-drawer-search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    color: var(--tz-dark-navy);
    outline: none;
    transition: all 0.2s;
}

.qari-drawer-search-wrap input:focus {
    border-color: var(--tz-pink);
    box-shadow: 0 0 0 4px rgba(233, 62, 125, 0.12);
}

.qari-classification-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 24px 10px;
    padding: 10px 14px;
    background: rgba(245, 235, 225, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(47, 72, 88, 0.06);
    font-size: 0.74rem;
    color: var(--tz-text-muted);
}

.qari-classification-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-qari-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 6px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.studio-qari-list::-webkit-scrollbar {
    width: 6px;
}
.studio-qari-list::-webkit-scrollbar-thumb {
    background: rgba(47, 72, 88, 0.18);
    border-radius: 999px;
}

.studio-qari-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 18px;
    background: #FFFFFF;
    border: 1.5px solid rgba(47, 72, 88, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 12px;
}

.studio-qari-card:hover {
    border-color: var(--tz-pink);
    background: rgba(245, 235, 225, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(233, 62, 125, 0.08);
}

.studio-qari-card.is-active {
    border-color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.06);
}

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

.studio-qari-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(47, 72, 88, 0.07);
    color: var(--tz-dark-navy);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.studio-qari-card.is-active .studio-qari-avatar {
    background: var(--tz-pink);
    color: #FFFFFF;
}

.studio-qari-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.studio-qari-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--tz-dark-navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.studio-qari-arabic {
    font-family: 'Amiri', serif;
    font-size: 0.95rem;
    color: var(--tz-text-muted);
}

.studio-qari-style {
    font-size: 0.72rem;
    color: var(--tz-text-muted);
}

.studio-qari-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Compact Qari Classification Icon Pill (Monotone SVG Icons) */
.qari-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    flex-shrink: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.qari-icon-pill svg {
    flex-shrink: 0;
}

.qari-icon-pill.icon-synced {
    background: rgba(47, 72, 88, 0.06);
    color: var(--tz-dark-navy);
    border: 1px solid rgba(47, 72, 88, 0.12);
}

.qari-icon-pill.icon-audio-only {
    background: rgba(47, 72, 88, 0.04);
    color: var(--tz-text-muted);
    border: 1px solid rgba(47, 72, 88, 0.1);
}

.studio-qari-card:hover .qari-icon-pill.icon-synced {
    background: rgba(47, 72, 88, 0.1);
    color: var(--tz-dark-navy);
}

.studio-qari-card.is-active .qari-icon-pill.icon-synced {
    background: rgba(233, 62, 125, 0.1);
    color: var(--tz-pink);
    border-color: rgba(233, 62, 125, 0.25);
}

.studio-qari-active-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tz-pink);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
}

.qari-drawer-footer {
    padding: 14px 24px 18px;
    border-top: 1px solid rgba(47, 72, 88, 0.08);
    background: #FAFAFA;
}

.open-full-directory-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(47, 72, 88, 0.12);
    background: #FFFFFF;
    color: var(--tz-dark-navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.open-full-directory-btn:hover {
    border-color: var(--tz-pink);
    color: var(--tz-pink);
    background: rgba(233, 62, 125, 0.05);
}

/* Responsive adjustments: Spotify Mobile & Tablet Layout */
@media (max-width: 1024px) {
    .studio-mobile-nav-tabs {
        display: flex;
    }

    .quran-studio-layout {
        display: block;
        height: auto;
        padding: 0 16px;
        margin: 10px auto 120px;
    }

    .studio-panel {
        display: none !important;
    }

    .studio-panel.is-active-mobile {
        display: flex !important;
        position: static;
        height: auto;
        max-height: none;
        width: 100%;
    }

    .studio-center-stage.is-active-mobile {
        height: auto;
    }

    .studio-center-stage.is-active-mobile .main-player-wrapper {
        height: auto;
    }

    .studio-center-stage.is-active-mobile .tanzeel-player-card {
        height: auto;
        max-height: none;
        padding: 16px;
    }

    .studio-center-stage.is-active-mobile .mushaf-content {
        max-height: calc(100vh - 300px);
        min-height: 380px;
    }

    .studio-surahs-column {
        position: static;
        height: calc(100vh - 220px);
        max-height: calc(100vh - 220px);
    }

    .studio-qaris-column {
        position: static;
        height: calc(100vh - 220px);
        max-height: calc(100vh - 220px);
    }

    .bar-track-info {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .studio-door-pull-tab {
        display: inline-flex;
        font-size: 0.76rem;
        padding: 4px 10px;
    }

    .quran-studio-layout.qaris-collapsed {
        grid-template-columns: none;
        gap: 0;
    }

    .quran-studio-layout.qaris-collapsed .studio-qaris-column {
        transform: none;
        opacity: 1;
        width: 100%;
        visibility: visible;
    }
}

/* ==========================================================================
   MASTER BOTTOM RECITATION PLAYER BAR (YouTube Music Style)
   ========================================================================== */
.master-bottom-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: rgba(22, 33, 43, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
    color: #ffffff;
    padding: 0 24px 8px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Timeline scrubber track at top of player bar (matching secondary screenshot) */
.bar-timeline-container {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 0 2px;
    width: 100%;
}

.bar-time {
    font-size: 0.74rem;
    font-family: 'Outfit', monospace, sans-serif;
    color: rgba(255, 255, 255, 0.65);
    min-width: 42px;
    text-align: center;
    font-weight: 500;
    user-select: none;
}

.bar-slider-track {
    position: relative;
    flex: 1;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.bar-progress-filled {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--tz-pink);
    border-radius: 999px;
    pointer-events: none;
    z-index: 2;
    transition: height 0.15s ease;
}

.bar-slider-track:hover .bar-progress-filled {
    height: 6px;
}

.bar-audio-progress {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
    transition: height 0.15s ease;
}

.bar-slider-track:hover .bar-audio-progress {
    height: 6px;
}

.bar-audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2.5px solid var(--tz-pink);
    box-shadow: 0 0 10px rgba(233, 62, 125, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.bar-slider-track:hover .bar-audio-progress::-webkit-slider-thumb {
    transform: scale(1.3);
}

.bar-audio-progress::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2.5px solid var(--tz-pink);
    box-shadow: 0 0 10px rgba(233, 62, 125, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease;
}

/* Bottom Bar Content Row */
.bar-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 0 2px;
}

/* Left: Track Info */
.bar-track-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 360px;
    min-width: 260px;
    max-width: 440px;
}

.bar-track-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(233, 62, 125, 0.14);
    color: var(--tz-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(233, 62, 125, 0.25);
}

.bar-track-labels {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
    flex: 1;
}

.bar-surah-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.94rem;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-surah-english {
    font-family: 'Parkinsans', sans-serif;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-surah-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    direction: rtl;
    line-height: 1;
    flex-shrink: 0;
}

.bar-reciter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    min-width: 0;
}

.bar-reciter-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.bar-reciter-title .qari-class-badge {
    flex-shrink: 0;
}

/* Center: Master Playback Controls */
.bar-center-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 2;
}

.bar-ctrl-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bar-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--tz-pink);
    transform: scale(1.06);
}

.bar-main-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tz-pink);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(233, 62, 125, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.bar-main-play-btn:hover {
    background: #d6336c;
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(233, 62, 125, 0.6);
}

/* Loop & Speed controls in bar */
.bar-tool-btn.loop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bar-tool-btn.loop-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.bar-tool-btn.loop-btn.is-active,
.bar-tool-btn.loop-btn.mode-single,
.bar-tool-btn.loop-btn.mode-all {
    border-color: rgba(233, 62, 125, 0.45);
    color: var(--tz-pink);
}

.master-bottom-player-bar .speed-pills-group {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.07);
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.master-bottom-player-bar .speed-pill-btn {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.master-bottom-player-bar .speed-pill-btn:hover {
    color: #ffffff;
}

.master-bottom-player-bar .speed-pill-btn.is-active {
    background: #ffffff;
    color: var(--tz-dark-navy);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Right: Tools */
.bar-right-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.player-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.bar-icon-btn.favorite-btn:hover,
.bar-icon-btn.favorite-btn.is-active {
    color: var(--tz-pink);
}

.bar-close-btn:hover {
    color: #f87171;
}

.volume-slider {
    width: 76px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FFFFFF;
    cursor: pointer;
}

/* Responsive adjustments for bottom player */
@media (max-width: 900px) {
    .master-bottom-player-bar {
        padding: 0 16px 8px;
    }
    .bar-tool-btn.loop-btn,
    .master-bottom-player-bar .speed-pills-group {
        display: none;
    }
    .volume-slider {
        width: 50px;
    }
}

@media (max-width: 640px) {
    .bar-track-info {
        max-width: 150px;
    }
    .bar-surah-arabic,
    .bar-reciter-title .qari-class-badge {
        display: none;
    }
    .player-volume-wrap {
        display: none;
    }


