/* ============================================================
   QURAN WEBSITE - COMPLETE STYLESHEET
   Multiple themes: Light, Dark, Gold, Sepia
   ============================================================ */

/* ==================== THEME VARIABLES ==================== */
:root,
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f4f8;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --accent-primary: #2d6a4f;
    --accent-secondary: #40916c;
    --accent-light: #d8f3dc;
    --accent-gradient: linear-gradient(135deg, #2d6a4f 0%, #40916c 50%, #52b788 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --arabic-font: 'Scheherazade New', 'Amiri', serif;
    --body-font: 'Inter', sans-serif;
    --urdu-font: 'Noto Nastaliq Urdu', 'Amiri', serif;
    --hindi-font: 'Noto Sans Devanagari', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #283548;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --accent-primary: #52b788;
    --accent-secondary: #74c69d;
    --accent-light: rgba(82, 183, 136, 0.15);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
}

[data-theme="gold"] {
    --bg-primary: #1a1510;
    --bg-secondary: #2a2218;
    --bg-card: #2a2218;
    --bg-hover: #3a3020;
    --text-primary: #f5e6c8;
    --text-secondary: #d4c4a8;
    --text-muted: #a89880;
    --border-color: #4a3d2a;
    --accent-primary: #d4a843;
    --accent-secondary: #e8c252;
    --accent-light: rgba(212, 168, 67, 0.15);
    --accent-gradient: linear-gradient(135deg, #8b6914 0%, #d4a843 50%, #f0d060 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.6);
}

[data-theme="sepia"] {
    --bg-primary: #f4ede4;
    --bg-secondary: #faf6f0;
    --bg-card: #faf6f0;
    --bg-hover: #efe8dd;
    --text-primary: #3d2e1c;
    --text-secondary: #5a4a36;
    --text-muted: #8a7a66;
    --border-color: #d9cfc2;
    --accent-primary: #8b5e3c;
    --accent-secondary: #a67c52;
    --accent-light: rgba(139, 94, 60, 0.12);
    --accent-gradient: linear-gradient(135deg, #6b4226 0%, #8b5e3c 50%, #a67c52 100%);
    --shadow-sm: 0 1px 3px rgba(61,46,28,0.1);
    --shadow-md: 0 4px 15px rgba(61,46,28,0.15);
    --shadow-lg: 0 10px 40px rgba(61,46,28,0.2);
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
    white-space: nowrap;
}

.nav-logo i {
    font-size: 1.5rem;
}

/* Search */
.nav-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.nav-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--body-font);
    outline: none;
    transition: var(--transition);
}

.nav-search input:focus {
    border-color: var(--accent-primary);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-dropdown.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.search-result-info h4 {
    font-size: 0.95rem;
}

.search-result-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 3px;
}

.theme-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.theme-btn.active {
    background: var(--accent-primary);
    color: #fff;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    background: var(--accent-gradient);
    padding: 60px 20px 50px;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.hero-stat {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.hero-stat strong {
    font-size: 1.2rem;
    display: block;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.hero-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.hero-search input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    outline: none;
    font-family: var(--body-font);
}

/* ==================== BROWSE SECTION ==================== */
.browse-section {
    padding: 30px 0 60px;
}

.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin: 0 auto;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.tab.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.3);
}

/* ==================== SURAH GRID ==================== */
.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.surah-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.surah-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.surah-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.surah-number-diamond {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.surah-number-diamond span {
    transform: rotate(-45deg);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.surah-name-en {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.surah-meaning {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.surah-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.revelation-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.revelation-badge.meccan {
    background: rgba(45, 106, 79, 0.1);
    color: var(--accent-primary);
}

.revelation-badge.medinan {
    background: rgba(30, 64, 175, 0.1);
    color: #3b82f6;
}

[data-theme="dark"] .revelation-badge.meccan,
[data-theme="gold"] .revelation-badge.meccan {
    background: rgba(82, 183, 136, 0.15);
    color: #74c69d;
}

[data-theme="dark"] .revelation-badge.medinan,
[data-theme="gold"] .revelation-badge.medinan {
    background: rgba(96, 165, 250, 0.15);
    color: #93bbfb;
}

.verse-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.surah-name-ar {
    font-family: var(--arabic-font);
    font-size: 1.6rem;
    color: var(--accent-primary);
    line-height: 1.4;
}

/* ==================== JUZ GRID ==================== */
.juz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.juz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.juz-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.juz-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.juz-number-badge {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.juz-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.juz-arabic {
    font-family: var(--arabic-font);
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.juz-range {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.range-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    min-width: 36px;
}

/* ==================== SURAH HEADER ==================== */
.surah-header-section {
    padding: 30px 0 0;
}

.surah-header-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--accent-gradient);
    padding: 40px 30px;
    color: #fff;
}

.surah-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.surah-header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.surah-header-content {
    position: relative;
    z-index: 1;
}

.surah-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.surah-title-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.surah-number-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
}

.surah-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.surah-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 2px;
}

.surah-arabic-title {
    font-family: var(--arabic-font);
    font-size: 2.5rem;
    opacity: 0.9;
    line-height: 1.4;
}

.surah-info-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== READING OPTIONS BAR ==================== */
.reading-options {
    padding: 20px 0;
    position: sticky;
    top: 64px;
    z-index: 50;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.options-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.toggle-buttons {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 3px;
    gap: 3px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
    border: none;
    background: none;
    font-family: var(--body-font);
}

.toggle-btn:hover {
    color: var(--accent-primary);
}

.toggle-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 3px 12px;
}

.size-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.size-btn:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

#fontSizeLabel {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 36px;
    text-align: center;
}

/* Academy options */
.academy-options-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

.academy-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lang-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-left: 6px;
}

/* Page jump */
.page-jump-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-jump-input {
    width: 70px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    outline: none;
    font-family: var(--body-font);
}

.page-jump-input:focus {
    border-color: var(--accent-primary);
}

/* ==================== BISMILLAH ==================== */
.bismillah-container {
    padding: 20px 0 10px;
}

.bismillah {
    font-family: var(--arabic-font);
    font-size: 2rem;
    text-align: center;
    color: var(--accent-primary);
    padding: 20px;
    line-height: 2;
}

/* ==================== VERSE CARDS ==================== */
.verses-section {
    padding: 20px 0 40px;
}

.verse-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.verse-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.verse-card:hover {
    box-shadow: var(--shadow-sm);
}

.verse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
}

.verse-number-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 36px;
    padding: 0 12px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.verse-actions {
    display: flex;
    gap: 4px;
}

.verse-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.verse-action-btn:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.verse-arabic {
    padding: 24px 20px 20px;
    font-family: var(--arabic-font);
    font-size: 2rem;
    line-height: 2.2;
    text-align: right;
    direction: rtl;
    color: var(--text-primary);
    word-spacing: 6px;
}

.verse-end-symbol,
.verse-end-marker {
    color: var(--accent-primary);
    font-size: 0.9em;
    padding: 0 4px;
}

.verse-transliteration {
    padding: 0 20px 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
}

.verse-translation-section {
    border-top: 1px solid var(--border-color);
    margin: 0 20px;
}

.verse-translation {
    padding: 16px 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.trans-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.academy-label {
    color: #3b82f6;
}

.academy-translation {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.academy-content {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-primary);
    padding: 8px 0;
}

.academy-content[dir="rtl"] {
    text-align: right;
    font-family: var(--urdu-font);
    font-size: 1.3rem;
    line-height: 2.4;
}

.academy-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.no-academy-text {
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.no-academy-text a {
    color: var(--accent-primary);
    font-weight: 600;
    margin-left: 6px;
}

/* ==================== READING MODE ==================== */
.reading-mode-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 30px;
}

.reading-text {
    font-family: var(--arabic-font);
    font-size: 2rem;
    line-height: 2.5;
    text-align: justify;
    direction: rtl;
    color: var(--text-primary);
    word-spacing: 6px;
}

.reading-verse {
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    padding: 2px 0;
}

.reading-verse:hover,
.reading-verse.active {
    background: var(--accent-light);
}

.reading-translations {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.translation-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.translation-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.trans-verse-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: 50px;
    height: fit-content;
    white-space: nowrap;
}

.translation-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.academy-text {
    line-height: 2;
}

.academy-text[dir="rtl"] {
    font-size: 1.2rem;
    line-height: 2.4;
}

/* ==================== MUSHAF PAGE VIEW ==================== */
.page-header-section {
    padding: 20px 0 0;
}

.page-header-card {
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    padding: 20px 30px;
    color: #fff;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.page-arrow-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition);
}

.page-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.page-center-info {
    text-align: center;
}

.page-number-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-num-ar {
    font-family: var(--arabic-font);
    font-size: 2rem;
    font-weight: 700;
}

.page-num-en {
    font-size: 0.9rem;
    opacity: 0.8;
}

.page-juz-badge {
    display: inline-block;
    padding: 3px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    margin-top: 6px;
}

.page-surah-names {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-surah-link {
    font-family: var(--arabic-font);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
}

.page-surah-link:hover {
    color: #fff;
}

.page-section {
    padding: 20px 0 40px;
}

/* Mushaf page styling */
.mushaf-page {
    max-width: 800px;
    margin: 0 auto;
}

.mushaf-border {
    background: var(--bg-card);
    border: 3px solid var(--accent-primary);
    border-radius: 4px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
}

.mushaf-inner {
    border: 1px solid var(--border-color);
    padding: 30px 24px;
    min-height: 500px;
    font-family: var(--arabic-font);
    font-size: 1.8rem;
    line-height: 2.4;
    text-align: justify;
    direction: rtl;
    color: var(--text-primary);
    word-spacing: 4px;
}

.mushaf-surah-header {
    text-align: center;
    margin: 16px 0;
    clear: both;
    display: block;
    width: 100%;
}

.mushaf-surah-frame {
    display: inline-block;
    padding: 10px 40px;
    background: var(--accent-gradient);
    border-radius: 50px;
    color: #fff;
}

.mushaf-surah-name {
    font-family: var(--arabic-font);
    font-size: 1.4rem;
    font-weight: 700;
}

.mushaf-bismillah {
    text-align: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin: 12px 0 16px;
    display: block;
    clear: both;
    width: 100%;
}

.mushaf-verse {
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 2px;
}

.mushaf-verse:hover {
    background: var(--accent-light);
}

.page-translations {
    max-width: 800px;
    margin: 30px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

/* ==================== JUZ SURAH DIVIDER ==================== */
.juz-surah-divider {
    text-align: center;
    padding: 20px 0;
}

.juz-surah-divider a,
.juz-surah-divider span {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.juz-surah-divider a:hover {
    transform: scale(1.03);
}

/* ==================== SURAH NAVIGATION ==================== */
.surah-navigation {
    padding: 20px 0 40px;
}

.surah-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.surah-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    min-width: 200px;
}

.surah-nav-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.surah-nav-btn.home {
    min-width: auto;
    padding: 14px 30px;
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.nav-direction {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.nav-surah-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.surah-nav-btn.prev {
    justify-content: flex-start;
}

.surah-nav-btn.next {
    justify-content: flex-end;
    text-align: right;
}

/* ==================== SCROLL TOP BUTTON ==================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 99;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent-primary);
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ==================== TAJWEED COLORS ==================== */
/* Vibrant colors matching traditional Quran tajweed highlighting */

/* Hamza Wasl - Bright Green */
.tjw-hamza { color: #00c853; font-weight: 600; }

/* Laam Shamsiyya - Gray */
.tjw-laam { color: #9e9e9e; }

/* Silent Letters - Muted */
.tjw-silent { color: #9e9e9e; opacity: 0.6; }

/* Madd Normal - Bright Cyan */
.tjw-madd-normal { color: #00bcd4; font-weight: 600; }

/* Madd Permissible - Cyan */
.tjw-madd-permissible { color: #26c6da; font-weight: 600; }

/* Madd Obligatory - Deep Cyan */
.tjw-madd-obligatory { color: #0097a7; font-weight: 700; }

/* Qalqalah - Vibrant Cyan */
.tjw-qalqalah { color: #00e5ff; font-weight: 600; }

/* Ikhfaa - Bright Orange */
.tjw-ikhfaa { color: #ff9100; font-weight: 600; }

/* Idghaam with Ghunnah - Vibrant Magenta/Pink */
.tjw-idghaam-ghunnah { color: #ff4081; font-weight: 600; }

/* Idghaam without Ghunnah - Deep Pink */
.tjw-idghaam-no-ghunnah { color: #f50057; font-weight: 600; }

/* Iqlab - Hot Pink */
.tjw-iqlab { color: #ff1493; font-weight: 600; }

/* Ghunnah - Bright Yellow */
.tjw-ghunnah { color: #ffea00; font-weight: 600; }

/* Idhaar - Bright Red */
.tjw-idhaar { color: #ff1744; font-weight: 600; }

/* Default fallback */
.tjw-default { color: inherit; }

/* Light theme adjustments - slightly darker for visibility */
[data-theme="light"] .tjw-laam { color: #757575; }
[data-theme="light"] .tjw-silent { color: #9e9e9e; }
[data-theme="light"] .tjw-madd-normal { color: #0097a7; }
[data-theme="light"] .tjw-madd-permissible { color: #00acc1; }
[data-theme="light"] .tjw-ghunnah { color: #f9a825; }
[data-theme="light"] .tjw-hamza { color: #00c853; }
[data-theme="light"] .tjw-qalqalah { color: #00b8d4; }

/* Gold theme adjustments */
[data-theme="gold"] .tjw-madd-normal { color: #4dd0e1; }
[data-theme="gold"] .tjw-ghunnah { color: #ffeb3b; }
[data-theme="gold"] .tjw-hamza { color: #69f0ae; }
[data-theme="gold"] .tjw-qalqalah { color: #18ffff; }

/* Sepia theme adjustments */
[data-theme="sepia"] .tjw-laam { color: #8d6e63; }
[data-theme="sepia"] .tjw-madd-normal { color: #0097a7; }
[data-theme="sepia"] .tjw-ghunnah { color: #ff8f00; }
[data-theme="sepia"] .tjw-hamza { color: #00c853; }
[data-theme="sepia"] .tjw-ikhfaa { color: #ff6d00; }
[data-theme="sepia"] .tjw-qalqalah { color: #00bcd4; }

/* Verse card tajweed mode indicator */
.verse-arabic.tajweed-mode {
    letter-spacing: 0.5px;
}

/* Old API class-based tajweed (fallback) */
.tajweed-mode [class*="ikhfaa"] { color: #ff922b; }
.tajweed-mode [class*="idghaam"] { color: #da77f2; }
.tajweed-mode [class*="qalqalah"] { color: #22b8cf; }
.tajweed-mode [class*="ghunnah"] { color: #ffd43b; }
.tajweed-mode [class*="idhaar"] { color: #ff6b6b; }
.tajweed-mode [class*="madd"] { color: #4dabf7; }

/* ==================== OPTIONS BAR ROW 2 ==================== */
.options-bar-row2 {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

/* Select Dropdown */
.select-dropdown select {
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--body-font);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 160px;
}

.select-dropdown select:focus {
    border-color: var(--accent-primary);
}

/* Font Switcher */
.font-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 3px;
}

.font-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.font-btn:hover {
    color: var(--accent-primary);
    background: var(--accent-light);
}

.font-btn.active {
    background: var(--accent-primary);
    color: #fff;
}

/* ==================== WORD BY WORD ==================== */
.word-by-word-section {
    padding: 16px 20px;
    background: var(--bg-hover);
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.wbw-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    direction: rtl;
}

.wbw-word {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 70px;
}

.wbw-word:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.wbw-word.playing {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

.wbw-arabic {
    font-family: var(--arabic-font);
    font-size: 1.4rem;
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
}

.wbw-translit {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
    direction: ltr;
}

.wbw-meaning {
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-top: 4px;
    text-align: center;
    font-weight: 500;
    direction: ltr;
}

/* RTL language meanings */
.wbw-meaning[dir="rtl"] {
    font-family: var(--urdu-font);
    font-size: 0.85rem;
    direction: rtl;
}

/* ==================== TRANSLATION MULTI-SELECT ==================== */
.trans-multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.trans-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.trans-checkbox:hover {
    border-color: var(--accent-primary);
}

.trans-checkbox.selected {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.trans-checkbox input {
    display: none;
}

.trans-checkbox i {
    font-size: 0.7rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-search {
        display: none;
    }

    .nav-link span {
        display: none;
    }

    .theme-switcher,
    .font-switcher {
        display: none;
    }

    .options-bar-row2 {
        flex-direction: column;
        gap: 12px;
    }

    .select-dropdown select {
        width: 100%;
    }

    .wbw-container {
        gap: 8px;
    }

    .wbw-word {
        min-width: 60px;
        padding: 8px 10px;
    }

    .wbw-arabic {
        font-size: 1.2rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .hero-stat {
        font-size: 0.8rem;
    }
    
    .surah-grid {
        grid-template-columns: 1fr;
    }
    
    .juz-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        width: 100%;
        justify-content: center;
    }
    
    .tab span {
        display: none;
    }
    
    .options-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }
    
    .toggle-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .toggle-btn {
        flex: 1;
        justify-content: center;
    }
    
    .verse-arabic {
        font-size: 1.5rem;
        padding: 16px;
    }
    
    .reading-text {
        font-size: 1.5rem;
    }
    
    .mushaf-inner {
        font-size: 1.4rem;
        padding: 20px 16px;
    }
    
    .surah-header-card {
        padding: 25px 20px;
    }
    
    .surah-title {
        font-size: 1.3rem;
    }
    
    .surah-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .surah-nav-row {
        flex-direction: column;
    }
    
    .surah-nav-btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .reading-options {
        top: 56px;
    }
    
    .academy-options-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header-card {
        padding: 16px 20px;
    }
}

/* ==================== SCROLLBAR ==================== */
::selection {
    background: var(--accent-primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}