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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.home-btn {
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    opacity: 0.8;
}

.home-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    margin: 0;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9em;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* ── Lesson Tab Navigation Bar ── */
.lesson-tabs-nav {
    position: sticky;
    top: 66px;
    z-index: 90;
    background: linear-gradient(90deg, rgba(80, 60, 180, 0.97) 0%, rgba(100, 50, 160, 0.97) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
}

.lesson-tab-btn {
    flex: 1 1 0;
    max-width: 220px;
    min-width: 90px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    vertical-align: middle;
}

.lesson-tab-btn:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
}

.lesson-tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #5540c0;
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lesson-tab-btn.locked {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: auto;
}

.tab-arrow {
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.2em;
    padding: 0 10px;
    flex-shrink: 0;
    display: inline-block;
    user-select: none;
}

.tab-icon {
    font-size: 1.05em;
    line-height: 1;
}

.tab-label {
    font-size: 0.9em;
    line-height: 1;
}

/* Lesson Container */
.lesson-container {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Lesson Header */
.lesson-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 5px solid #667eea;
}

.lesson-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2d3436;
}

.lesson-header p {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}.video-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 30px;
    text-align: center;
    color: white;
}@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.video-placeholder p {
    font-size: 1.2em;
    margin: 10px 0;
    font-weight: 600;
}#lesson-video {
    border-radius: 12px;
}/* Tabs */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section {
    margin-bottom: 30px;
}

.section h3 {
    font-size: 1.5em;
    color: #2d3436;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}.rule {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    font-family: 'Courier New', monospace;
}

.rule strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}.movie-example {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.movie-example:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.movie-source {
    font-weight: bold;
    color: #764ba2;
    display: block;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.movie-dialogue {
    color: #333;
    font-style: italic;
    font-size: 1em;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.movie-translation {
    color: #666;
    font-size: 0.95em;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}.difficulty-btn {
    background: #f0f0f5;
    border: 2px solid #e0e0e5;
    padding: 12px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    font-weight: 500;
}

.difficulty-btn:hover:not(:disabled) {
    background: #e8e8f0;
    border-color: #667eea;
}

.difficulty-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.difficulty-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}.form-btn {
    background: #f0f0f5;
    border: 2px solid #e0e0e5;
    padding: 12px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.form-btn:hover {
    background: #e8e8f0;
    border-color: #667eea;
}

.form-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}.exercise {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.exercise-number {
    font-weight: bold;
    color: #667eea;
    font-size: 1em;
    margin-bottom: 10px;
}

.exercise-question {
    font-size: 1.05em;
    margin-bottom: 15px;
    color: #2d3436;
}

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

.option {
    background: white;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.option.correct {
    border-color: #00B894;
    background: rgba(0, 184, 148, 0.1);
    color: #00B894;
}

.option.incorrect {
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.exercise-explanation {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 0.95em;
    color: #555;
    display: none;
}

.exercise-explanation.show {
    display: block;
}

/* ── Video Quiz Progress Bar ── */
.quiz-progress-block {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-top: 4px solid #667eea;
}

.quiz-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quiz-progress-label {
    font-size: 0.92em;
    font-weight: 600;
    color: #555;
}

.quiz-progress-count {
    font-size: 0.92em;
    font-weight: 700;
    color: #667eea;
}

.quiz-progress-track {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 999px;
    transition: width 0.45s ease;
}

.quiz-progress-hint {
    font-size: 0.87em;
    color: #888;
    margin: 0;
    text-align: center;
}

.quiz-progress-hint.quiz-progress-done {
    color: #28a745;
    font-weight: 600;
}

/* ── Next-Video Button Bar ── */
.video-done-bar {
    background: white;
    border-radius: 12px;
    padding: 22px 24px;
    margin: 16px 0 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-left: 5px solid #667eea;
}

.video-hint {
    font-size: 0.92em;
    color: #888;
    margin: 0;
    flex: 1;
}

.btn-next-tab {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 13px 28px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(102,126,234,0.4);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.btn-next-tab:disabled {
    background: #c6cadd;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-next-tab:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.55);
}

/* ── Video Embed Wrapper ── */
.video-embed-wrapper {
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    margin-bottom: 28px;
    line-height: 0;
}

.video-embed-wrapper video {
    width: 100%;
    display: block;
    border-radius: 12px;
}

/* ── Video Quiz Section ── */
.video-quiz {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 0;
}

.quiz-heading {
    font-size: 1.3em;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.quiz-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-left: 4px solid #667eea;
}

.quiz-q-text {
    font-size: 1em;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 12px;
}/* Single-choice quiz buttons */
.quiz-single-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.quiz-opt-btn {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.quiz-opt-btn:hover:not(:disabled) {
    border-color: #667eea;
    background: rgba(102,126,234,0.06);
}

.quiz-opt-btn:disabled {
    cursor: default;
}

.quiz-opt-btn.quiz-opt-correct {
    background: #e8f8ef;
    border-color: #28a745;
    color: #155724;
}

.quiz-opt-btn.quiz-opt-wrong {
    background: #fdecea;
    border-color: #dc3545;
    color: #721c24;
}

.quiz-opt-btn.quiz-opt-correct-show {
    background: #e8f8ef;
    border-color: #28a745;
    color: #155724;
    opacity: 0.75;
}.quiz-multi-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.95em;
    transition: border-color 0.2s;
}

.quiz-multi-label:hover {
    border-color: #667eea;
}

.quiz-multi-label.quiz-correct  { border-color: #28a745; background: #e8f8ef; color: #155724; }
.quiz-multi-label.quiz-wrong    { border-color: #dc3545; background: #fdecea; color: #721c24; }
.quiz-multi-label.quiz-missed   { border-color: #fd7e14; background: #fff3cd; color: #7d4e00; }

.quiz-check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.quiz-check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}

.quiz-check-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.quiz-feedback {
    font-size: 0.9em;
    margin-top: 8px;
    min-height: 20px;
}

.quiz-correct-msg { color: #28a745; font-weight: 600; }
.quiz-wrong-msg   { color: #dc3545; font-weight: 600; }

.quiz-explanation {
    color: #555;
    font-weight: 400;
    font-style: italic;
    margin-left: 8px;
}

.quiz-explanation-box {
    display: block;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f4ff;
    border: 1.5px solid #c5cdf8;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    color: #374151;
    font-size: 0.88em;
    font-weight: 500;
    font-style: normal;
    line-height: 1.5;
}

/* ── Grammar Bank block ── */
.grammar-bank-block {
    background: #fff;
    border-radius: 14px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 18px rgba(102,126,234,0.10);
    padding: 26px 28px 22px;
    margin: 24px 0 8px;
}

.grammar-bank-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.grammar-bank-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.grammar-bank-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3px 11px;
    border-radius: 20px;
}

.grammar-bank-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #2d3436;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e7ff;
}

.grammar-bank-intro {
    font-size: 0.97rem;
    color: #374151;
    margin: 0 0 10px;
    line-height: 1.6;
}

.grammar-bank-structure {
    display: inline-block;
    background: #f0f4ff;
    border: 1.5px solid #c5cdf8;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3730a3;
    margin-bottom: 16px;
    line-height: 1.5;
}

.grammar-bank-examples {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grammar-bank-example {
    position: relative;
    padding: 9px 14px 9px 38px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.96rem;
    color: #2d3436;
    line-height: 1.5;
}

.grammar-bank-example::before {
    content: '\2192';
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
}

/* ── Lesson Tab Content panels ── */
.lesson-tab-content {
    display: none;
}

.lesson-tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease;
}

@keyframes fadeInTab {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin: 0;
    font-size: 0.95em;
}

.footer a {
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════
   PRACTICE TASKS TAB — full styling
   ═══════════════════════════════════════════════════════════ */

/* ── Check intro header ── */
.check-intro {
    background: white;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-top: 4px solid #667eea;
}

.check-intro h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 6px;
}

.check-intro p {
    font-size: 0.95em;
    color: #636e72;
    margin: 0;
}.theory-inner .section {
    margin-bottom: 14px;
}

.theory-inner .section h4 {
    font-size: 0.92em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}/* ── Practice container ── */
.practice-tasks-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Section label (Practice 1 / 2 / 3 badges) ── */
.practice-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    margin-top: 8px;
}

.practice-section-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.78em;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.practice-section-title {
    font-size: 1em;
    font-weight: 700;
    color: #2d3436;
}

/* ── Practice form block card ── */
.practice-form-block {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    margin-bottom: 20px;
}

/* ── Practice section header ── */
.practice-form-header {
    padding: 18px 24px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.practice-form-header h4 {
    font-size: 1.02em;
    font-weight: 600;
    color: #2d3436;
    margin: 8px 0 0;
}

.practice-header-top {
    margin-bottom: 4px;
}

.practice-affirmative { border-top: 5px solid #00b894; background: #f4fdf9; }
.practice-negative    { border-top: 5px solid #e17055; background: #fff7f5; }
.practice-interrogative{ border-top: 5px solid #0984e3; background: #f4f9ff; }

/* ── Form type tags ── */
.practice-form-tag {
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aff-tag { background: #d0f5ea; color: #00795a; }
.neg-tag { background: #fde8e3; color: #b03a25; }
.int-tag { background: #daeeff; color: #065fa1; }

/* ── Exercises inside blocks ── */
.practice-form-block .exercise {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f2f5;
    border-left: none;
    border-radius: 0;
    background: white;
}

.practice-form-block .exercise:last-of-type {
    border-bottom: none;
}

.practice-form-block .exercise-number {
    display: inline-block;
    background: rgba(102,126,234,0.12);
    color: #667eea;
    font-size: 0.82em;
    font-weight: 700;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 26px;
    margin-bottom: 10px;
    flex-shrink: 0;
}/* ═══════════════════════════════════════════════════════════
   PRACTICE 2 — Fill-in-the-Blanks
   ═══════════════════════════════════════════════════════════ */

.fill-exercise {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f2f5;
    background: white;
}

.fill-exercise:last-of-type {
    border-bottom: none;
}

.fill-q-num {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102,126,234,0.12);
    color: #667eea;
    font-size: 0.82em;
    font-weight: 700;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fill-dialogue {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fill-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 0.97em;
    line-height: 1.7;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #ccc;
}

.fill-line.speaker-a {
    background: #f0f3ff;
    border-left-color: #667eea;
}

.fill-line.speaker-b {
    background: #f5fff8;
    border-left-color: #00b894;
}

.speaker-label {
    font-weight: 700;
    font-size: 0.85em;
    color: #888;
    flex-shrink: 0;
    min-width: 20px;
}

.fill-input {
    border: 1.5px solid #c5cdf8;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.95em;
    font-family: inherit;
    width: 110px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    color: #2d3436;
}

.fill-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.fill-input.fill-correct {
    border-color: #00b894;
    background: #f0fdf7;
    color: #00795a;
}

.fill-input.fill-incorrect {
    border-color: #e17055;
    background: #fff5f3;
    color: #b03a25;
}.fill-result {
    font-size: 0.9em;
    font-weight: 600;
}

.fill-result.fill-res-ok  { color: #00b894; }
.fill-result.fill-res-err { color: #e17055; font-style: italic; }

/* ═══════════════════════════════════════════════════════════
   PRACTICE 3 — Drag & Drop Word Order
   ═══════════════════════════════════════════════════════════ */

.drag-exercise {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f2f5;
    background: white;
}

.drag-exercise:last-of-type {
    border-bottom: none;
}

.drag-exercise-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Word bank (source words) */
.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 14px;
    background: #f4f5fb;
    border: 1.5px dashed #b8bfe8;
    border-radius: 10px;
    min-height: 50px;
    transition: background 0.2s, border-color 0.2s;
}

.word-bank.zone-drag-over {
    background: #eaedff;
    border-color: #667eea;
}

/* Answer zone (drop target) */
.answer-zone {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 14px;
    background: white;
    border: 2px solid #c5cdf8;
    border-radius: 10px;
    min-height: 54px;
    transition: background 0.2s, border-color 0.2s;
}

.answer-zone.zone-drag-over {
    background: #f0f3ff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.answer-zone.zone-correct {
    border-color: #00b894;
    background: #f0fdf7;
}

.answer-zone.zone-wrong {
    border-color: #e17055;
    background: #fff5f3;
}

.answer-zone-placeholder {
    font-size: 0.87em;
    color: #b0b8cc;
    font-style: italic;
    align-self: center;
    pointer-events: none;
}

/* Individual draggable word chips */
.word-chip {
    background: white;
    border: 1.5px solid #c5cdf8;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    color: #2d3436;
    white-space: nowrap;
}

.word-chip:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102,126,234,0.18);
}

.word-chip.chip-dragging {
    opacity: 0.4;
    transform: scale(0.95);
    cursor: grabbing;
}

.word-chip.chip-correct {
    border-color: #00b894;
    background: #e8f8ef;
    color: #00795a;
}

/* Check / Reset row under answer zone */
.drag-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.drag-check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(102,126,234,0.3);
}

.drag-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(102,126,234,0.45);
}

.drag-result {
    font-size: 0.9em;
    font-weight: 700;
    flex: 1;
}

.drag-result.drag-res-ok  { color: #00b894; }
.drag-result.drag-res-err { color: #e17055; }

.drag-reset-btn {
    background: #f8f9fa;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    color: #636e72;
    transition: all 0.2s;
}

.drag-reset-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Shake animation for wrong drag answers */
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX( 6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX( 4px); }
}

.zone-shake {
    animation: shakeX 0.45s ease;
}

/* ── Multiple-choice answer badge (Practice 1) ── */
.practice-mc-badge {
    margin-top: 10px;
    font-size: 0.88em;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    display: inline-block;
}

.practice-mc-badge-ok {
    background: #d1fae5;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
}

.practice-mc-badge-err {
    background: #fee2e2;
    color: #991b1b;
    border: 1.5px solid #fca5a5;
}

/* ── Get Result button bar ── */
.get-result-bar {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 8px 0 4px;
}

.get-result-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 56px;
    border-radius: 14px;
    font-size: 1.12em;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 22px rgba(102, 126, 234, 0.45);
    transition: all 0.25s ease;
}

.get-result-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* ── Unanswered question highlight ── */
.q-unanswered {
    position: relative;
    border: 2px solid #ef4444 !important;
    border-radius: 10px;
    animation: unansweredPulse 0.5s ease;
}

/* Specific override when applied to the answer-zone drop target */
.answer-zone.q-unanswered {
    border: 2px solid #ef4444 !important;
    background: #fff5f5 !important;
    animation: unansweredPulse 0.5s ease;
}

@keyframes unansweredPulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.q-unanswered-label {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.82em;
    font-weight: 700;
    color: #ef4444;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 3px 10px;
}

/* When label sits inside a flex drag-check-row, remove top margin */
.drag-check-row .q-unanswered-label {
    margin-top: 0;
}

/* ── Complete Level Bar ── */
.complete-level-bar {
    background: white;
    border-radius: 14px;
    padding: 24px 28px;
    margin-top: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    border-top: 5px solid #fdcb6e;
    text-align: center;
}

.complete-level-hint {
    font-size: 0.95em;
    color: #636e72;
    margin-bottom: 16px;
}

.complete-level-btn {
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 1.08em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(240,147,43,0.4);
    letter-spacing: 0.5px;
}

.complete-level-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(240,147,43,0.55);
}

/* ═══════════════════════════════════════════════════════════
   SCORE RESULT OVERLAY  (shown on "Complete Level" click)
   ═══════════════════════════════════════════════════════════ */

.score-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.score-overlay.score-overlay-visible {
    opacity: 1;
}

.score-card {
    background: #1a1d2e;
    border-radius: 22px;
    padding: 40px 48px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.score-overlay.score-overlay-visible .score-card {
    transform: translateY(0);
}

.score-emoji {
    font-size: 3.2rem;
    line-height: 1;
}

.score-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
}

.score-tense-name {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* Score ring / percentage display */
.score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ring-bg, rgba(102,126,234,0.12));
    border: 3px solid var(--ring-color, #667eea);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    gap: 4px;
    flex-shrink: 0;
    box-shadow: 0 0 0 8px rgba(255,255,255,0.03);
}

.score-percent {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--ring-color, #667eea);
    line-height: 1;
    letter-spacing: -1px;
}

.score-fraction {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.score-unlock {
    font-size: 0.97rem;
    color: #a3e635;
    margin: 0;
    font-weight: 600;
}

.score-need-msg {
    font-size: 0.97rem;
    color: #fca5a5;
    margin: 0;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Buttons row */
.score-btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.score-btn {
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    letter-spacing: 0.3px;
}

.score-btn-next {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 5px 18px rgba(34, 197, 94, 0.4);
    min-width: 180px;
}

.score-btn-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.55);
}

.score-btn-retry {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.4);
    min-width: 150px;
}

.score-btn-retry:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.55);
}

.score-btn-dashboard {
    background: transparent;
    color: #94a3b8;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    padding: 13px 22px;
}

.score-btn-dashboard:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.5);
}

@media (max-width: 480px) {
    .score-card {
        padding: 32px 24px;
    }
    .score-title {
        font-size: 1.5rem;
    }
    .score-ring {
        width: 120px;
        height: 120px;
    }
    .score-percent {
        font-size: 2.2rem;
    }
    .score-btn {
        padding: 13px 22px;
        font-size: 0.95rem;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .exercises-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .difficulty-panel,
    .form-selector {
        position: static;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 15px;
        padding: 15px;
    }

    .difficulty-panel h4,
    .form-selector h4 {
        margin: 0;
    }

    .difficulty-buttons,
    .form-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .lesson-tabs-nav {
        top: 56px;
        padding: 8px 10px;
        gap: 0;
    }

    .lesson-tab-btn {
        padding: 8px 10px;
        font-size: 0.82em;
        gap: 5px;
    }

    .tab-arrow {
        padding: 0 5px;
        font-size: 1em;
    }

    .header-content {
        gap: 20px;
    }

    .back-link {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .logo {
        font-size: 1.2em;
    }

    .logout-btn {
        padding: 6px 15px;
        font-size: 0.9em;
    }

    .lesson-header h2 {
        font-size: 1.8em;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .tab-content {
        padding: 20px;
    }

    .section h3 {
        font-size: 1.3em;
    }

    .exercises-wrapper {
        grid-template-columns: 1fr;
    }

    .difficulty-panel,
    .form-selector {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 12px;
        padding: 12px;
        position: static;
    }

    .difficulty-panel h4,
    .form-selector h4 {
        margin: 0;
        align-self: center;
        font-size: 0.9em;
    }

    .difficulty-buttons,
    .form-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .difficulty-btn,
    .form-btn {
        padding: 10px 8px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .lesson-tabs-nav {
        padding: 6px 6px;
    }

    .lesson-tab-btn {
        padding: 7px 7px;
        font-size: 0.75em;
        gap: 4px;
    }

    .tab-arrow {
        padding: 0 3px;
        font-size: 0.9em;
    }

    .tab-icon {
        display: none;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .lesson-header {
        padding: 20px;
    }

    .lesson-header h2 {
        font-size: 1.5em;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.8em;
    }

    .tab-content {
        padding: 15px;
    }

    .section h3 {
        font-size: 1.1em;
    }

    .exercises-wrapper {
        grid-template-columns: 1fr;
    }

    .difficulty-panel,
    .form-selector {
        display: flex;
        flex-direction: column;
        padding: 10px;
        position: static;
    }

    .difficulty-panel h4,
    .form-selector h4 {
        margin: 0 0 8px 0;
        font-size: 0.85em;
    }

    .difficulty-buttons,
    .form-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .difficulty-btn,
    .form-btn {
        padding: 8px 6px;
        font-size: 0.75em;
    }

    .exercise {
        padding: 12px;
    }

    .option {
        padding: 8px;
        font-size: 0.9em;
    }
}

/* ═══════════════════════════════════════════
   PRONUNCIATION BLOCK
   ═══════════════════════════════════════════ */
.pronunciation-box {
    background: #fff;
    border-radius: 14px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 18px rgba(102,126,234,0.10);
    padding: 26px 28px 28px;
    margin: 24px 0 8px;
}

.pronunciation-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e0e7ff;
}

.pronunciation-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-top: 2px;
}

.pronunciation-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #2d3436;
    margin: 0 0 4px;
}

.pronunciation-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    margin: 0;
}

.pronunciation-explanation {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.97rem;
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.6;
}

.pronunciation-explanation p {
    margin: 0;
}

.pronunciation-question {
    background: #faf5ff;
    border: 1.5px solid #ddd6fe;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.97rem;
    color: #374151;
}

.pronunciation-question p {
    margin: 0 0 10px;
}

.pronunciation-noun-examples {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.noun-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.93rem;
    letter-spacing: 0.03em;
}

.pronunciation-listen-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 10px;
    font-style: italic;
}

.pronunciation-audio {
    display: block;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 18px;
    accent-color: #667eea;
}

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

.sound-card {
    border-radius: 12px;
    padding: 16px 14px 14px;
    border: 2px solid transparent;
}

.sound-card.sound-s {
    background: #f0fdf4;
    border-color: #86efac;
}

.sound-card.sound-z {
    background: #fffbeb;
    border-color: #fcd34d;
}

.sound-card.sound-iz {
    background: #eff6ff;
    border-color: #93c5fd;
}

.sound-badge {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 10px;
    padding: 4px 16px;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.sound-s .sound-badge {
    background: #16a34a;
    color: #fff;
}

.sound-z .sound-badge {
    background: #d97706;
    color: #fff;
}

.sound-iz .sound-badge {
    background: #2563eb;
    color: #fff;
}

.sound-sentences {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sound-sentences li {
    font-size: 0.92rem;
    color: #2d3436;
    line-height: 1.5;
    padding-left: 14px;
    position: relative;
}

.sound-sentences li::before {
    content: '\203A';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #6b7280;
}

.sound-sentences li u {
    text-decoration-style: dashed;
}

/* -ing word pills for present-continuous pronunciation block */
.pronunciation-ing-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ing-pill {
    background: #f0f4ff;
    border: 1.5px solid #c5cdf8;
    color: #3730a3;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.ing-pill .hl {
    color: #e05c00;
    font-weight: 700;
}

/* Present-perfect pronunciation: sections, dialogue, participles */
.pron-section {
    margin-bottom: 24px;
}

.pron-section:last-child {
    margin-bottom: 0;
}

.pron-dialogue {
    background: #f8f9ff;
    border: 1.5px solid #e0e7ff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialogue-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dialogue-speaker {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.speaker-a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.speaker-b {
    background: #e0e7ff;
    color: #3730a3;
}

.dialogue-text {
    font-size: 0.97rem;
    color: #2d3436;
    line-height: 1.5;
}

.pron-participles-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

.participle-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 7px 12px;
    background: #f8f9ff;
    border-left: 3px solid #667eea;
    border-radius: 0 8px 8px 0;
}

.participle-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 2px 11px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

@media (max-width: 700px) {
    .pronunciation-sounds-grid {
        grid-template-columns: 1fr;
    }

    .pronunciation-box {
        padding: 18px 16px 20px;
    }
}
