/* ============================================
   Quran Word Study - Styling
   ============================================ */

:root {
    --primary: #1a7a4c;
    --primary-dark: #145c39;
    --primary-light: #e8f5e9;
    --learned: #2e7d32;
    --learned-bg: #c8e6c9;
    --unlearned: #ff9800;
    --unlearned-bg: #fff3e0;
    --danger: #d32f2f;
    --bg: #fafbfc;
    --card-bg: #ffffff;
    --text: #212529;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: 0.2s ease;
    --sidebar-width: 320px;
    --header-height: 60px;
    --arabic-font-size: 1.3rem;
    --arabic-bold: 400;
    --trans-font-size: 0.78rem;
}

/* ---- DARK THEME ---- */
[data-theme="dark"] {
    --primary: #4caf50;
    --primary-dark: #388e3c;
    --primary-light: #1b3a1b;
    --learned: #66bb6a;
    --learned-bg: #1b3a1b;
    --unlearned: #ff9800;
    --unlearned-bg: #3e2723;
    --danger: #ef5350;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #e0e0e0;
    --text-secondary: #9e9e9e;
    --border: #333;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    color-scheme: dark;
}

[data-theme="dark"] .surah-item:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .surah-number {
    background: #333;
    color: #ccc;
}

[data-theme="dark"] .surah-item.active {
    background: var(--primary-light);
}

[data-theme="dark"] .surah-item.active .surah-number {
    background: var(--primary);
    color: white;
}

[data-theme="dark"] .word-arabic {
    color: #ffffff;
}

[data-theme="dark"] .word-translation {
    color: #b0b0b0;
}

[data-theme="dark"] .word-transliteration {
    color: #888;
}

[data-theme="dark"] .ayah-card {
    border-color: #333;
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .modal-box {
    background: #1e1e1e;
}

[data-theme="dark"] .sidebar-search input {
    background: #2a2a2a;
    color: var(--text);
    border-color: #444;
}

[data-theme="dark"] .word-card.unlearned {
    #border-color: #444;
}

[data-theme="dark"] select {
    background: #2a2a2a;
    color: var(--text);
    border-color: #444;
}

/* ---- SEPIA THEME ---- */
[data-theme="sepia"] {
    --primary: #8b6f47;
    --primary-dark: #6d5838;
    --primary-light: #f0e6d3;
    --learned: #8b6f47;
    --learned-bg: #e8dcc8;
    --unlearned: #c97b3a;
    --unlearned-bg: #f5e6d3;
    --danger: #a04030;
    --bg: #f5f0e8;
    --card-bg: #fcf8f0;
    --text: #3e2e1a;
    --text-secondary: #7a6a50;
    --border: #d8cdb8;
    --shadow: 0 1px 3px rgba(62,46,26,0.08);
    --shadow-md: 0 4px 12px rgba(62,46,26,0.12);
}

[data-theme="sepia"] .word-arabic {
    color: #3e2e1a;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- HEADER ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
}

.header-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: -0.3px;
}

.header-spacer { flex: 1; }

.header-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.progress-bar-wrap {
    width: 180px;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #43a047);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* ---- TOGGLE SWITCH ---- */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* ---- LAYOUT ---- */
.app-container {
    display: flex;
    height: calc(100vh - var(--header-height));
}

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, margin-left 0.25s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
    margin-left: calc(-1 * var(--sidebar-width));
    min-width: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    font-size: 1.1rem;
    padding: 4px 10px;
    line-height: 1;
}

.sidebar-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 2;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    outline: none;
    transition: border var(--transition);
}

.sidebar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,122,76,0.15);
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
}

.surah-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background var(--transition);
    gap: 10px;
}

.surah-item:hover {
    background: #f8f9fa;
}

.surah-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.surah-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.surah-item.active .surah-number {
    background: var(--primary);
    color: white;
}

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

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

.surah-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.surah-progress-mini {
    flex-shrink: 0;
}

.mini-circle {
    width: 36px;
    height: 36px;
}

.mini-circle-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 3;
}

.mini-circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
}

.surah-item.not-loaded {
    opacity: 0.7;
}

.surah-item.not-loaded:hover {
    background: #fff8e1;
}

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* ---- WELCOME / EMPTY STATE ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* ---- SURAH HEADER ---- */
.surah-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.surah-header .arabic-name {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    direction: rtl;
}

.surah-header .latin-name {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.surah-header .translated-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.surah-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    background: var(--card-bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: #f8f9fa;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.btn-sm {
    padding: 4px 10px;
    font-size: 0.78rem;
}

.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #ffebee;
}

/* ---- AYAH CARD ---- */
.ayah-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    position: relative;
}

.ayah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ayah-number-badge {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.ayah-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    direction: rtl;
}

/* ---- WORD CARD ---- */
.word-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    min-width: 70px;
    position: relative;
    user-select: none;
}

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

.word-card.learned {
    background: var(--learned-bg);
    border-color: var(--learned);
}

.word-card.unlearned {
    background: var(--card-bg);
    border-color: #e0e0e0;
}

.word-card.unlearned:hover {
    border-color: var(--unlearned);
}

.word-arabic {
    font-size: var(--arabic-font-size, 1.3rem);
    font-weight: var(--arabic-bold, 400);
    color: #1a1a1a;
    line-height: 1.8;
    direction: rtl;
}

.word-translation {
    font-size: var(--trans-font-size, 0.78rem);
    color: var(--text-secondary);
    margin-top: 2px;
    text-align: center;
    direction: ltr;
    word-wrap: break-word;
    max-width: 120px;
}

.word-translation.hidden {
    display: none;
}

.word-card.learned .word-translation.hidden-by-toggle {
    display: none;
}

.word-transliteration {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
    direction: ltr;
}

.word-learned-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--learned);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

/* ---- LOADING ---- */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-secondary);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e9ecef;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- TOAST ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: #333;
    color: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---- STATS ---- */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
        transition: max-height 0.25s ease, opacity 0.25s ease;
    }

    .sidebar.hidden {
        max-height: 0;
        min-width: unset;
        width: 100%;
        transform: none;
        margin-left: 0;
        opacity: 0;
        overflow: hidden;
        border-bottom: none;
    }

    .header {
        padding: 0 12px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .options-separator {
        display: none;
    }

    .options-group select {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .header-brand {
        font-size: 1rem;
        white-space: nowrap;
    }

    .toggle-label {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .toggle-switch {
        width: 36px;
        height: 22px;
        min-width: 36px;
    }

    .toggle-switch::after {
        width: 16px;
        height: 16px;
    }

    .progress-bar-wrap {
        width: 100px;
    }

    .main-content {
        padding: 12px;
    }

    .word-card {
        min-width: 55px;
        padding: 8px 5px;
    }

    .word-arabic {
        font-size: 1.1rem;
    }

    .surah-header .arabic-name {
        font-size: 1.8rem;
    }
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ---- OPTIONS PANEL ---- */
.options-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.options-group select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    outline: none;
}

.options-group select:focus {
    border-color: var(--primary);
}

/* ---- NO BORDER ---- */
.word-card.no-border {
    border-color: transparent !important;
}

.word-card.no-border:hover {
    border-color: var(--primary) !important;
}

/* ---- ARABIC FONTS ---- */
:root,
[data-arabic-font="uthmani"] .word-arabic {
    font-family: 'Traditional Arabic', 'Scheherazade New', 'Amiri', serif;
}

[data-arabic-font="naskh"] .word-arabic {
    font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
}

[data-arabic-font="indopak"] .word-arabic {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
}

[data-arabic-font="amiri"] .word-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif;
}

/* ---- OPTIONS SEPARATOR ---- */
.options-separator {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

/* ---- FREQUENCY BADGE ---- */
.word-frequency {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    margin-top: 3px;
    line-height: 1.4;
}

/* ---- SETTINGS SLIDER ---- */
.settings-slider-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.settings-slider-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.settings-slider {
    width: 60px;
    height: 4px;
    accent-color: var(--primary);
    cursor: pointer;
}

.settings-slider-value {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* ---- ABOUT MODAL ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.modal-section p,
.modal-section li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-section ul {
    padding-left: 18px;
}

.modal-license {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
    margin-top: 2px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ---- WORD EXPLORE BUTTON ---- */
.word-explore-btn {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    line-height: 1;
}

.word-card:hover .word-explore-btn {
    opacity: 1;
}

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

/* ---- EXPLORER MODAL ---- */
.explorer-scope-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.explorer-scope-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.15s;
}

.explorer-scope-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.explorer-scope-btn:hover:not(.active) {
    background: var(--primary-light);
}

.explorer-surah-group {
    margin-bottom: 12px;
}

.explorer-surah-header {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.explorer-word {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.explorer-word:hover {
    background: var(--primary-light);
}

.explorer-word.learned {
    background: var(--learned-bg);
}

.explorer-ayah {
    min-width: 100px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.explorer-arabic {
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
}

.explorer-trans {
    color: var(--text-secondary);
    flex: 1;
}

.explorer-check {
    font-size: 0.85rem;
}

/* ---- FREQUENCY MODAL ---- */
.freq-word {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.freq-word:hover {
    background: #f8f9fa;
}

.freq-word.learned {
    background: var(--learned-bg);
}

.freq-arabic {
    font-size: 1.1rem;
    min-width: 70px;
    text-align: center;
}

.freq-trans {
    color: var(--text-secondary);
    flex: 1;
    font-size: 0.8rem;
}

.freq-count {
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 40px;
    text-align: right;
}

.freq-count-in-surah {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--primary);
    min-width: 36px;
    text-align: right;
}

.freq-learned {
    font-size: 0.9rem;
    min-width: 24px;
    text-align: center;
}

.freq-explore-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 6px;
}

.freq-explore-btn:hover {
    background: var(--primary-light);
}

/* ---- QUIZ ---- */
.quiz-question {
    text-align: center;
    padding: 20px 10px;
}

.quiz-translation {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.quiz-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px 20px;
}

.quiz-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--card-bg);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(4px);
}

.quiz-option.correct {
    border-color: var(--learned);
    background: var(--learned-bg);
}

.quiz-option.wrong {
    border-color: var(--danger);
    background: #ffebee;
}

.quiz-option-arabic {
    font-size: 1.3rem;
    font-weight: 500;
}

.quiz-option-trans {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.quiz-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 10px 20px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.quiz-result {
    text-align: center;
    padding: 30px 10px;
}

.quiz-result-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.quiz-result-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.quiz-result-pct {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.quiz-result-msg {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 20px;
}
