@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

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

/* English Learning theme: clear water + warm paper – calm, attractive, study-friendly */
:root {
    --primary-color: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #2dd4bf;
    --water-deep: #0f766e;
    --water-mid: #14b8a6;
    --water-light: #99f6e4;
    --secondary-color: #0ea5e9;
    --accent-color: #d97706;
    --accent-light: #fef3c7;
    --paper: #fffbeb;
    --paper-warm: #fefce8;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --bg-water-tint: rgba(240, 253, 250, 0.5);
    --border-color: rgba(13, 148, 136, 0.12);
    --success-color: #059669;
    --error-color: #dc2626;
    --warning-color: #d97706;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-2xl: 32px;
    --shadow-sm: 0 1px 3px rgba(15, 118, 110, 0.06);
    --shadow-md: 0 4px 14px rgba(15, 118, 110, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 40px rgba(15, 118, 110, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 24px 56px rgba(15, 118, 110, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 0 1px rgba(13, 148, 136, 0.1), 0 8px 24px rgba(13, 148, 136, 0.14);
    --visit-banner-h: 0px;
}

html.has-visit-banner {
    --visit-banner-h: 52px;
}

/* Bandeau compteur de visites — fixe en haut */
.visit-counter-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2505;
    min-height: var(--visit-banner-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f766e 0%, var(--primary-color) 45%, #0ea5e9 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(15, 118, 110, 0.35);
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.visit-counter-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    padding: 10px 0;
    max-width: 100%;
}

.visit-counter-banner__value {
    font-size: 1.15em;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.visit-counter-banner__suffix {
    opacity: 0.92;
    font-weight: 600;
}

html.has-visit-banner .sidebar {
    top: var(--visit-banner-h);
    height: calc(100vh - var(--visit-banner-h));
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(160deg, #f0fdfa 0%, #ccfbf1 22%, #fffbeb 50%, #fefce8 78%, #ecfdf5 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 24px 24px 24px 280px;
    direction: rtl;
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* دسکتاپ بزرگ (۱۴۰۰+): فاصله بیشتر */
@media (min-width: 1400px) {
    body { padding: 24px 24px 24px 300px; }
    html.has-visit-banner body {
        padding-top: calc(24px + var(--visit-banner-h));
    }
    .container { max-width: 1320px; }
    .sidebar { width: 280px; }
}

/* لپ‌تاپ (۱۰۲۴–۱۳۹۹) */
@media (max-width: 1399px) {
    body { padding: 20px 20px 20px 280px; }
    html.has-visit-banner body {
        padding-top: calc(20px + var(--visit-banner-h));
    }
    .container { max-width: 1200px; }
}

/* تبلت (۷۶۹–۱۰۲۳) */
@media (max-width: 1023px) {
    body {
        padding: 0;
        padding-top: 56px;
        padding-bottom: 24px;
    }
    html.has-visit-banner body {
        padding-top: var(--visit-banner-h);
    }
    html.has-visit-banner body::before,
    html.has-visit-banner body::after {
        display: none !important;
    }
    html.has-visit-banner .container {
        min-height: calc(100vh - var(--visit-banner-h));
    }
    html.has-visit-banner .menu-toggle {
        top: calc(var(--visit-banner-h) + 10px);
    }
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        z-index: 1998;
        box-shadow: 0 2px 12px rgba(13, 148, 136, 0.25);
    }
    body::after {
        content: 'LearneEn';
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        right: 70px;
        z-index: 1999;
        color: rgba(255,255,255,0.95);
        font-weight: 700;
        font-size: 1.05em;
        pointer-events: none;
    }
    .sidebar {
        left: 0;
        top: 0;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out, visibility 0.3s;
        z-index: 2000;
        visibility: hidden;
    }
    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
    }
    .container {
        max-width: 100%;
        margin: 0;
        padding: 16px 16px 24px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
        min-height: calc(100vh - 56px);
    }
    .stories-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
    .dialogues-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* موبایل و تبلت کوچک (۴۸۱–۷۶۸) */
@media (max-width: 768px) {
    body { padding-bottom: 20px; }
    .sidebar {
        max-width: 300px;
        box-shadow: 4px 0 24px rgba(0,0,0,0.2);
    }
    .sidebar-title { font-size: 1.1em; margin-bottom: 20px; }
    .sidebar-link { padding: 14px 18px; font-size: 0.95em; }
    .container { padding: 14px 12px 20px; border-radius: 18px 18px 0 0; }
    header h1 { font-size: 1.4em; margin-bottom: 4px; }
    header p { font-size: 0.9em; }
    /* صفحه دیالوگ‌ها – ساختار موبایل */
    .dialogues-header .dialogues-desc { display: none; }
    .dialogues-header .dialogues-subtitle { font-size: 0.85em; color: var(--text-secondary); margin-top: 0; }
    .dialogues-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
    .level-filter {
        gap: 8px;
        padding: 10px 0;
        margin-bottom: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        background: transparent;
        border: none;
    }
    .level-filter .filter-btn { flex-shrink: 0; padding: 8px 14px; font-size: 0.85em; }
    .environment-filter-wrap {
        margin-bottom: 20px;
        margin-left: -12px;
        margin-right: -12px;
        padding: 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .environment-filter {
        flex-wrap: nowrap;
        padding: 10px 0;
        gap: 8px;
        min-width: min-content;
        background: transparent;
        border: none;
        justify-content: flex-start;
    }
    .filter-btn-env { flex-shrink: 0; padding: 8px 14px; font-size: 0.8em; }
    .dialogues-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }
    .dialogue-card { padding: 14px; }
    .dialogue-header h3 { font-size: 1.05em; line-height: 1.4; }
    .stories-grid { grid-template-columns: 1fr; gap: 10px; }
    .story-card { padding: 14px; }
    .story-card h3 { font-size: 0.95em; }
    .story-content { padding: 20px; font-size: 1em; }
    .question-card { padding: 24px; }
    .question-text { font-size: 1.25em; }
    .score-circle { width: 160px; height: 160px; font-size: 2.2em; }
    .results-actions { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* موبایل کوچک (تا ۴۸۰) */
@media (max-width: 480px) {
    body { padding-top: 52px; padding-bottom: 16px; overflow-x: hidden; }
    body::before { height: 52px; }
    .menu-toggle { top: 12px; right: 12px; width: 44px; height: 44px; }
    .sidebar { max-width: 100%; }
    .container { padding: 12px 10px 16px; border-radius: 16px 16px 0 0; overflow-x: hidden; }
    header h1 { font-size: 1.25em; }
    .level-filter { padding: 8px 0; }
    .level-filter .filter-btn { padding: 6px 12px; font-size: 0.8em; }
    .environment-filter-wrap { margin-left: -10px; margin-right: -10px; padding: 0 10px; }
    .filter-btn-env { padding: 6px 12px; font-size: 0.75em; }
    .story-card { padding: 12px; }
    .story-card h3 { font-size: 0.9em; }
    .score-circle { width: 140px; height: 140px; font-size: 2em; }
    .dialogue-card { padding: 12px; }
    .dialogue-header h3 { font-size: 0.98em; }
}

/* Sidebar – modern glass panel */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 272px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    border-right: 1px solid var(--border-color);
    z-index: 2000;
    overflow-y: auto;
    transition: left 0.3s ease, width 0.2s ease;
}

/* ------------------------------
   Grammar MCQ (Sentence Book)
------------------------------ */
.mcq-section {
    margin-top: 20px;
}

.mcq-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 18px 18px 14px;
}

.mcq-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.mcq-meta-left,
.mcq-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mcq-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(16,185,129,0.10));
    border: 1px solid rgba(37,99,235,0.18);
    color: var(--text-primary);
    font-weight: 700;
}

.mcq-topic {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 600;
}

.mcq-progress,
.mcq-score {
    font-size: 0.92em;
    color: var(--text-secondary);
    font-weight: 600;
}

.mcq-question h2 {
    font-size: 1.35em;
    font-weight: 800;
    color: var(--text-primary);
    direction: ltr;
    text-align: left;
    line-height: 1.35;
    margin-bottom: 14px;
}

.mcq-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mcq-option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    direction: ltr;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.mcq-option-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37,99,235,0.35);
}

.mcq-option-btn:disabled {
    cursor: default;
    opacity: 0.95;
}

.mcq-option-letter {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(37,99,235,0.12);
    color: var(--primary-dark);
    flex: 0 0 auto;
}

.mcq-option-text {
    font-size: 1em;
    font-weight: 700;
    color: #111827;
    flex: 1;
}

.mcq-option-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.voice-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.voice-btn:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.1);
}

.voice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-btn-small {
    background: none;
    border: none;
    font-size: 0.9em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    margin-right: 8px;
}

.voice-btn-small:hover {
    background: rgba(37, 99, 235, 0.1);
}


.mcq-option-btn.correct {
    border-color: rgba(16,185,129,0.45);
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(255,255,255,1));
}

.mcq-option-btn.wrong {
    border-color: rgba(239,68,68,0.45);
    background: linear-gradient(135deg, rgba(239,68,68,0.10), rgba(255,255,255,1));
}

.mcq-feedback {
    border-top: 1px dashed rgba(107,114,128,0.35);
    padding-top: 12px;
    margin-top: 6px;
}

.mcq-feedback-title {
    font-weight: 900;
    font-size: 1.1em;
    margin-bottom: 8px;
    direction: ltr;
    text-align: left;
}

.mcq-feedback-title.ok {
    color: var(--success-color);
}

.mcq-feedback-title.bad {
    color: var(--error-color);
}

.mcq-explanation {
    direction: ltr;
    text-align: left;
    color: var(--text-primary);
}

.mcq-explanation p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Fa→En Quiz */
.fa-to-en-start {
    margin-top: 16px;
}

.fa-to-en-start-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 16px 18px;
    max-width: 1180px;
}

.fa-to-en-start-card h2 {
    margin-bottom: 12px;
    font-size: 1.25em;
}

.fa-to-en-setting-group {
    margin-bottom: 12px;
}

.fa-to-en-setting-label {
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
}

.fa-to-en-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px 16px;
    align-items: start;
}

.fa-to-en-topics-group {
    grid-column: 1 / -1;
}

.fa-to-en-level-btns,
.fa-to-en-count-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fa-to-en-topics-controls {
    margin-bottom: 8px;
}

.fa-to-en-topic-search {
    position: relative;
    margin-bottom: 10px;
}

.topic-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95em;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topic-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.topic-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.topic-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--bg-light);
}

.topic-suggestion-item:last-child {
    border-bottom: none;
}

.topic-suggestion-item:hover {
    background: var(--bg-light);
}

.fa-to-en-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
}

.fa-to-en-topics-grid .filter-btn {
    font-size: 0.85em;
    padding: 6px 10px;
    white-space: nowrap;
    text-align: center;
}

.fa-to-en-start-card .btn-primary {
    width: auto;
    min-width: 180px;
    padding: 10px 18px;
}

.fa-to-en-start-card {
    text-align: center;
}

.fa-to-en-start-card .btn-primary {
    margin: 0 auto;
    display: inline-block;
}

.fa-to-en-question .fa-to-en-persian {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    margin-bottom: 12px;
    line-height: 1.5;
}

.fa-to-en-question .fa-to-en-hint {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.fa-to-en-correct-en {
    margin-top: 8px;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.mcq-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.mcq-nav-btn,
.mcq-secondary-btn {
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.mcq-nav-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.mcq-secondary-btn {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.10));
    border: 1px solid rgba(245,158,11,0.35);
}

.mcq-nav-btn:hover:not(:disabled),
.mcq-secondary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.mcq-nav-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 768px) {
    .mcq-options { grid-template-columns: 1fr; }
    .mcq-question h2 { font-size: 1.2em; }
    .mcq-card { padding: 14px 14px 12px; }
}

.sidebar-content {
    padding: 28px 18px;
}

.sidebar-title {
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: block;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    text-align: right;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.08), transparent);
    transition: right 0.4s ease;
}

.sidebar-link:hover::before {
    right: 100%;
}

.sidebar-link:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-glow);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-2xl);
    padding: 28px 36px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

/* Header – modern minimal */
header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 999px;
}

header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-secondary);
    font-size: 1.05em;
    font-weight: 500;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(248, 250, 252, 0.9);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    transform: translateX(-4px);
    box-shadow: var(--shadow-glow);
}

.listening-link-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.listening-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Level Filter – modern pill buttons */
.date-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.date-filter-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-left: 6px;
}
.filter-btn-date {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.filter-btn-date:hover,
.filter-btn-date.active {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

.level-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
    padding: 18px 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.filter-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.08), transparent);
    transition: right 0.4s ease;
}

.filter-btn:hover::before {
    right: 100%;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    background: rgba(13, 148, 136, 0.08);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.filter-btn.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0d5c54);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
}

/* Stories Grid – modern cards */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 24px;
    perspective: 1000px;
}

.story-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 18px 20px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    color: inherit;
    user-select: none;
    box-shadow: var(--shadow-md);
    transform-style: preserve-3d;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 var(--radius-xl) 0 100%;
    opacity: 0.12;
    z-index: 0;
    transition: all 0.35s ease;
    filter: blur(24px);
}

/* Animated Bottom Gradient Line */
.story-card::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -2px;
    right: -2px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--primary-color) 20%,
        var(--secondary-color) 50%,
        var(--primary-color) 80%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: -200% 0;
    }
    50% {
        background-position: 200% 0;
    }
}

.story-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(13, 148, 136, 0.25);
}

.story-card:hover::before {
    width: 90px;
    height: 90px;
    opacity: 0.2;
    filter: blur(28px);
}

.story-card:hover::after {
    opacity: 1;
}

.story-card h3 {
    font-size: 0.98em;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    z-index: 2;
    pointer-events: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-card .story-level {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 700;
    margin-top: 8px;
    position: relative;
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.story-card:hover .story-level {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.story-card .story-level[data-level="A1"] {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

.story-card .story-level[data-level="A2"] {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid rgba(6, 95, 70, 0.2);
}

.story-card .story-level[data-level="B1"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.2);
}

.story-card .story-level[data-level="B2"] {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
    border: 1px solid rgba(154, 52, 18, 0.2);
}

.story-card .story-level[data-level="C1"] {
    background: linear-gradient(135deg, #e9d5ff 0%, #ddd6fe 100%);
    color: #6b21a8;
    border: 1px solid rgba(107, 33, 168, 0.2);
}

.story-card .story-level[data-level="C2"] {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9f1239;
    border: 1px solid rgba(159, 18, 57, 0.2);
}

.story-card .story-id {
    font-size: 0.7em;
    color: var(--text-secondary);
    margin-top: 8px;
    position: relative;
    z-index: 2;
    pointer-events: none;
    font-weight: 600;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.story-card:hover .story-id {
    opacity: 1;
    color: var(--primary-color);
}

/* Story Content - Educational Reading Style */
.story-content {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    line-height: 2.2;
    font-size: 1.15em;
    color: var(--text-primary);
    text-align: justify;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.story-level {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3em;
    margin: 16px 0;
    padding: 12px 24px;
    background: var(--bg-light);
    border-radius: 12px;
    display: inline-block;
}

/* Translation Toggle */
.translation-toggle {
    margin: 20px 0;
    text-align: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label:hover {
    color: var(--primary-color);
}

/* Audio Controls */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.voice-select {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.voice-select:hover {
    border-color: var(--primary-color);
}

.voice-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Audio Button */
.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
    user-select: none;
}

.audio-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.audio-btn.playing {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.audio-btn #audioIcon {
    font-size: 1.3em;
}

/* Translation Content */
.translation-content {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 30px;
    border-radius: 16px;
    margin-top: 24px;
    line-height: 2.2;
    font-size: 1.1em;
    color: var(--text-primary);
    text-align: justify;
    border: 2px solid #bae6fd;
    box-shadow: var(--shadow-sm);
}

/* Vocabulary and Phrasal Verbs Sections */
.vocabulary-section,
.phrasal-verbs-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 16px;
    border: 2px solid var(--border-color);
}

.section-title {
    color: var(--text-primary);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary-color);
}

.vocabulary-list,
.phrasal-verbs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vocab-item,
.phrasal-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.vocab-item:hover,
.phrasal-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.vocab-word,
.phrasal-word {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1.3em;
}

.vocab-word strong,
.phrasal-word strong {
    color: var(--primary-color);
    font-weight: 700;
}

.vocab-pronunciation,
.phrasal-pronunciation {
    color: var(--primary-color);
    font-size: 0.95em;
    font-style: italic;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 6px;
    margin-right: 8px;
}

.pronounce-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    padding: 0;
    margin-right: 8px;
    box-shadow: var(--shadow-sm);
}

.pronounce-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

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

.vocab-meaning,
.phrasal-meaning {
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    border-right: 3px solid var(--secondary-color);
}

.vocab-examples,
.phrasal-examples {
    margin-top: 16px;
}

.example-item {
    padding: 12px 16px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 8px;
    border-right: 3px solid var(--accent-color);
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-primary);
}

.example-item:last-child {
    margin-bottom: 0;
}

.story-actions {
    text-align: center;
    margin-top: 40px;
}

/* Buttons - Educational Style */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1em;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before {
    width: 280px;
    height: 280px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 16px 48px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 12px;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

/* Quiz - Educational Style */
.quiz-progress {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3em;
    margin: 20px 0 12px 0;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 600px;
    border: 2px solid var(--border-color);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-container {
    margin: 30px 0;
}

.question-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    padding: 36px 40px;
    border-radius: var(--radius-2xl);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.question-card::before {
    content: '❓';
    position: absolute;
    top: -20px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: var(--shadow-lg);
}

.question-text {
    color: var(--text-primary);
    font-size: 1.6em;
    margin-bottom: 32px;
    text-align: center;
    font-weight: 600;
    padding-top: 20px;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.answer-option {
    background: var(--bg-light);
    padding: 20px 24px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: right;
    font-weight: 500;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer-option::before {
    content: '○';
    font-size: 1.2em;
    color: var(--text-secondary);
}

.answer-option:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateX(-5px);
}

.answer-option[style*="pointer-events: none"]:hover {
    transform: none;
}

.answer-option.correct:hover,
.answer-option.incorrect:hover {
    transform: none;
    border-color: inherit;
    background: inherit;
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.answer-option.selected::before {
    content: '✓';
    color: white;
}

.answer-option.correct {
    border-color: #10b981 !important;
    background: #d1fae5 !important;
    color: #065f46 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.answer-option.correct::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
}

.answer-option.incorrect {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.answer-option.incorrect::before {
    content: '✗';
    color: #ef4444;
    font-weight: bold;
}

.quiz-actions {
    text-align: center;
    padding-top: 20px;
}

/* Results - Educational Style */
.results-container {
    text-align: center;
    padding: 40px;
}

.score-card {
    margin: 40px 0;
}

.score-card h2 {
    color: var(--text-primary);
    font-size: 2.2em;
    margin-bottom: 32px;
    font-weight: 700;
}

.score-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 3.5em;
    font-weight: 700;
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 8px solid var(--bg-light);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.score-total {
    font-size: 0.4em;
    opacity: 0.9;
    font-weight: 400;
}

.score-percentage {
    font-size: 1.8em;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 12px;
}

.results-actions {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.review-section {
    margin-top: 50px;
    text-align: right;
    background: var(--bg-light);
    padding: 32px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.review-section h3 {
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.8em;
    font-weight: 700;
}

.review-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-right: 5px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.review-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.review-item.correct {
    border-right-color: var(--success-color);
    background: linear-gradient(90deg, #d1fae5 0%, var(--bg-white) 5%);
}

.review-item.incorrect {
    border-right-color: var(--error-color);
    background: linear-gradient(90deg, #fee2e2 0%, var(--bg-white) 5%);
}

.review-item h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.1em;
}

.user-answer {
    color: var(--text-secondary);
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 8px;
    display: inline-block;
}

.correct-answer {
    color: var(--success-color);
    font-weight: 700;
    margin-top: 8px;
    padding: 8px 12px;
    background: #d1fae5;
    border-radius: 8px;
    display: inline-block;
}

/* منوی همبرگری و اوورلی برای موبایل/تبلت */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2001;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.menu-toggle:hover { transform: scale(1.06); box-shadow: var(--shadow-xl); }
.menu-toggle:active { transform: scale(0.97); }
.menu-toggle svg { width: 24px; height: 24px; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; pointer-events: auto; }

/* موبایل/تبلت: منو کشویی — بسته = کاملاً بیرون؛ باز = کشویی از چپ */
@media (max-width: 1023px) {
    .menu-toggle { display: flex; }
}
@media (min-width: 1024px) {
    .menu-toggle { display: none !important; }
    .sidebar-overlay { display: none !important; }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-card, .question-card, .review-item {
    animation: fadeIn 0.5s ease-out;
}

/* Listening Page Styles */
.listening-card {
    position: relative;
}
.listening-card .story-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.listening-card .story-date-label {
    font-size: 0.8em;
    color: var(--text-secondary);
}
.listening-card .story-date {
    font-size: 0.8em;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.06);
    padding: 2px 8px;
    border-radius: 6px;
}

.listening-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5em;
    background: rgba(37, 99, 235, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listening-controls {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
    border: 2px solid var(--border-color);
}

.audio-player-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.play-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.audio-btn-large {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.audio-btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.audio-btn-large.playing {
    background: var(--secondary-color);
}

.repeat-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.repeat-btn:hover {
    background: #d97706;
    transform: scale(1.1);
}

.voice-selection {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-selection label {
    font-weight: 600;
    color: var(--text-primary);
}

.play-count {
    font-size: 1.1em;
    color: var(--text-secondary);
}

.instructions {
    background: #dbeafe;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
    margin-top: 20px;
}

.instructions p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.8;
}

.listening-questions-section {
    margin-top: 40px;
}

.question-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.question-text {
    margin-bottom: 16px;
    font-size: 1.1em;
    color: var(--text-primary);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.option-label:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.option-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.submit-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.submit-btn, .show-text-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.submit-btn:hover, .show-text-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.show-text-btn {
    background: var(--secondary-color);
}

.show-text-btn:hover {
    background: #059669;
}

.story-text-hidden {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 16px;
    border: 2px solid var(--border-color);
}

.results-section {
    margin-top: 40px;
}

.score-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 16px;
    margin-bottom: 30px;
}

.score-display h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.percentage {
    font-size: 3em;
    font-weight: 700;
    margin-top: 10px;
}

.results-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-item {
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
}

.result-item.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.result-item.incorrect {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.result-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.result-status {
    font-size: 1.2em;
    font-weight: 700;
}

.result-item.correct .result-status {
    color: var(--success-color);
}

.result-item.incorrect .result-status {
    color: var(--error-color);
}

.result-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-answer, .correct-answer {
    padding: 10px;
    border-radius: 8px;
    font-size: 1em;
}

.user-answer {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark);
}

.correct-answer {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 600;
}

@media (max-width: 768px) {
    .play-controls {
        flex-direction: column;
    }
    
    .audio-btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .submit-section {
        flex-direction: column;
    }
    
    .submit-btn, .show-text-btn {
        width: 100%;
    }
}

/* Dialogues Section Styles */
.environment-filter-wrap {
    margin-bottom: 30px;
}

.environment-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 16px;
}

.filter-btn-env {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-primary);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn-env:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn-env.active {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.dialogues-search-wrap {
    position: relative;
    max-width: 420px;
    margin: 0 auto 16px;
}
.dialogues-search-wrap .dialogues-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
    opacity: 0.6;
    pointer-events: none;
}
.dialogues-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dialogues-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.9;
}
.dialogues-search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.dialogues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.dialogue-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    color: inherit;
    user-select: none;
}

.dialogue-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    transition: width 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.dialogue-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.dialogue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.dialogue-header {
    position: relative;
    z-index: 2;
    pointer-events: none;
    margin-bottom: 10px;
}

.dialogue-header h3 {
    font-size: 1.15em;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.4;
}

.dialogue-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.dialogue-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.dialogue-level[data-level="A1"] {
    background: #dbeafe;
    color: #1e40af;
}

.dialogue-level[data-level="A2"] {
    background: #d1fae5;
    color: #065f46;
}

.dialogue-level[data-level="B1"] {
    background: #fef3c7;
    color: #92400e;
}

.dialogue-level[data-level="B2"] {
    background: #fed7aa;
    color: #9a3412;
}

.dialogue-level[data-level="C1"] {
    background: #e9d5ff;
    color: #6b21a8;
}

.dialogue-level[data-level="C2"] {
    background: #fce7f3;
    color: #9f1239;
}

.dialogue-environment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
    background: #e0f2fe;
}

.dialogue-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.78em;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.06);
}

.dialogue-info {
    position: relative;
    z-index: 2;
    pointer-events: none;
    margin-top: 16px;
}

.dialogue-task {
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
}

.dialogue-speakers {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.dialogue-lines-count {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.dialogue-meta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.dialogue-environment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
}

.dialogue-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.dialogue-content {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.dialogue-line {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.dialogue-line:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.dialogue-line.playing {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
    border-right-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    transform: translateX(-5px);
}

.dialogue-speaker {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.1em;
}

.dialogue-speaker.speaker-1 .speaker-name {
    color: var(--primary-color);
}

.dialogue-speaker.speaker-2 .speaker-name {
    color: var(--secondary-color);
}

.dialogue-text {
    line-height: 2;
}

.dialogue-english-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dialogue-english {
    color: var(--text-primary);
    font-size: 1.15em;
    text-align: justify;
    flex: 1;
    margin: 0;
}

.dialogue-play-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    min-width: 40px;
    height: 40px;
}

.dialogue-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.dialogue-play-btn:active {
    transform: scale(1.05);
}

.dialogue-translation {
    color: var(--text-secondary);
    font-size: 1em;
    font-style: italic;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-right: 3px solid #bae6fd;
    text-align: justify;
}

@media (max-width: 768px) {
    .dialogues-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dialogue-card {
        padding: 14px;
    }
    
    .dialogue-header h3 {
        font-size: 1.05em;
        margin-bottom: 8px;
    }
    
    .environment-filter-wrap {
        margin-left: -14px;
        margin-right: -14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 14px 0 14px;
    }
    
    .environment-filter {
        gap: 8px;
        padding: 16px 8px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: min-content;
    }
    
    .filter-btn-env {
        padding: 8px 14px;
        font-size: 0.8em;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .dialogue-content {
        padding: 24px;
    }
    
    .dialogue-english {
        font-size: 1em;
    }
    
    .dialogue-meta {
        flex-direction: column;
        align-items: center;
    }
    
    /* Single dialogue page – mobile */
    .translation-toggle {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        margin: 16px 0;
    }
    
    .audio-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .audio-controls .voice-select {
        width: 100%;
    }
    
    .audio-controls .audio-btn {
        width: 100%;
    }
    
    .dialogue-content {
        padding: 16px;
        margin: 16px 0;
    }
    
    .dialogue-line {
        padding: 14px;
        margin-bottom: 16px;
    }
    
    .dialogue-english-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .dialogue-play-btn {
        align-self: flex-start;
    }
    
    .dialogue-speaker {
        font-size: 1em;
    }
    
    .back-btn {
        font-size: 0.9em;
        padding: 10px 16px;
    }
    
    #dialogueTitle {
        font-size: 1.2em;
    }
}

/* موبایل کوچک – صفحه دیالوگ‌ها و تک‌دیالوگ */
@media (max-width: 480px) {
    .level-filter {
        gap: 6px;
        padding: 10px 12px;
        margin-bottom: 16px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .environment-filter-wrap {
        margin-left: -12px;
        margin-right: -12px;
        padding: 0 12px;
        margin-bottom: 20px;
    }
    
    .environment-filter {
        padding: 12px 6px;
    }
    
    .filter-btn-env {
        padding: 6px 12px;
        font-size: 0.75em;
    }
    
    .dialogues-grid {
        gap: 10px;
        margin-top: 16px;
    }
    
    .dialogue-card {
        padding: 12px;
    }
    
    .dialogue-header h3 {
        font-size: 0.95em;
        line-height: 1.35;
    }
    
    .dialogue-badges {
        gap: 6px;
    }
    
    .dialogue-level,
    .dialogue-environment,
    .dialogue-date {
        font-size: 0.7em;
        padding: 4px 8px;
    }
    
    header h1 {
        font-size: 1.25em;
    }
    
    header p {
        font-size: 0.85em;
    }
    
    /* تک‌دیالوگ – موبایل کوچک */
    .dialogue-content {
        padding: 12px;
        margin: 12px 0;
        border-radius: 12px;
    }
    
    .dialogue-line {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .dialogue-english {
        font-size: 0.95em;
    }
    
    .dialogue-translation {
        font-size: 0.9em;
        padding: 10px;
    }
    
    .dialogue-play-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
    }
    
    .vocabulary-section {
        padding: 16px;
    }
    
    .vocabulary-section .section-title {
        font-size: 1em;
    }
}

/* Sentences Book Styles */
.sentences-controls {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-btn {
    padding: 14px 24px;
    background: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95em;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-btn:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sentences-stats {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-dark);
}

.sentences-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sentence-category-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.sentence-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.sentence-category-header h2 {
    font-size: 1.25em;
    color: var(--primary-color);
    margin: 0;
}

.category-count {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
}

/* Modern Sentences Grid - Bootstrap Style */
.sentences-grid-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 2px;
    margin-top: 20px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.sentences-grid-header > div {
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: right;
}

.sentences-grid-header .grid-col-number {
    text-align: center;
}

.sentences-grid-modern {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 2px;
    background: var(--border-color);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.sentence-grid-row {
    display: contents;
}

.sentence-grid-row > div {
    padding: 18px 24px;
    background: var(--bg-white);
    transition: all 0.25s ease;
}

.sentence-grid-row.row-even > div {
    background: var(--bg-white);
}

.sentence-grid-row.row-odd > div {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.sentence-grid-row:hover > div {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    z-index: 1;
    position: relative;
}

.grid-cell-number {
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1em;
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border-radius: 8px;
    margin: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentence-grid-row:hover .grid-cell-number {
    background: linear-gradient(135deg, #fde68a, #fcd34d) !important;
}

.grid-cell-english {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.7;
    direction: ltr;
    text-align: left;
}

.english-with-pronunciation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.english-text {
    flex: 1;
}

.play-btn-grid {
    flex-shrink: 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
    min-width: 48px;
    height: 48px;
    margin-left: 14px;
}

.play-btn-grid:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.play-btn-grid:active {
    transform: scale(1.05);
}

.grid-cell-persian {
    font-size: 1em;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.no-results p {
    font-size: 1.2em;
    color: var(--text-secondary);
}

.back-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--text-secondary), #6b7280);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #6b7280, var(--text-secondary));
}

/* Responsive styles for sentences */
@media (max-width: 768px) {
    .sentences-grid-header,
    .sentences-grid-modern {
        grid-template-columns: 60px 1fr 1fr;
        gap: 1px;
    }
    
    .sentences-grid-header > div,
    .sentence-grid-row > div {
        padding: 12px 16px;
        font-size: 0.9em;
    }
    
    .grid-cell-number {
        font-size: 0.85em;
        margin: 1px;
    }
    
    .grid-cell-english {
        font-size: 0.95em;
    }
    
    .english-with-pronunciation {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .play-btn-grid {
        align-self: flex-end;
        margin-left: 0;
        margin-top: 4px;
        min-width: 40px;
        height: 40px;
        padding: 8px 12px;
        font-size: 1em;
    }
    
    .grid-cell-persian {
        font-size: 0.9em;
    }
    
    .sentence-category-section {
        padding: 20px;
    }
    
    .sentence-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .clear-btn {
        width: 100%;
    }
    
    .category-filter {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        font-size: 0.85em;
        padding: 10px 16px;
    }
}

/* Cities Section Styles */
.city-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.city-select-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05em;
    white-space: nowrap;
}

.city-select {
    flex: 1;
    padding: 12px 18px;
    font-size: 1em;
    font-family: 'Vazirmatn', sans-serif;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.city-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.city-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cities-controls {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.cities-stats {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: #92400e;
}

.cities-container {
    margin-top: 20px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.city-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    transition: width 0.3s ease;
}

.city-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.city-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #f59e0b;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.city-header h2 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0;
}

.city-province {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.city-info {
    margin-bottom: 20px;
}

.city-population {
    font-size: 1.05em;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-right: 3px solid #3b82f6;
}

.city-description {
    color: #374151;
    line-height: 1.8;
    font-size: 1em;
    font-weight: 500;
}

.city-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.city-section h3 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
}

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

.characteristic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 8px;
    border-right: 3px solid #10b981;
    transition: all 0.3s ease;
}

.characteristic-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.char-fa {
    font-weight: 600;
    color: var(--text-primary);
}

.char-en,
.char-fr {
    font-size: 0.95em;
    color: #1f2937;
    direction: ltr;
    text-align: left;
    font-weight: 500;
}

.foods-list, .people-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.food-item, .person-item {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border-right: 3px solid #3b82f6;
    transition: all 0.3s ease;
}

.food-item:hover, .person-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.food-name, .person-name {
    font-size: 1.05em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.food-description, .person-role {
    font-size: 0.95em;
    color: #374151;
    font-weight: 500;
    direction: ltr;
    text-align: left;
}

.province-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* City Story Styles */
.city-story {
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border-right: 4px solid #8b5cf6;
    margin-top: 12px;
}

.story-text-fa {
    font-size: 1em;
    color: var(--text-primary);
    line-height: 2;
    margin-bottom: 16px;
    text-align: justify;
}

.story-text-en,
.story-text-fr {
    font-size: 1em;
    color: #1f2937;
    line-height: 1.8;
    direction: ltr;
    text-align: left;
    font-weight: 500;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.city-story .story-text-fr:first-child {
    padding-top: 0;
    border-top: none;
}

.city-story .story-text-fa {
    padding-top: 16px;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
}

/* Practice Dialogue Styles */
.practice-dialogue {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.dialogue-line {
    padding: 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border-right: 3px solid #3b82f6;
    transition: all 0.3s ease;
}

.dialogue-line:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dialogue-speaker {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.05em;
}

.dialogue-text-en,
.dialogue-text-fr {
    font-size: 1.05em;
    color: #1f2937;
    line-height: 1.6;
    direction: ltr;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 500;
}

.dialogue-text-fa {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.8;
    font-style: italic;
    text-align: right;
}

/* Vocabulary Styles */
.vocabulary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.vocab-item {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 10px;
    border-right: 3px solid #10b981;
    transition: all 0.3s ease;
}

.vocab-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vocab-word {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.vocab-example {
    font-size: 0.95em;
    color: #1f2937;
    direction: ltr;
    text-align: left;
    font-weight: 500;
}

/* Practice Button */
.practice-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 24px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
}

.practice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.practice-btn:active {
    transform: translateY(-1px);
}

/* Practice Modal */
.practice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.practice-modal-content {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.practice-header h2 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0;
}

.close-practice {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-practice:hover {
    transform: scale(1.1);
    background: #dc2626;
}

.practice-instructions {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-right: 4px solid #f59e0b;
}

.practice-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.practice-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.practice-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.practice-question {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.6;
}

.practice-question-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.practice-question-text {
    flex: 1;
}

.practice-play-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    min-width: 40px;
    height: 40px;
}

.practice-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.practice-play-btn:active {
    transform: scale(1.05);
}

.show-answer-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.show-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.practice-answer {
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
    border-right: 3px solid #10b981;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.practice-answer-section {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
    width: 100%;
}

.practice-answer-section strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.practice-answer-en,
.practice-answer-fr {
    color: var(--text-primary);
    font-size: 1.1em;
    direction: ltr;
    text-align: left;
    margin: 0;
    padding: 8px 0;
    line-height: 1.8;
    display: block;
    width: 100%;
    unicode-bidi: embed;
}

.practice-answer-fa {
    color: var(--text-secondary);
    font-size: 1.1em;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 8px 0;
    line-height: 1.9;
    font-style: italic;
    display: block;
    width: 100%;
    unicode-bidi: embed;
}

/* Responsive styles for cities */
@media (max-width: 768px) {
    .cities-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .city-card {
        padding: 20px;
    }
    
    .city-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .city-header h2 {
        font-size: 1.3em;
    }
    
    .characteristic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .char-en {
        text-align: right;
    }
}

/* Interactive Map Styles */
.map-section {
    margin: 30px 0;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.map-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.iran-map-container {
    width: 100%;
    height: 700px;
    position: relative;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 30%, #bae6fd 60%, #93c5fd 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), inset 0 2px 8px rgba(255, 255, 255, 0.5);
    border: 4px solid #2563eb;
    padding: 20px;
}

.iran-map-svg {
    width: 100%;
    height: 100%;
    background: transparent;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.city-marker-group {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.5));
}

.city-marker-group:hover {
    transform: scale(1.4);
    filter: drop-shadow(0 0 24px rgba(239, 68, 68, 1));
}

.city-marker {
    transition: all 0.3s ease;
}

.city-marker-group:hover .city-marker {
    fill: #f59e0b;
    r: 22;
}

.city-pulse {
    animation: pulse 2.5s infinite ease-out;
}

.city-pulse[data-pulse-index="0"] {
    animation-delay: 0s;
}

.city-pulse[data-pulse-index="1"] {
    animation-delay: 0.8s;
}

.city-pulse[data-pulse-index="2"] {
    animation-delay: 1.6s;
}

@keyframes pulse {
    0% {
        r: 20;
        opacity: 0.4;
    }
    50% {
        r: 50;
        opacity: 0.1;
    }
    100% {
        r: 20;
        opacity: 0.4;
    }
}

.city-glow {
    animation: glow 2s infinite ease-in-out;
}

@keyframes glow {
    0%, 100% {
        opacity: 0.15;
        r: 28;
    }
    50% {
        opacity: 0.3;
        r: 40;
    }
}

.city-label-group {
    transition: all 0.3s ease;
}

.city-label-group:hover {
    transform: translate(4px, -4px) scale(1.1);
}

.city-label-bg {
    transition: all 0.3s ease;
}

.city-label-group:hover .city-label-bg {
    fill: #dbeafe;
    stroke: #2563eb;
    stroke-width: 3;
}

.city-label-group:hover .city-label {
    fill: #1e40af;
    font-size: 22;
}

.city-label {
    pointer-events: all;
    user-select: none;
    transition: all 0.3s ease;
}

.city-label:hover {
    fill: #f59e0b;
    font-size: 3px;
}

.city-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    pointer-events: none;
    display: none;
    white-space: nowrap;
}

@keyframes highlightCity {
    0% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

/* Compact City Cards */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.city-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.city-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    transition: width 0.3s ease;
}

.city-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: #f59e0b;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.city-header h2 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin: 0;
}

.city-province {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
}

.city-info {
    margin-bottom: 16px;
}

.city-population {
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding: 8px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 6px;
    border-right: 2px solid #3b82f6;
}

.city-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9em;
}

.city-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.city-section h3 {
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

/* Compact Story, Dialogue, Vocabulary */
.city-story {
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 8px;
    border-right: 3px solid #8b5cf6;
    margin-top: 10px;
}

.story-text-fa {
    font-size: 0.9em;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 12px;
    text-align: justify;
}

.story-text-en {
    font-size: 0.95em;
    color: #1f2937;
    line-height: 1.7;
    direction: ltr;
    text-align: left;
    font-weight: 500;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.practice-dialogue {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.dialogue-line {
    padding: 10px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-right: 2px solid #3b82f6;
    transition: all 0.3s ease;
}

.dialogue-line:hover {
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dialogue-speaker {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 0.95em;
}

.dialogue-text-en {
    font-size: 0.95em;
    color: #1f2937;
    line-height: 1.5;
    direction: ltr;
    text-align: left;
    margin-bottom: 6px;
    font-weight: 500;
}

.dialogue-text-fa {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    text-align: right;
}

.vocabulary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.vocab-item {
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
    border-right: 2px solid #10b981;
    transition: all 0.3s ease;
}

.vocab-item:hover {
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.vocab-word {
    font-size: 1em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.vocab-example {
    font-size: 0.9em;
    color: #1f2937;
    direction: ltr;
    text-align: left;
    font-weight: 500;
}

.characteristics-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.characteristic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 6px;
    border-right: 2px solid #10b981;
    transition: all 0.3s ease;
}

.characteristic-item:hover {
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.char-fa {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
}

.char-en {
    font-size: 0.9em;
    color: #1f2937;
    direction: ltr;
    text-align: left;
    font-weight: 500;
}

.foods-list, .people-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.food-item, .person-item {
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-right: 2px solid #3b82f6;
    transition: all 0.3s ease;
}

.food-item:hover, .person-item:hover {
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.food-name, .person-name {
    font-size: 0.95em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.food-description, .person-role {
    font-size: 0.9em;
    color: #374151;
    font-weight: 500;
    direction: ltr;
    text-align: left;
}

.practice-btn {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95em;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
}

.practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

/* Responsive Map */
@media (max-width: 768px) {
    .map-container {
        padding: 12px;
    }
    
    .iran-map-container {
        height: 400px;
    }
    
    .city-label {
        font-size: 2px;
    }
}

/* Riddles Section Styles */
.riddles-controls {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.riddles-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: #92400e;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(146, 64, 14, 0.15);
    border: 1px solid rgba(146, 64, 14, 0.1);
}

.riddles-container {
    margin-top: 10px;
}

.riddle-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.riddle-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.riddle-header {
    margin-bottom: 12px;
}

.riddle-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.riddle-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.riddle-number {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
}

.riddle-question {
    margin-bottom: 15px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    border-right: 4px solid #3b82f6;
}

.riddle-question-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.riddle-question h2 {
    color: #1f2937;
    font-size: 1.3em;
    margin: 0;
    flex: 1;
    line-height: 1.5;
    direction: ltr;
    text-align: left;
    font-weight: 600;
}

.riddle-play-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.riddle-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

.riddle-play-btn:active {
    transform: scale(1.05);
}

.riddle-question-fa {
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.toggle-translation-btn {
    margin-top: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toggle-translation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    background: linear-gradient(135deg, var(--primary-dark), #0d5c54);
}

.riddle-content-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 15px;
    align-items: start;
}

.riddle-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    width: 100%;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateX(-5px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.option-btn.correct {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #10b981;
    color: #065f46;
}

.option-btn.wrong {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #991b1b;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9em;
    flex-shrink: 0;
}

.option-btn.correct .option-letter {
    background: #10b981;
}

.option-btn.wrong .option-letter {
    background: #ef4444;
}

.option-text {
    flex: 1;
    font-size: 1em;
    color: var(--text-primary);
    font-weight: 500;
}

.riddle-answer {
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    border-right: 4px solid #10b981;
}

.answer-result {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1em;
}

.answer-result.correct-answer {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.answer-result.wrong-answer {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.answer-explanation {
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.answer-explanation strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.95em;
}

.answer-explanation p {
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0;
}

.riddle-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.nav-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    white-space: nowrap;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border-color);
    color: var(--text-secondary);
}

/* Citizen Test Style - Fa→En Quiz */
.citizen-test-style {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
}

.test-header {
    margin-bottom: 24px;
}

.test-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.test-nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    min-width: 80px;
}

.test-nav-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.test-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border-color);
    color: var(--text-secondary);
}

.test-info-center {
    flex: 1;
    text-align: center;
}

.test-question-number {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
}

.test-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    gap: 16px;
    flex-wrap: wrap;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.test-scores {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.test-correct {
    color: var(--success-color);
    font-weight: 600;
    font-size: 1em;
}

.test-incorrect {
    color: var(--error-color);
    font-weight: 600;
    font-size: 1em;
}

.test-content {
    margin-bottom: 24px;
}

.test-question-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 32px;
    border: 2px solid var(--border-color);
}

.test-question-text {
    margin-bottom: 24px;
}

.test-question-text .fa-to-en-persian {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.8;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.test-question-text .fa-to-en-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 12px;
}

.test-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.test-options .mcq-option-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-options .mcq-option-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1em;
    font-weight: 500;
    flex: 1;
    width: 100%;
}

.test-options .mcq-option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateX(-4px);
}

.test-options .mcq-option-btn:disabled {
    cursor: default;
}

.test-options .mcq-option-btn.correct {
    background: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.test-options .mcq-option-btn.wrong {
    background: #fee2e2;
    border-color: var(--error-color);
    color: #991b1b;
}

.test-options .voice-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-options .voice-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.test-options .voice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.test-feedback {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
}

.test-feedback-title {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.test-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.test-restart-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.test-restart-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .citizen-test-style {
        padding: 16px;
    }
    
    .test-nav-top {
        flex-direction: column;
        gap: 12px;
    }
    
    .test-nav-btn {
        width: 100%;
    }
    
    .test-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .test-scores {
        width: 100%;
        justify-content: space-between;
    }
    
    .test-question-card {
        padding: 20px;
    }
    
    .test-question-text .fa-to-en-persian {
        font-size: 1.2em;
        padding: 16px;
    }
}

/* Responsive Riddles */
@media (max-width: 768px) {
    .riddle-card {
        padding: 20px;
    }
    
    .riddle-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .riddle-question h2 {
        font-size: 1.2em;
    }
    
    .riddle-play-btn {
        align-self: flex-end;
        margin-top: 4px;
        min-width: 40px;
        height: 40px;
        padding: 8px 12px;
        font-size: 1em;
    }
    
    .riddle-question-en {
        font-size: 1em;
    }
    
    .option-btn {
        padding: 14px 16px;
    }
    
    .riddles-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .category-filter {
        justify-content: center;
    }
    
    .riddles-stats {
        justify-content: center;
        width: 100%;
    }
    
    .riddle-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .riddle-navigation {
        flex-direction: row;
        min-width: auto;
        width: 100%;
    }
    
    .nav-btn {
        flex: 1;
    }
}