﻿:root {
    --primary: #006aa7;
    --primary-light: #4a9bd9;
    --secondary: #fecb00;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    /* Глобальная скорость перехода для всех элементов */
    --theme-transition-speed: 0.4s;
    --theme-transition-ease: ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, #0b1120 0%, #111827 100%);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .logo a {
        text-decoration: none;
        color: inherit;
    }

.flag-icon {
    font-size: 2rem;
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

    .main-nav a {
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
        font-size: 1rem;
    }

        .main-nav a:hover,
        .main-nav a.active {
            color: var(--secondary);
        }

.reset-link {
    color: #ef4444 !important;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin: 40px 0 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.highlight {
    color: var(--secondary);
    background: rgba(254, 203, 0, 0.1);
    padding: 0 8px;
    border-radius: 8px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary);
    color: #0b1120;
    box-shadow: 0 4px 15px rgba(254, 203, 0, 0.3);
}

    .btn-primary:hover {
        background: #ffd633;
        transform: translateY(-2px);
    }

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-light);
}

    .btn-secondary:hover {
        border-color: var(--secondary);
        color: var(--secondary);
    }

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.floating-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.card-item {
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
    transition: transform 0.3s;
}

    .card-item:nth-child(odd) {
        transform: rotate(-3deg);
    }

    .card-item:nth-child(even) {
        transform: rotate(2deg);
        background: var(--primary);
        color: white;
    }

/* Features */
.features {
    margin: 80px 0;
}

    .features h2 {
        font-size: 2.2rem;
        margin-bottom: 40px;
        text-align: center;
    }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

    .feature-card:hover {
        border-color: var(--secondary);
        transform: translateY(-5px);
    }

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Levels Page */
.levels-container {
    flex: 1;
}

.levels-header {
    margin-bottom: 40px;
}

.next-level-progress {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    border-left: 6px solid var(--secondary);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.arrow {
    color: var(--secondary);
}

.progress-bar-wrapper {
    height: 12px;
    background: #334155;
    border-radius: 20px;
    overflow: hidden;
    margin: 15px 0 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 0.5s ease;
}

.progress-percent {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.progress-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.level-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

    .level-card:hover {
        border-color: var(--primary-light);
        background: #1e2a4a;
    }

    .level-card h3 {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .level-card .status {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        background: #334155;
        color: #cbd5e1;
        margin: 12px 0;
    }

    .level-card.completed .status {
        background: #166534;
        color: #bbf7d0;
    }

    .level-card.active .status {
        background: var(--primary);
        color: white;
    }

/* Lesson Page - Full screen style */
.lesson-page {
    flex: 1;
    width: 100%;
}

.lesson-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 30px;
    font-size: 1.1rem;
    transition: color 0.2s;
}

    .back-link:hover {
        color: var(--secondary);
    }

.lesson-header {
    margin-bottom: 40px;
}

    .lesson-header h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

.lesson-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
}

    .lesson-item h2 {
        font-size: 2rem;
        margin-bottom: 20px;
        color: var(--secondary);
    }

.lesson-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.action-card {
    background: linear-gradient(135deg, #1e2a4a 0%, #1e293b 100%);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

    .action-card:hover {
        border-color: var(--secondary);
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(254, 203, 0, 0.1);
    }

    .action-card h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .action-card p {
        color: var(--text-muted);
        margin-bottom: 15px;
    }

    .action-card .badge {
        display: inline-block;
        background: var(--primary);
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
    }

.extra-materials {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #1a2538 0%, #1e293b 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(254, 203, 0, 0.1);
}

    .extra-materials h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .extra-materials ul {
        list-style: none;
        padding: 0;
    }

    .extra-materials li {
        padding: 12px;
        margin: 8px 0;
        background: rgba(0,0,0,0.2);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

        .extra-materials li:hover {
            background: rgba(254, 203, 0, 0.1);
            padding-left: 20px;
        }

/* Custom Modal (Site-styled) */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.custom-modal {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 30px;
    overflow-y: auto;
    border: 2px solid var(--secondary);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

    .modal-close:hover {
        background: rgba(255,255,255,0.1);
        color: var(--secondary);
    }

.modal-header {
    margin-bottom: 30px;
    padding-right: 40px;
}

    .modal-header h2 {
        font-size: 2rem;
        color: var(--secondary);
        margin-bottom: 10px;
    }

.modal-body {
    min-height: 300px;
}

.theory-content {
    line-height: 1.8;
}

    .theory-content h3 {
        color: var(--primary-light);
        margin: 20px 0 15px;
        font-size: 1.4rem;
    }

    .theory-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
        background: rgba(0,0,0,0.2);
        border-radius: 8px;
        overflow: hidden;
    }

    .theory-content th,
    .theory-content td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #334155;
    }

    .theory-content th {
        background: var(--primary);
        color: white;
        font-weight: 600;
    }

    .theory-content tr:hover {
        background: rgba(254, 203, 0, 0.05);
    }

    .theory-content ul,
    .theory-content ol {
        margin: 15px 0 15px 25px;
    }

    .theory-content li {
        margin: 8px 0;
    }

.practice-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.practice-question {
    margin: 20px 0;
}

.practice-options {
    display: grid;
    gap: 10px;
    margin: 15px 0;
}

.practice-option {
    padding: 12px 20px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

    .practice-option:hover {
        background: #2d3a52;
    }

    .practice-option.selected {
        border-color: var(--secondary);
        background: rgba(254, 203, 0, 0.1);
    }

    .practice-option.correct {
        border-color: #10b981;
        background: rgba(16, 185, 129, 0.1);
    }

    .practice-option.incorrect {
        border-color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
    }

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-btn {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

    .pagination-btn:hover:not(:disabled) {
        border-color: var(--secondary);
        color: var(--secondary);
    }

    .pagination-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.page-indicator {
    color: var(--text-muted);
    font-weight: 500;
}

.feedback-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

    .feedback-message.correct {
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
        border: 1px solid #10b981;
        display: block;
    }

    .feedback-message.incorrect {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid #ef4444;
        display: block;
    }

.footer {
    margin-top: auto;
    padding: 30px 0 10px;
    text-align: center;
    color: var(--text-muted);
}

/* Стили для полноэкранного урока */
.lesson-fullscreen {
    background: linear-gradient(145deg, #0b1120 0%, #111827 100%);
    min-height: 100vh;
}

.lesson-app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Минимальный хедер урока */
.lesson-header-mini {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.lesson-nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.lesson-progress-info {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
}

.lesson-actions-top {
    display: flex;
    gap: 15px;
}

/* Контент урока на весь экран */
.lesson-content-fullscreen {
    flex: 1;
    padding: 20px 0 40px;
}

.lesson-page-container {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для контента урока */
.lesson-content-block {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow);
}

    .lesson-content-block h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
        color: var(--secondary);
    }

    .lesson-content-block h2 {
        font-size: 1.8rem;
        margin: 30px 0 20px;
        color: var(--primary-light);
    }

    .lesson-content-block h3 {
        font-size: 1.4rem;
        margin: 25px 0 15px;
        color: var(--text-light);
    }

    .lesson-content-block p {
        margin-bottom: 15px;
        line-height: 1.8;
        color: var(--text-muted);
    }

    .lesson-content-block strong {
        color: var(--text-light);
    }

/* Таблицы в уроке */
.lesson-content-block,
.extra-article-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lesson-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin: 25px 0;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

    .lesson-table th {
        background: var(--primary);
        color: white;
        padding: 15px;
        text-align: left;
        font-weight: 600;
    }

    .lesson-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #334155;
    }

    .lesson-table tr:last-child td {
        border-bottom: none;
    }

    .lesson-table tr:hover {
        background: rgba(254, 203, 0, 0.05);
    }

/* Списки в уроке */
.lesson-list {
    margin: 20px 0 20px 25px;
}

    .lesson-list li {
        margin: 10px 0;
        color: var(--text-muted);
    }

    .lesson-list ul {
        margin: 10px 0 10px 25px;
    }

/* Блоки с примерами */
.example-block {
    background: rgba(0,106,167,0.1);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

    .example-block p {
        margin: 5px 0;
    }

.swedish-word {
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.1em;
}

/* Практические задания */
.practice-block {
    background: linear-gradient(135deg, #1e2a4a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    border: 2px solid rgba(254, 203, 0, 0.1);
}

.practice-question {
    margin: 20px 0;
}

.practice-options {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.practice-option {
    padding: 15px 20px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}

    .practice-option:hover {
        background: #2d3a52;
        border-color: var(--primary-light);
    }

    .practice-option.selected {
        border-color: var(--secondary);
        background: rgba(254, 203, 0, 0.1);
    }

    .practice-option.correct {
        border-color: #10b981;
        background: rgba(16, 185, 129, 0.1);
    }

    .practice-option.incorrect {
        border-color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
    }

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

    .feedback.show {
        display: block;
    }

    .feedback.correct {
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid #10b981;
        color: #10b981;
    }

    .feedback.incorrect {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid #ef4444;
        color: #ef4444;
    }

.check-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .check-btn:hover {
        background: var(--primary-light);
        transform: translateY(-2px);
    }

    .check-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Футер с навигацией */
.lesson-footer-nav {
    padding: 30px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.page-indicator {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Типы уроков (словарь/грамматика/тест) */
.lesson-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.lesson-type-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

    .lesson-type-card:hover {
        border-color: var(--secondary);
        transform: translateY(-5px);
    }

    .lesson-type-card h3 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .lesson-type-card p {
        color: var(--text-muted);
        margin-bottom: 20px;
    }

    .lesson-type-card .badge {
        display: inline-block;
        background: var(--primary);
        padding: 8px 20px;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
    }

/* Доп материалы */
.extra-materials-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #1a2538 0%, #1e293b 100%);
    border-radius: var(--border-radius);
}

    .extra-materials-section h3 {
        margin-bottom: 20px;
        font-size: 1.5rem;
    }

.extra-materials-list {
    list-style: none;
    padding: 0;
}

    .extra-materials-list li {
        padding: 15px;
        margin: 10px 0;
        background: rgba(0,0,0,0.2);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s;
    }

        .extra-materials-list li:hover {
            background: rgba(254, 203, 0, 0.1);
            padding-left: 25px;
        }

/* Кастомные модальные окна */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.custom-alert {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    border: 2px solid var(--secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-alert-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.custom-alert h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.custom-alert p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-alert-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

    .custom-alert-buttons .btn {
        min-width: 100px;
    }

/* Отметка пройденных разделов */
.lesson-type-card {
    position: relative;
    overflow: hidden;
}

    .lesson-type-card.completed {
        border-color: #10b981 !important;
        background: linear-gradient(135deg, #1e2a4a 0%, rgba(16, 185, 129, 0.1) 100%);
    }

        .lesson-type-card.completed::before {
            content: '✓';
            position: absolute;
            top: 10px;
            right: 10px;
            width: 30px;
            height: 30px;
            background: #10b981;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 18px;
        }

        .lesson-type-card.completed .badge {
            background: #10b981;
        }

/* Статус урока в списке */
.lesson-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 10px;
}

    .lesson-status-badge.completed {
        background: rgba(16, 185, 129, 0.2);
        color: #10b981;
        border: 1px solid #10b981;
    }

    .lesson-status-badge.in-progress {
        background: rgba(254, 203, 0, 0.2);
        color: var(--secondary);
        border: 1px solid var(--secondary);
    }

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Стили для кастомных модальных окон */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.custom-alert {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    border: 2px solid var(--secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.custom-alert-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.custom-alert h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.custom-alert p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-alert-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

    .custom-alert-buttons .btn {
        min-width: 100px;
    }

/* Отметка пройденных разделов с прогрессом */
.lesson-type-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

    .lesson-type-card.completed {
        border-color: #10b981 !important;
        background: linear-gradient(135deg, #1e2a4a 0%, rgba(16, 185, 129, 0.15) 100%);
    }

        .lesson-type-card.completed::before {
            content: '✓';
            position: absolute;
            top: 10px;
            right: 10px;
            width: 30px;
            height: 30px;
            background: #10b981;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 18px;
            z-index: 2;
        }

    .lesson-type-card.in-progress {
        border-color: var(--secondary) !important;
        background: linear-gradient(135deg, #1e2a4a 0%, rgba(254, 203, 0, 0.1) 100%);
    }

/* Прогресс-бар внутри карточки */
.lesson-progress-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lesson-progress-bar {
    height: 6px;
    background: #334155;
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.lesson-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lesson-progress-percent {
    font-weight: 600;
    color: var(--secondary);
}

/* Статус урока в списке */
.lesson-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 10px;
}

    .lesson-status-badge.completed {
        background: rgba(16, 185, 129, 0.2);
        color: #10b981;
        border: 1px solid #10b981;
    }

    .lesson-status-badge.in-progress {
        background: rgba(254, 203, 0, 0.2);
        color: var(--secondary);
        border: 1px solid var(--secondary);
    }

/* Общий прогресс урока */
.lesson-overall-progress {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

    .lesson-overall-progress .label {
        font-size: 0.85rem;
        color: var(--text-muted);
        margin-bottom: 5px;
    }

/* Анимация для завершения */
.celebration-animation {
    animation: celebrate 0.6s ease;
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Стили для заблокированных уровней */
.level-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    border-color: #ef4444;
}

    .level-card.locked:hover {
        transform: none;
        border-color: #ef4444;
        background: var(--bg-card);
    }

.level-card .lock-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    opacity: 0.8;
}

/* Стили для заданий на соответствие */
.matching-block {
    padding: 25px;
}

.matching-instruction {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.matching-hint {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.matching-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.matching-left h4,
.matching-right h4 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.matching-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid #334155;
}

.matching-text {
    font-weight: 500;
    color: var(--text-light);
}

.matching-select {
    padding: 8px 12px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 200px;
}

    .matching-select:focus {
        outline: none;
        border-color: var(--secondary);
    }

    .matching-select:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.matching-correct {
    color: #10b981;
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.matching-incorrect {
    color: #ef4444;
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.matching-right-item {
    padding: 14px 12px;
    margin-bottom: 10px;
    background: rgba(74, 155, 217, 0.1);
    border-radius: 8px;
    border: 1px solid #334155;
    color: var(--text-light);
}

.matching-explanation {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    line-height: 1.8;
}

/* Анимация для модальных окон */
.custom-alert-overlay {
    transition: opacity 0.2s ease;
}

/* Стили для подсказки прогресса */
.progress-hint-locked {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Улучшенные стили для карточек уровней */
.level-card {
    position: relative;
    overflow: hidden;
}

    .level-card.locked::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: repeating-linear-gradient( 45deg, transparent, transparent 10px, rgba(239, 68, 68, 0.03) 10px, rgba(239, 68, 68, 0.03) 20px );
        pointer-events: none;
    }

/* Стили для модального окна "О проекте" */
.about-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.about-modal {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border: 2px solid var(--secondary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.about-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

    .about-modal-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--secondary);
        transform: rotate(90deg);
    }

.about-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.about-modal-icon {
    font-size: 2.5rem;
}

.about-modal-header h2 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 0;
}

.about-modal-body {
    padding: 25px 30px;
}

.about-section {
    margin-bottom: 25px;
}

    .about-section:last-child {
        margin-bottom: 0;
    }

    .about-section h3 {
        font-size: 1.3rem;
        color: var(--primary-light);
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .about-section p {
        color: var(--text-muted);
        line-height: 1.7;
        margin-bottom: 12px;
    }

    .about-section strong {
        color: var(--text-light);
    }

.about-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

    .about-list li {
        padding: 8px 0 8px 28px;
        color: var(--text-muted);
        position: relative;
        line-height: 1.6;
    }

        .about-list li::before {
            content: '•';
            color: var(--secondary);
            font-size: 1.5rem;
            position: absolute;
            left: 8px;
            top: 4px;
        }

.about-contacts {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(254, 203, 0, 0.2);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    color: var(--text-light);
    font-size: 1.05rem;
}

.contact-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.about-note {
    font-style: italic;
    color: var(--secondary) !important;
    margin-top: 15px;
    padding: 10px;
    border-left: 3px solid var(--secondary);
    background: rgba(254, 203, 0, 0.05);
}

.about-version {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

    .about-version p {
        margin-bottom: 0;
    }

.about-modal-footer {
    padding: 20px 30px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

    .about-modal-footer .btn {
        min-width: 180px;
    }

/* Toast уведомления */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--secondary);
    z-index: 10002;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 1.8rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toast-close {
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

    .toast-close:hover {
        color: var(--secondary);
    }

/* Стили для кастомных алертов */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.custom-alert {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    border: 2px solid var(--secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.custom-alert-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.custom-alert h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.custom-alert p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.custom-alert-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

    .custom-alert-buttons .btn {
        min-width: 100px;
    }

/* Стили для карточек уроков */
.lesson-item-card {
    background: linear-gradient(135deg, #1a2538 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

    .lesson-item-card:hover {
        border-color: var(--primary-light);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .lesson-item-card.lesson-locked {
        opacity: 0.7;
        cursor: not-allowed;
        border-color: #ef4444;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

        .lesson-item-card.lesson-locked:hover {
            transform: none;
            border-color: #ef4444;
            box-shadow: none;
        }

.lesson-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

    .lesson-item-header h2 {
        font-size: 1.5rem;
        color: var(--text-light);
        margin: 0;
    }

.lesson-lock-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.lesson-locked-message {
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

    .lesson-locked-message p {
        color: var(--text-muted);
        margin-bottom: 15px;
    }

    .lesson-locked-message .progress-hint {
        margin-top: 10px;
        font-size: 0.9rem;
        color: var(--secondary);
    }

/* Стили для заблокированных уровней */
.level-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    border-color: #ef4444;
}

    .level-card.locked:hover {
        transform: none;
        border-color: #ef4444;
        background: var(--bg-card);
    }

.level-card .lock-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    opacity: 0.8;
}

/* Стили для заданий на соответствие */
.matching-block {
    padding: 25px;
}

.matching-instruction {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.matching-hint {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.matching-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.matching-left h4,
.matching-right h4 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.matching-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid #334155;
}

.matching-text {
    font-weight: 500;
    color: var(--text-light);
}

.matching-select {
    padding: 8px 12px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 200px;
}

    .matching-select:focus {
        outline: none;
        border-color: var(--secondary);
    }

    .matching-select:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.matching-correct {
    color: #10b981;
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.matching-incorrect {
    color: #ef4444;
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.matching-right-item {
    padding: 14px 12px;
    margin-bottom: 10px;
    background: rgba(74, 155, 217, 0.1);
    border-radius: 8px;
    border: 1px solid #334155;
    color: var(--text-light);
}

.matching-explanation {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    line-height: 1.8;
}

/* Стили для модального окна с дополнительными материалами */
.extra-material-modal {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 2px solid var(--secondary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUp 0.3s ease;
}

.extra-material-content {
    padding: 30px;
    position: relative;
}

.extra-material-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

    .extra-material-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--secondary);
        transform: rotate(90deg);
    }

/* Стили для самой статьи */
.extra-article-content {
    color: var(--text-light);
}

    .extra-article-content h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        color: var(--secondary);
        border-bottom: 2px solid rgba(254, 203, 0, 0.3);
        padding-bottom: 15px;
    }

    .extra-article-content .article-subtitle {
        font-size: 1.2rem;
        color: var(--text-muted);
        margin-bottom: 30px;
        font-style: italic;
    }

    .extra-article-content h2 {
        font-size: 1.8rem;
        margin: 30px 0 20px;
        color: var(--primary-light);
        border-left: 4px solid var(--secondary);
        padding-left: 20px;
    }

    .extra-article-content h3 {
        font-size: 1.4rem;
        margin: 25px 0 15px;
        color: var(--text-light);
    }

    .extra-article-content p {
        margin-bottom: 15px;
        line-height: 1.8;
        color: var(--text-muted);
    }

    .extra-article-content strong {
        color: var(--text-light);
    }

    .extra-article-content .example-block {
        background: rgba(0, 106, 167, 0.1);
        border-left: 4px solid var(--primary);
        padding: 20px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .extra-article-content .swedish-word {
        color: var(--secondary);
        font-weight: 600;
        font-size: 1.1em;
    }

    .extra-article-content .article-footer {
        margin-top: 30px;
        text-align: right;
        font-style: italic;
        color: var(--secondary);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
    }

/* Стили для страницы статьи */
.extra-article-content {
    color: var(--text-light);
}

    .extra-article-content h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        color: var(--secondary);
        border-bottom: 2px solid rgba(254, 203, 0, 0.3);
        padding-bottom: 15px;
    }

    .extra-article-content .article-subtitle {
        font-size: 1.2rem;
        color: var(--text-muted);
        margin-bottom: 30px;
        font-style: italic;
    }

    .extra-article-content h2 {
        font-size: 1.8rem;
        margin: 30px 0 20px;
        color: var(--primary-light);
        border-left: 4px solid var(--secondary);
        padding-left: 20px;
    }

    .extra-article-content h3 {
        font-size: 1.4rem;
        margin: 25px 0 15px;
        color: var(--text-light);
    }

    .extra-article-content p {
        margin-bottom: 15px;
        line-height: 1.8;
        color: var(--text-muted);
    }

    .extra-article-content strong {
        color: var(--text-light);
    }

    .extra-article-content .example-block {
        background: rgba(0, 106, 167, 0.1);
        border-left: 4px solid var(--primary);
        padding: 20px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .extra-article-content .swedish-word {
        color: var(--secondary);
        font-weight: 600;
        font-size: 1.1em;
    }

    .extra-article-content .article-footer {
        margin-top: 30px;
        text-align: right;
        font-style: italic;
        color: var(--secondary);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
    }

    .extra-article-content .lesson-table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
        margin: 25px 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

        .extra-article-content .lesson-table th {
            background: var(--primary);
            color: white;
            padding: 15px;
            text-align: left;
            font-weight: 600;
        }

        .extra-article-content .lesson-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #334155;
        }

        .extra-article-content .lesson-table tr:last-child td {
            border-bottom: none;
        }

        .extra-article-content .lesson-table tr:hover {
            background: rgba(254, 203, 0, 0.05);
        }

    .extra-article-content .lesson-list {
        margin: 20px 0 20px 25px;
    }

        .extra-article-content .lesson-list li {
            margin: 10px 0;
            color: var(--text-muted);
        }

/* Стили для прочитанных статей */
.extra-materials-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #1a2538 0%, #1e293b 100%);
    border-radius: var(--border-radius);
}

.extra-materials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: var(--text-muted);
}

    .extra-materials-header span {
        font-size: 1rem;
    }

#articlesProgressCount {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.2rem;
}

.extra-materials-list {
    list-style: none;
    padding: 0;
}

    .extra-materials-list li {
        padding: 15px 20px;
        margin: 10px 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s;
        border-left: 4px solid transparent;
        position: relative;
    }

        .extra-materials-list li:hover {
            background: rgba(254, 203, 0, 0.1);
            padding-left: 25px;
            border-left-color: var(--secondary);
        }

        /* Стиль для прочитанной статьи */
        .extra-materials-list li.article-read {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
            border-left-color: #10b981;
            color: var(--text-light);
        }

            .extra-materials-list li.article-read:hover {
                background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.1) 100%);
                border-left-color: #10b981;
            }

            .extra-materials-list li.article-read::after {
                content: '✓';
                position: absolute;
                right: 20px;
                top: 50%;
                transform: translateY(-50%);
                color: #10b981;
                font-weight: bold;
                font-size: 1.2rem;
            }

/* Прогресс-бар для статей */
.articles-progress-bar {
    height: 4px;
    background: #334155;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.articles-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, var(--secondary));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Мини прогресс-бары в карточках уровней */
.level-mini-progress {
    margin: 12px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-progress-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.mini-label {
    min-width: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mini-progress-bar {
    flex: 1;
    height: 4px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

    .mini-progress-fill.articles-fill {
        background: linear-gradient(90deg, #10b981, #34d399);
    }

.mini-percent {
    min-width: 40px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Адаптация статуса в карточке */
.level-card .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    background: #334155;
    color: #cbd5e1;
    margin: 12px 0;
}

.level-card.completed .status {
    background: #166534;
    color: #bbf7d0;
}

.level-card.active .status {
    background: var(--primary);
    color: white;
}

.level-card.locked .status {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Кнопки быстрой прокрутки */
.scroll-buttons-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-light);
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    opacity: 0.8;
}

    .scroll-btn:hover {
        background: var(--primary);
        border-color: var(--secondary);
        color: var(--secondary);
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(254, 203, 0, 0.2);
    }

.scroll-btn-top {
    /* Стиль для кнопки "вверх" */
}

.scroll-btn-bottom {
    /* Стиль для кнопки "вниз" */
}

/* Стили для упражнений с вводом текста */
.text-input-practice {
    margin: 20px 0;
}

.text-input-wrapper {
    position: relative;
    margin: 15px 0;
}

.text-input-field {
    width: 100%;
    padding: 15px 20px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.2rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

    .text-input-field:focus {
        border-color: var(--primary-light);
        box-shadow: 0 0 0 4px rgba(74, 155, 217, 0.1);
    }

    .text-input-field.correct-input {
        border-color: #10b981;
        background: rgba(16, 185, 129, 0.1);
    }

    .text-input-field.incorrect-input {
        border-color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
    }

    .text-input-field.warning-input {
        border-color: #f59e0b;
        background: rgba(245, 158, 11, 0.1);
    }

.input-feedback {
    margin-top: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    display: none;
    animation: fadeIn 0.3s ease;
}

    .input-feedback.show {
        display: block;
    }

    .input-feedback.correct-feedback {
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid #10b981;
        color: #10b981;
    }

    .input-feedback.incorrect-feedback {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid #ef4444;
        color: #ef4444;
    }

    .input-feedback.warning-feedback {
        background: rgba(245, 158, 11, 0.1);
        border: 1px solid #f59e0b;
        color: #f59e0b;
    }

    .input-feedback .feedback-icon {
        margin-right: 8px;
        font-size: 1.2rem;
    }

    .input-feedback .correct-answer {
        margin-top: 5px;
        font-weight: 600;
    }

    .input-feedback .warning-note {
        margin-top: 5px;
        font-style: italic;
        font-size: 0.9rem;
    }

.text-input-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
    font-style: italic;
}

/* Карточки диалогов и примеров внутри Упражнений */
.lesson-content-block .example-block {
    border-left: 4px solid var(--primary);
    background: rgba(0,106,167,0.12);
}

/* Основной блок упражнений — жёлтая рамка */
.extra-article-content .example-block {
    border-left: 4px solid var(--secondary);
}

/* Заголовки Упражнений (обычно h3) */
.lesson-content-block h3 {
    color: var(--secondary);
}

/* Шведские слова в упражнениях — оранжевый акцент */
.lesson-content-block .swedish-word,
.extra-article-content .swedish-word {
    color: var(--secondary);
    font-weight: 600;
}

/* Таблицы в упражнениях */
.lesson-content-block .lesson-table th {
    background: var(--primary);
    color: white;
    border-bottom: 2px solid var(--secondary);
}

/* Списки уроков */
.lesson-content-block .lesson-list li {
    color: var(--text-muted);
    margin-left: 10px;
}

/* Конец блока советов (жёлтый блок) */
.lesson-content-block .example-block:last-of-type,
.extra-article-content .example-block:last-of-type {
    border-left-color: var(--secondary);
}

/* Стили для поисковой строки */
.lesson-search-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.global-search-container {
    margin-bottom: 25px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 2px solid #334155;
    border-radius: 50px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

    .search-input:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 4px rgba(254, 203, 0, 0.1);
    }

    .search-input::placeholder {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

.global-search-input {
    background: var(--bg-card);
    border-radius: 50px;
}

/* Выпадающий список результатов */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid #334155;
    border-radius: 16px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

    .search-result-item:hover {
        background: rgba(74, 155, 217, 0.1);
    }

    .search-result-item:last-child {
        border-bottom: none;
    }

.search-result-icon {
    font-size: 1.3rem;
    min-width: 32px;
    text-align: center;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.search-result-level {
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.search-result-badge {
    background: rgba(254, 203, 0, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--secondary);
}

/* Компактная поисковая строка */
.lesson-search-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.global-search-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-end;
}

.search-wrapper-compact {
    position: relative;
    width: 320px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input-compact {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 2px solid #334155;
    border-radius: 40px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

    .search-input-compact:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 3px rgba(254, 203, 0, 0.1);
    }

    .search-input-compact::placeholder {
        color: var(--text-muted);
        font-size: 0.85rem;
    }

.search-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid #334155;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .search-button:hover {
        border-color: var(--secondary);
        color: var(--secondary);
        background: rgba(254, 203, 0, 0.1);
        transform: scale(1.05);
    }

.search-results-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: var(--bg-card);
    border: 1px solid #334155;
    border-radius: 16px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

/* Для глобального поиска выпадашка слева */
.global-results-dropdown {
    right: auto;
    left: 0;
    width: 450px;
    max-width: calc(100vw - 40px);
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

    .search-result-item:hover {
        background: rgba(74, 155, 217, 0.1);
    }

    .search-result-item:last-child {
        border-bottom: none;
    }

.search-result-icon {
    font-size: 1.2rem;
    min-width: 28px;
    text-align: center;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    font-size: 0.9rem;
    line-height: 1.3;
}

    .search-result-title .lesson-number {
        color: var(--secondary);
        font-size: 0.8rem;
        background: rgba(254, 203, 0, 0.15);
        padding: 2px 6px;
        border-radius: 12px;
        margin-right: 8px;
    }

.search-result-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.search-result-level {
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.search-result-badge {
    background: rgba(254, 203, 0, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--secondary);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.search-no-results-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.search-no-results-text {
    font-size: 0.9rem;
}

/* Подсветка при прокрутке к уроку */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(254, 203, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(254, 203, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(254, 203, 0, 0);
    }
}

.highlight-lesson {
    animation: highlightPulse 1s ease-out;
}

/* Переключатель темы */
.theme-toggle-container {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

    .theme-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--secondary);
        transform: translateY(-1px);
    }

.theme-toggle-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.theme-toggle-text {
    white-space: nowrap;
}

/* ============================================================
   СВЕТЛАЯ ТЕМА (ИСПРАВЛЕННАЯ)
   ============================================================ */
body.light-theme {
    --primary: #005a8b;
    --primary-light: #3388bb;
    --secondary: #d49200;
    --bg-dark: #f0f4f8;
    --bg-card: #ffffff;
    --text-light: #1a202c;
    --text-muted: #4a5568;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, #e8f0fe 0%, #f5f7fa 100%);
    color: #1a202c;
}

    body.light-theme .lesson-fullscreen {
        background: linear-gradient(145deg, #e8f0fe 0%, #f5f7fa 100%);
    }

    /* ============================================================ */
    /* КАРТОЧКИ И БЛОКИ */
    /* ============================================================ */
    body.light-theme .lesson-content-block,
    body.light-theme .feature-card,
    body.light-theme .level-card,
    body.light-theme .lesson-type-card,
    body.light-theme .lesson-item-card {
        background: #ffffff;
        border: 1px solid #dde4ed;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    body.light-theme .lesson-content-block {
        background: #ffffff;
        border: 1px solid #dde4ed;
        color: #1a202c;
    }

        /* ============================================================ */
        /* ТЕКСТ */
        /* ============================================================ */
        body.light-theme .lesson-content-block p,
        body.light-theme .lesson-content-block li {
            color: #2d3748;
        }

        body.light-theme .lesson-content-block h1 {
            color: #005a8b;
        }

        body.light-theme .lesson-content-block h2 {
            color: #1a202c;
        }

        body.light-theme .lesson-content-block h3 {
            color: #2d3748;
        }

        body.light-theme .lesson-content-block strong {
            color: #1a202c;
            font-weight: 700;
        }

    body.light-theme .text-muted {
        color: #64748b;
    }

    /* ============================================================ */
    /* ТАБЛИЦЫ */
    /* ============================================================ */
    body.light-theme .lesson-table {
        background: #ffffff;
        border: 1px solid #dde4ed;
        border-radius: 12px;
    }

        body.light-theme .lesson-table th {
            background: #005a8b;
            color: #ffffff;
            font-weight: 600;
        }

        body.light-theme .lesson-table td {
            border-bottom: 1px solid #e8edf3;
            color: #2d3748;
        }

        body.light-theme .lesson-table tr:hover {
            background: #f0f7ff;
        }

    /* ============================================================ */
    /* БЛОКИ С ПРИМЕРАМИ */
    /* ============================================================ */
    body.light-theme .example-block {
        background: #f0f7ff;
        border-left: 4px solid #005a8b;
        color: #2d3748;
    }

        body.light-theme .example-block p {
            color: #2d3748;
        }

        body.light-theme .example-block h3 {
            color: #1a202c;
        }

    /* ============================================================ */
    /* БЛОКИ ПРАКТИКИ */
    /* ============================================================ */
    body.light-theme .practice-block {
        background: #f7fafc;
        border: 2px solid #dde4ed;
        color: #2d3748;
    }

        body.light-theme .practice-block h3 {
            color: #1a202c;
        }

        body.light-theme .practice-block p {
            color: #2d3748;
        }

    /* Варианты ответов */
    body.light-theme .practice-option {
        background: #ffffff;
        border: 2px solid #cbd5e0;
        color: #2d3748;
        font-weight: 500;
    }

        body.light-theme .practice-option:hover {
            background: #e8f0fe;
            border-color: #3388bb;
            color: #1a202c;
        }

        body.light-theme .practice-option.selected {
            border-color: #d49200;
            background: #fff9e6;
            color: #1a202c;
        }

        body.light-theme .practice-option.correct {
            border-color: #10b981;
            background: #ecfdf5;
            color: #065f46;
        }

        body.light-theme .practice-option.incorrect {
            border-color: #ef4444;
            background: #fef2f2;
            color: #991b1b;
        }

    /* ============================================================ */
    /* MATCHING — СОПОСТАВЛЕНИЕ */
    /* ============================================================ */
    body.light-theme .matching-item {
        background: #ffffff;
        border: 1px solid #dde4ed;
        color: #2d3748;
    }

    body.light-theme .matching-text {
        color: #1a202c;
        font-weight: 600;
    }

    body.light-theme .matching-select {
        background: #ffffff;
        border: 2px solid #cbd5e0;
        color: #2d3748;
    }

        body.light-theme .matching-select option {
            background: #ffffff;
            color: #2d3748;
        }

        body.light-theme .matching-select:focus {
            border-color: #d49200;
        }

    body.light-theme .matching-right-item {
        background: #f0f7ff;
        border: 1px solid #dde4ed;
        color: #2d3748;
    }

    body.light-theme .matching-left h4,
    body.light-theme .matching-right h4 {
        color: #1a202c;
    }

    /* ============================================================ */
    /* ТЕКСТОВЫЙ ВВОД */
    /* ============================================================ */
    body.light-theme .text-input-field {
        background: #ffffff;
        border: 2px solid #cbd5e0;
        color: #2d3748;
    }

        body.light-theme .text-input-field::placeholder {
            color: #94a3b8;
        }

        body.light-theme .text-input-field:focus {
            border-color: #3388bb;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(0, 106, 167, 0.1);
        }

    /* ============================================================ */
    /* ПОИСК */
    /* ============================================================ */
    body.light-theme .search-input-compact {
        background: #ffffff;
        border: 2px solid #cbd5e0;
        color: #2d3748;
    }

        body.light-theme .search-input-compact::placeholder {
            color: #94a3b8;
        }

        body.light-theme .search-input-compact:focus {
            border-color: #d49200;
            background: #ffffff;
        }

    body.light-theme .search-results-dropdown {
        background: #ffffff;
        border: 1px solid #dde4ed;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    body.light-theme .search-result-item {
        border-bottom: 1px solid #f0f4f8;
    }

        body.light-theme .search-result-item:hover {
            background: #f0f7ff;
        }

    body.light-theme .search-result-title {
        color: #1a202c;
    }

    body.light-theme .search-result-meta {
        color: #64748b;
    }

    /* ============================================================ */
    /* ДОПОЛНИТЕЛЬНЫЕ МАТЕРИАЛЫ */
    /* ============================================================ */
    body.light-theme .extra-materials-section {
        background: #f7fafc;
        border: 1px solid #dde4ed;
    }

        body.light-theme .extra-materials-section h3 {
            color: #1a202c;
        }

    body.light-theme .extra-materials-header {
        background: #ffffff;
        color: #64748b;
        border: 1px solid #dde4ed;
    }

    body.light-theme .extra-materials-list li {
        background: #ffffff;
        border: 1px solid #dde4ed;
        color: #2d3748;
    }

        body.light-theme .extra-materials-list li:hover {
            background: #fff9e6;
            border-left-color: #d49200;
            color: #1a202c;
        }

    /* ============================================================ */
    /* МОДАЛЬНЫЕ ОКНА */
    /* ============================================================ */
    body.light-theme .custom-alert,
    body.light-theme .about-modal {
        background: #ffffff;
        border: 2px solid #d49200;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    body.light-theme .custom-alert-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    body.light-theme .custom-alert h3 {
        color: #1a202c;
    }

    body.light-theme .custom-alert p {
        color: #4a5568;
    }

    body.light-theme .about-modal-header {
        background: #ffffff;
        border-bottom: 1px solid #dde4ed;
    }

        body.light-theme .about-modal-header h2 {
            color: #d49200;
        }

    body.light-theme .about-section h3 {
        color: #1a202c;
    }

    body.light-theme .about-section p {
        color: #4a5568;
    }

    body.light-theme .about-list li {
        color: #4a5568;
    }

    body.light-theme .about-contacts {
        background: #f7fafc;
        border: 1px solid #dde4ed;
    }

    /* ============================================================ */
    /* НАВИГАЦИЯ И ХЕДЕР */
    /* ============================================================ */
    body.light-theme .main-header {
        border-bottom: 1px solid #dde4ed;
    }

    body.light-theme .lesson-header-mini {
        border-bottom: 1px solid #dde4ed;
    }

    body.light-theme .lesson-footer-nav {
        border-top: 1px solid #dde4ed;
    }

    body.light-theme .main-nav a {
        color: #4a5568;
    }

        body.light-theme .main-nav a:hover,
        body.light-theme .main-nav a.active {
            color: #005a8b;
        }

    body.light-theme .back-link {
        color: #4a5568;
    }

        body.light-theme .back-link:hover {
            color: #005a8b;
        }

    /* ============================================================ */
    /* КНОПКИ */
    /* ============================================================ */
    body.light-theme .btn-primary {
        background: #d49200;
        color: #ffffff;
        box-shadow: 0 4px 15px rgba(212, 146, 0, 0.3);
    }

        body.light-theme .btn-primary:hover {
            background: #e6a800;
        }

    body.light-theme .btn-secondary {
        background: #ffffff;
        border: 1px solid #cbd5e0;
        color: #2d3748;
    }

        body.light-theme .btn-secondary:hover {
            border-color: #005a8b;
            color: #005a8b;
            background: #f0f7ff;
        }

    body.light-theme .check-btn {
        background: #005a8b;
        color: #ffffff;
    }

        body.light-theme .check-btn:hover {
            background: #3388bb;
        }

    /* ============================================================ */
    /* ПРОГРЕСС-БАРЫ */
    /* ============================================================ */
    body.light-theme .progress-bar-wrapper {
        background: #e2e8f0;
    }

    body.light-theme .next-level-progress {
        background: #f7fafc;
        border: 1px solid #dde4ed;
        border-left: 6px solid #d49200;
    }

    body.light-theme .progress-info {
        color: #1a202c;
    }

    body.light-theme .progress-percent {
        color: #d49200;
    }

    body.light-theme .progress-hint {
        color: #64748b;
    }

    /* ============================================================ */
    /* КАРТОЧКИ В HERO */
    /* ============================================================ */
    body.light-theme .card-item {
        background: #ffffff;
        border: 1px solid #dde4ed;
        color: #2d3748;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

        body.light-theme .card-item:nth-child(even) {
            background: #005a8b;
            color: #ffffff;
            border-color: #005a8b;
        }

    /* ============================================================ */
    /* ПОДСВЕТКА ШВЕДСКИХ СЛОВ */
    /* ============================================================ */
    body.light-theme .swedish-word {
        color: #005a8b;
        font-weight: 700;
    }

    /* ============================================================ */
    /* СПИСКИ */
    /* ============================================================ */
    body.light-theme .lesson-list li {
        color: #4a5568;
    }

        body.light-theme .lesson-list li strong {
            color: #1a202c;
        }

    /* ============================================================ */
    /* ОБРАТНАЯ СВЯЗЬ */
    /* ============================================================ */
    body.light-theme .feedback.correct {
        background: #ecfdf5;
        border: 1px solid #10b981;
        color: #065f46;
    }

    body.light-theme .feedback.incorrect {
        background: #fef2f2;
        border: 1px solid #ef4444;
        color: #991b1b;
    }

    body.light-theme .feedback.show {
        display: block;
    }

    /* ============================================================ */
    /* СТАТУСЫ УРОКОВ */
    /* ============================================================ */
    body.light-theme .lesson-status-badge.completed {
        background: #ecfdf5;
        color: #065f46;
        border: 1px solid #10b981;
    }

    body.light-theme .lesson-status-badge.in-progress {
        background: #fff9e6;
        color: #92400e;
        border: 1px solid #d49200;
    }

    /* ============================================================ */
    /* SCROLL BUTTONS */
    /* ============================================================ */
    body.light-theme .scroll-btn {
        background: #ffffff;
        border: 2px solid #cbd5e0;
        color: #005a8b;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

        body.light-theme .scroll-btn:hover {
            background: #005a8b;
            color: #ffffff;
            border-color: #005a8b;
        }

    /* ============================================================ */
    /* ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ */
    /* ============================================================ */
    body.light-theme .theme-toggle-btn {
        background: #f0f4f8;
        border: 1px solid #cbd5e0;
        color: #2d3748;
    }

        body.light-theme .theme-toggle-btn:hover {
            background: #e8f0fe;
            border-color: #005a8b;
        }

    /* ============================================================ */
    /* ТЕКСТ ВВОДА — ОБРАТНАЯ СВЯЗЬ */
    /* ============================================================ */
    body.light-theme .input-feedback.correct-feedback {
        background: #ecfdf5;
        border: 1px solid #10b981;
        color: #065f46;
    }

    body.light-theme .input-feedback.incorrect-feedback {
        background: #fef2f2;
        border: 1px solid #ef4444;
        color: #991b1b;
    }

    body.light-theme .input-feedback.warning-feedback {
        background: #fff9e6;
        border: 1px solid #d49200;
        color: #92400e;
    }

    /* ============================================================ */
    /* TOAST УВЕДОМЛЕНИЯ */
    /* ============================================================ */
    body.light-theme .toast-notification {
        background: #ffffff;
        border: 1px solid #d49200;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    body.light-theme .toast-title {
        color: #1a202c;
    }

    body.light-theme .toast-message {
        color: #4a5568;
    }

    /* ============================================================ */
    /* SELECT ВЫПАДАЮЩИЕ СПИСКИ */
    /* ============================================================ */
    body.light-theme select {
        background-color: #ffffff;
        color: #2d3748;
        border: 1px solid #cbd5e0;
    }

        body.light-theme select option {
            background-color: #ffffff;
            color: #2d3748;
        }

/* Стили для кнопки "Решить ещё раз" */
.retry-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--secondary); /* Используем вторичный цвет */
    color: #0b1120; /* Тёмный текст */
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .retry-btn:hover {
        background: #ffd633; /* Чуть светлее при наведении */
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(254, 203, 0, 0.4);
    }

    .retry-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(254, 203, 0, 0.3);
    }

/* Звезда для избранного */
.favorite-star {
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: var(--text-muted);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

    .favorite-star:hover {
        transform: scale(1.2);
    }

    .favorite-star.active {
        color: var(--secondary);
        text-shadow: 0 0 10px rgba(254, 203, 0, 0.5);
    }

        .favorite-star.active:hover {
            color: #ffd633;
        }

/* Для светлой темы */
body.light-theme .favorite-star {
    color: #94a3b8;
    text-shadow: none;
}

    body.light-theme .favorite-star.active {
        color: #d49200;
        text-shadow: 0 0 8px rgba(212, 146, 0, 0.3);
    }

        body.light-theme .favorite-star.active:hover {
            color: #b8860b;
        }

/* Карточки в избранном */
.favorite-card {
    position: relative;
    border: 2px solid var(--secondary) !important;
    background: linear-gradient(135deg, rgba(254, 203, 0, 0.05) 0%, var(--bg-card) 100%) !important;
}

body.light-theme .favorite-card {
    background: linear-gradient(135deg, rgba(212, 146, 0, 0.08) 0%, #ffffff 100%) !important;
    border-color: #d49200 !important;
}

.favorite-card-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.favorite-star-container {
    display: inline-block;
}

/* Toast уведомление для избранного */
.favorite-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

body.light-theme .favorite-toast {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.favorite-toast.show {
    transform: translateX(-50%) translateY(0);
}

.favorite-toast-icon {
    font-size: 1.3rem;
    color: var(--secondary);
}

/* Анимация для звезды */
@keyframes starPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.favorite-star.popping {
    animation: starPop 0.3s ease;
}

/* ============================================================ */
/* СИСТЕМА ЗАМЕТОК (WYSIWYG-редактор) */
/* ============================================================ */

/* Кнопка заметок */
.notes-button-container {
    display: inline-block;
}

.notes-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

    .notes-toggle-btn:hover {
        background: rgba(254, 203, 0, 0.15);
        border-color: var(--secondary);
        transform: scale(1.1);
    }

    .notes-toggle-btn.has-note {
        background: rgba(254, 203, 0, 0.2);
        border-color: var(--secondary);
        animation: notePulse 2s ease-in-out infinite;
    }

@keyframes notePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(254, 203, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(254, 203, 0, 0);
    }
}

.notes-toggle-btn.has-note:hover {
    background: rgba(254, 203, 0, 0.3);
}

.notes-icon {
    line-height: 1;
}

/* Панель заметок */
.notes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .notes-overlay.show {
        opacity: 1;
    }

.notes-panel {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(254, 203, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.notes-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notes-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-panel-icon {
    font-size: 1.5rem;
}

.notes-panel-title h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin: 0;
}

.notes-panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

    .notes-panel-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--secondary);
    }

/* Тулбар редактора */
.wysiwyg-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    overflow-x: auto;
    user-select: none;
}

.wysiwyg-toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wysiwyg-toolbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 6px;
    flex-shrink: 0;
}

.wysiwyg-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--text-muted);
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

    .wysiwyg-btn:hover {
        background: rgba(254, 203, 0, 0.12);
        border-color: rgba(254, 203, 0, 0.3);
        color: var(--secondary);
    }

    .wysiwyg-btn:active {
        transform: scale(0.95);
        background: rgba(254, 203, 0, 0.2);
    }

    .wysiwyg-btn.active {
        background: rgba(254, 203, 0, 0.2);
        border-color: var(--secondary);
        color: var(--secondary);
    }

/* Выпадающий список стилей */
.wysiwyg-select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    height: 34px;
}

    .wysiwyg-select:hover {
        border-color: rgba(254, 203, 0, 0.3);
        color: var(--secondary);
    }

    .wysiwyg-select:focus {
        outline: none;
        border-color: var(--secondary);
    }

    .wysiwyg-select option {
        background: var(--bg-card);
        color: var(--text-light);
    }

/* Тело редактора */
.wysiwyg-body {
    padding: 20px !important;
}

/* Сам редактор (contenteditable div) */
.wysiwyg-editor {
    width: 100%;
    min-height: 300px;
    max-height: 50vh;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-light);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-y: auto;
    transition: border-color 0.2s;
    outline: none;
}

    .wysiwyg-editor:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 3px rgba(254, 203, 0, 0.1);
    }

    /* Плейсхолдер */
    .wysiwyg-editor.empty::before {
        content: attr(placeholder);
        color: var(--text-muted);
        opacity: 0.5;
        pointer-events: none;
    }

    /* Стили внутри редактора */
    .wysiwyg-editor h2 {
        font-size: 1.5rem;
        color: var(--secondary);
        margin: 20px 0 10px;
        padding-bottom: 8px;
        border-bottom: 2px solid rgba(254, 203, 0, 0.3);
    }

    .wysiwyg-editor h3 {
        font-size: 1.25rem;
        color: var(--primary-light);
        margin: 16px 0 8px;
    }

    .wysiwyg-editor h4 {
        font-size: 1.1rem;
        color: var(--text-light);
        margin: 12px 0 6px;
    }

    .wysiwyg-editor blockquote {
        border-left: 4px solid var(--primary);
        padding: 10px 15px;
        margin: 12px 0;
        background: rgba(0, 106, 167, 0.1);
        border-radius: 0 8px 8px 0;
        font-style: italic;
        color: var(--text-muted);
    }

    .wysiwyg-editor ul,
    .wysiwyg-editor ol {
        margin: 10px 0;
        padding-left: 25px;
    }

    .wysiwyg-editor li {
        margin: 5px 0;
        color: inherit;
    }

    /* Исправленное выделение маркером — тёмный текст на жёлтом фоне */
    .wysiwyg-editor mark,
    .wysiwyg-editor [style*="background-color: rgb(255, 243, 176)"],
    .wysiwyg-editor [style*="background-color: #FFF3B0"],
    .wysiwyg-editor [style*="background-color: #fff3b0"] {
        color: #1a1a1a !important;
        padding: 2px 6px;
        border-radius: 3px;
        font-weight: 500;
    }

/* Футер */
.notes-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.notes-footer-left {
    display: flex;
    align-items: center;
}

.notes-footer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.notes-footer-actions {
    display: flex;
    gap: 8px;
}

.notes-save-status {
    font-size: 0.85rem;
    transition: all 0.3s;
}

.notes-status-success {
    color: #10b981;
}

.notes-status-error {
    color: #ef4444;
}

.notes-char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Кнопка удаления */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .btn-danger:hover {
        background: rgba(239, 68, 68, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    }

    .btn-danger:active {
        transform: translateY(0);
    }

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Кастомный confirm */
.notes-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .notes-confirm-overlay.show {
        opacity: 1;
    }

.notes-confirm-dialog {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.notes-confirm-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.notes-confirm-title {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.notes-confirm-message {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.notes-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

    .notes-confirm-buttons .btn {
        min-width: 120px;
    }

/* Быстрое уведомление */
.notes-quick-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 0.95rem;
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10004;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

    .notes-quick-toast.show {
        transform: translateX(-50%) translateY(0);
    }

/* ============================================================ */
/* СВЕТЛАЯ ТЕМА */
/* ============================================================ */
body.light-theme .notes-toggle-btn {
    border-color: rgba(0, 0, 0, 0.15);
}

    body.light-theme .notes-toggle-btn:hover {
        background: rgba(212, 146, 0, 0.1);
        border-color: #d49200;
    }

    body.light-theme .notes-toggle-btn.has-note {
        background: rgba(212, 146, 0, 0.15);
        border-color: #d49200;
    }

body.light-theme .notes-panel {
    background: #ffffff;
    border-color: #d49200;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

body.light-theme .notes-panel-header {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

body.light-theme .notes-panel-title h3 {
    color: #d49200;
}

body.light-theme .notes-panel-subtitle {
    color: #64748b;
}

body.light-theme .notes-panel-close {
    color: #64748b;
}

    body.light-theme .notes-panel-close:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #d49200;
    }

body.light-theme .wysiwyg-toolbar {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .wysiwyg-toolbar-divider {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .wysiwyg-btn {
    color: #64748b;
}

    body.light-theme .wysiwyg-btn:hover {
        background: rgba(212, 146, 0, 0.1);
        color: #d49200;
    }

    body.light-theme .wysiwyg-btn.active {
        background: rgba(212, 146, 0, 0.2);
        color: #d49200;
    }

body.light-theme .wysiwyg-select {
    border-color: rgba(0, 0, 0, 0.15);
    color: #64748b;
}

    body.light-theme .wysiwyg-select option {
        background: #ffffff;
        color: #1a202c;
    }

body.light-theme .wysiwyg-editor {
    background: #f8fafc;
    border: 1px solid #cbd5e0;
    color: #1a202c;
}

    body.light-theme .wysiwyg-editor:focus {
        border-color: #d49200;
        box-shadow: 0 0 0 3px rgba(212, 146, 0, 0.1);
    }

    body.light-theme .wysiwyg-editor.empty::before {
        color: #94a3b8;
    }

    body.light-theme .wysiwyg-editor h2 {
        color: #d49200;
        border-bottom-color: rgba(212, 146, 0, 0.3);
    }

    body.light-theme .wysiwyg-editor h3 {
        color: #005a8b;
    }

    body.light-theme .wysiwyg-editor h4 {
        color: #1a202c;
    }

    body.light-theme .wysiwyg-editor blockquote {
        background: rgba(0, 106, 167, 0.05);
        color: #4a5568;
    }

    /* В светлой теме выделение маркером тоже должно быть читаемым */
    body.light-theme .wysiwyg-editor mark,
    body.light-theme .wysiwyg-editor [style*="background-color: rgb(255, 243, 176)"],
    body.light-theme .wysiwyg-editor [style*="background-color: #FFF3B0"],
    body.light-theme .wysiwyg-editor [style*="background-color: #fff3b0"] {
        color: #1a1a1a !important;
        font-weight: 500;
    }

body.light-theme .notes-panel-footer {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

body.light-theme .notes-char-count {
    color: #64748b;
}

body.light-theme .btn-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    color: #ef4444;
}

    body.light-theme .btn-danger:hover {
        background: rgba(239, 68, 68, 0.1);
    }

body.light-theme .notes-confirm-dialog {
    background: #ffffff;
    border-color: #d49200;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body.light-theme .notes-confirm-title {
    color: #d49200;
}

body.light-theme .notes-confirm-message {
    color: #4a5568;
}

body.light-theme .notes-quick-toast {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ============================================================ */
/* СТИЛИ ДЛЯ НОВОГО ИНТЕРФЕЙСА ЗАМЕТОК */
/* ============================================================ */

/* Кнопка добавления заметки в панели */
.notes-panel-add-btn {
    background: rgba(254, 203, 0, 0.15);
    border: 1px solid rgba(254, 203, 0, 0.4);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--secondary);
}

    .notes-panel-add-btn:hover {
        background: rgba(254, 203, 0, 0.3);
        transform: rotate(90deg);
    }

body.light-theme .notes-panel-add-btn {
    background: rgba(212, 146, 0, 0.1);
    border-color: rgba(212, 146, 0, 0.4);
    color: #d49200;
}

    body.light-theme .notes-panel-add-btn:hover {
        background: rgba(212, 146, 0, 0.2);
    }

/* Основная область панели (список + редактор) */
.notes-panel-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Список заметок */
.notes-list {
    padding: 15px;
    overflow-y: auto;
    max-height: 55vh;
}

.notes-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notes-list-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

    .notes-list-item:hover {
        background: rgba(254, 203, 0, 0.08);
        border-color: rgba(254, 203, 0, 0.3);
    }

body.light-theme .notes-list-item {
    background: #f8fafc;
    border-color: #dde4ed;
}

    body.light-theme .notes-list-item:hover {
        background: #f0f7ff;
        border-color: #d49200;
    }

.notes-list-item-content {
    flex: 1;
    margin-right: 10px;
}

.notes-list-preview {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
}

.notes-list-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.notes-list-item-actions {
    display: flex;
    gap: 8px;
}

    .notes-list-item-actions button {
        background: none;
        border: none;
        font-size: 1rem;
        cursor: pointer;
        padding: 4px;
        transition: transform 0.2s;
        color: var(--text-muted);
    }

        .notes-list-item-actions button:hover {
            transform: scale(1.2);
        }

.notes-list-edit-btn:hover {
    color: var(--secondary);
}

.notes-list-delete-btn:hover {
    color: #ef4444;
}

/* Контейнер редактора */
.notes-editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Превью заметок на карточках страницы заметок */
.notes-card-preview {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================ */
/* МЕНЮ ЭКСПОРТА/ИМПОРТА ЗАМЕТОК */
/* ============================================================ */

.notes-export-import-menu {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notes-export-import-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .notes-export-import-group .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 20px;
    }

body.light-theme .notes-export-import-menu {
    border-top-color: #dde4ed;
}

/* Выпадающее меню выбора формата экспорта */
.export-format-dropdown {
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 4px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10005;
    animation: fadeIn 0.15s ease;
}

.export-format-item {
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.15s;
    user-select: none;
}

    .export-format-item:hover {
        background: rgba(254, 203, 0, 0.1);
        color: var(--secondary);
    }

body.light-theme .export-format-dropdown {
    background: #ffffff;
    border-color: #d49200;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.light-theme .export-format-item {
    color: #2d3748;
}

    body.light-theme .export-format-item:hover {
        background: rgba(212, 146, 0, 0.1);
        color: #d49200;
    }

/* Меню экспорта/импорта на странице заметок */
.notes-export-import-menu {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notes-export-import-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .notes-export-import-group .btn-sm {
        padding: 6px 14px;
        font-size: 0.8rem;
        border-radius: 20px;
    }

body.light-theme .notes-export-import-menu {
    border-top-color: #dde4ed;
}

/* ============================================================ */
/* СЛОВАРЬ */
/* ============================================================ */

/* Подсказка при клике на шведское слово */
.word-tooltip {
    position: fixed;
    z-index: 10003;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    max-width: 350px;
    animation: slideUp 0.2s ease;
    max-height: 80vh;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    animation: slideUp 0.2s ease;
}

.word-tooltip-content {
    padding: 15px;
}

.word-tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.word-tooltip-word {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.word-tooltip-transcription {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.word-tooltip-translation {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.word-tooltip-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.word-tooltip-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    border: none;
    white-space: nowrap;
}

.word-tooltip-add {
    background: rgba(254, 203, 0, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(254, 203, 0, 0.3);
}

    .word-tooltip-add:hover {
        background: rgba(254, 203, 0, 0.25);
        transform: translateY(-1px);
    }

.word-tooltip-remove {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

    .word-tooltip-remove:hover {
        background: rgba(239, 68, 68, 0.2);
        transform: translateY(-1px);
    }

.word-tooltip-close {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .word-tooltip-close:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
        border-color: #ef4444;
    }

/* Светлая тема */
body.light-theme .word-tooltip {
    background: #ffffff;
    border-color: #d49200;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body.light-theme .word-tooltip-word {
    color: #005a8b;
}

body.light-theme .word-tooltip-translation {
    color: #2d3748;
}

body.light-theme .word-tooltip-actions {
    border-top-color: #dde4ed;
}

body.light-theme .word-tooltip-add {
    background: rgba(212, 146, 0, 0.1);
    color: #d49200;
    border-color: rgba(212, 146, 0, 0.3);
}

    body.light-theme .word-tooltip-add:hover {
        background: rgba(212, 146, 0, 0.2);
    }

body.light-theme .word-tooltip-remove {
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

    body.light-theme .word-tooltip-remove:hover {
        background: rgba(239, 68, 68, 0.1);
    }

body.light-theme .word-tooltip-close {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #64748b;
}

    body.light-theme .word-tooltip-close:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

/* Toast для словаря */
.dictionary-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10004;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

    .dictionary-toast.show {
        transform: translateX(-50%) translateY(0);
    }

.dictionary-toast-icon {
    font-size: 1.2rem;
}

body.light-theme .dictionary-toast {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Карточки словаря */
.dictionary-card {
    border: 1px solid rgba(0, 106, 167, 0.3) !important;
    background: linear-gradient(135deg, rgba(0, 106, 167, 0.05) 0%, var(--bg-card) 100%) !important;
}

body.light-theme .dictionary-card {
    background: linear-gradient(135deg, rgba(0, 106, 167, 0.03) 0%, #ffffff 100%) !important;
    border-color: rgba(0, 106, 167, 0.3) !important;
}

/* ============================================================ */
/* ИНДИКАТОР ПРОГРЕССА С ТОЧКАМИ */
/* ============================================================ */

.page-dots-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto 10px;
    user-select: none;
}

.page-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #334155;
    color: #64748b;
    background: transparent;
    position: relative;
}

    .page-dot:hover {
        transform: scale(1.3);
        border-color: var(--primary-light);
        color: var(--primary-light);
        z-index: 2;
    }

    /* Теория */
    .page-dot.theory-dot {
        border-color: #475569;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* Практика */
    .page-dot.practice-dot {
        border-color: #f59e0b;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    /* Текущая страница */
    .page-dot.current {
        border-color: var(--secondary);
        color: var(--secondary);
        background: rgba(254, 203, 0, 0.15);
        transform: scale(1.3);
        box-shadow: 0 0 10px rgba(254, 203, 0, 0.3);
        z-index: 2;
        font-weight: bold;
    }

    /* Завершённая правильная */
    .page-dot.completed-correct {
        border-color: #10b981;
        background: rgba(16, 185, 129, 0.15);
        color: #10b981;
    }

    /* Завершённая неправильная */
    .page-dot.completed-incorrect {
        border-color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

/* Анимация появления */
@keyframes dotAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.page-dot {
    animation: dotAppear 0.3s ease backwards;
}

    /* Задержка для последовательного появления */
    .page-dot:nth-child(1) {
        animation-delay: 0.00s;
    }

    .page-dot:nth-child(2) {
        animation-delay: 0.02s;
    }

    .page-dot:nth-child(3) {
        animation-delay: 0.04s;
    }

    .page-dot:nth-child(4) {
        animation-delay: 0.06s;
    }

    .page-dot:nth-child(5) {
        animation-delay: 0.08s;
    }

    .page-dot:nth-child(6) {
        animation-delay: 0.10s;
    }

    .page-dot:nth-child(7) {
        animation-delay: 0.12s;
    }

    .page-dot:nth-child(8) {
        animation-delay: 0.14s;
    }

    .page-dot:nth-child(9) {
        animation-delay: 0.16s;
    }

    .page-dot:nth-child(10) {
        animation-delay: 0.18s;
    }

    .page-dot:nth-child(11) {
        animation-delay: 0.20s;
    }

    .page-dot:nth-child(12) {
        animation-delay: 0.22s;
    }

    .page-dot:nth-child(13) {
        animation-delay: 0.24s;
    }

    .page-dot:nth-child(14) {
        animation-delay: 0.26s;
    }

    .page-dot:nth-child(15) {
        animation-delay: 0.28s;
    }

    /* Тултип при наведении */
    .page-dot:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-card);
        color: var(--text-light);
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.75rem;
        white-space: nowrap;
        z-index: 10;
        border: 1px solid var(--secondary);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

/* Светлая тема */
body.light-theme .page-dot {
    border-color: #cbd5e0;
    color: #94a3b8;
    background: #f8fafc;
}

    body.light-theme .page-dot.current {
        border-color: #d49200;
        color: #d49200;
        background: rgba(212, 146, 0, 0.1);
        box-shadow: 0 0 10px rgba(212, 146, 0, 0.2);
    }

    body.light-theme .page-dot.completed-correct {
        border-color: #10b981;
        background: #ecfdf5;
        color: #065f46;
    }

    body.light-theme .page-dot.completed-incorrect {
        border-color: #ef4444;
        background: #fef2f2;
        color: #991b1b;
    }

    body.light-theme .page-dot:hover::after {
        background: #ffffff;
        border-color: #d49200;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

/* ============================================================ */
/* РЕЖИМ ПОВТОРЕНИЯ СЛОВ (КАРТОЧКИ) - ОБНОВЛЁННЫЙ */
/* ============================================================ */

.flashcard-mode-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0b1120 0%, #111827 100%);
    z-index: 10010;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

body.light-theme .flashcard-mode-screen {
    background: linear-gradient(145deg, #e8f0fe 0%, #f5f7fa 100%);
}

.flashcard-header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.flashcard-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flashcard-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 10px 20px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .flashcard-close-btn:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
        color: #ef4444;
    }

body.light-theme .flashcard-close-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #2d3748;
}

    body.light-theme .flashcard-close-btn:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }

.flashcard-counter {
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .flashcard-counter {
    background: #ffffff;
    border-color: #dde4ed;
}

/* Статистика */
.flashcard-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.flashcard-stat {
    background: var(--bg-card);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .flashcard-stat.known {
        color: #10b981;
        border-color: rgba(16, 185, 129, 0.4);
    }

    .flashcard-stat.unknown {
        color: #ef4444;
        border-color: rgba(239, 68, 68, 0.4);
    }

    .flashcard-stat.new {
        color: var(--text-muted);
        border-color: rgba(255, 255, 255, 0.2);
    }

body.light-theme .flashcard-stat {
    background: #ffffff;
}

/* Фильтры */
.flashcard-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flashcard-filter-btn {
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-weight: 500;
}

    .flashcard-filter-btn:hover {
        border-color: var(--secondary);
        color: var(--secondary);
    }

    .flashcard-filter-btn.active {
        background: rgba(254, 203, 0, 0.2);
        border-color: var(--secondary);
        color: var(--secondary);
    }

body.light-theme .flashcard-filter-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
    color: #64748b;
}

    body.light-theme .flashcard-filter-btn.active {
        background: rgba(212, 146, 0, 0.15);
        border-color: #d49200;
        color: #d49200;
    }

/* Контейнер карточки */
.flashcard-container {
    width: 100%;
    max-width: 500px;
    height: 350px;
    perspective: 1000px;
    margin: 20px 0 30px;
    cursor: pointer;
    position: relative;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

    .flashcard.flipped {
        transform: rotateY(180deg);
    }

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px solid var(--secondary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.flashcard-face-front {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

.flashcard-face-back {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    transform: rotateY(180deg);
}

body.light-theme .flashcard-face-front {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-color: #d49200;
}

body.light-theme .flashcard-face-back {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    border-color: #d49200;
}

.flashcard-word {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
    text-align: center;
    word-break: break-word;
}

body.light-theme .flashcard-word {
    color: #005a8b;
}

.flashcard-transcription {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
    text-align: center;
}

.flashcard-translation {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    word-break: break-word;
    line-height: 1.4;
}

body.light-theme .flashcard-translation {
    color: #1a202c;
}

.flashcard-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .flashcard-status-badge.known {
        background: rgba(16, 185, 129, 0.2);
        color: #10b981;
        border: 1px solid #10b981;
    }

    .flashcard-status-badge.unknown {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
        border: 1px solid #ef4444;
    }

    .flashcard-status-badge.new {
        background: rgba(148, 163, 184, 0.2);
        color: var(--text-muted);
        border: 1px solid var(--text-muted);
    }

.flashcard-tap-hint {
    position: absolute;
    bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Кнопки действий */
.flashcard-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.flashcard-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .flashcard-nav-btn:hover {
        border-color: var(--secondary);
        color: var(--secondary);
        transform: scale(1.1);
    }

    .flashcard-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none;
    }

body.light-theme .flashcard-nav-btn {
    background: #ffffff;
    border-color: #cbd5e0;
    color: #2d3748;
}

    body.light-theme .flashcard-nav-btn:hover {
        border-color: #d49200;
        color: #d49200;
    }

/* Кнопки "Знаю" и "Не знаю" */
.flashcard-action-btn {
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flashcard-know-btn {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

    .flashcard-know-btn:hover {
        background: rgba(16, 185, 129, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }

.flashcard-dont-know-btn {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

    .flashcard-dont-know-btn:hover {
        background: rgba(239, 68, 68, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    }

.flashcard-shuffle-btn {
    padding: 12px 25px;
    border-radius: 40px;
    background: rgba(74, 155, 217, 0.15);
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

    .flashcard-shuffle-btn:hover {
        background: rgba(74, 155, 217, 0.25);
        transform: translateY(-2px);
    }

body.light-theme .flashcard-shuffle-btn {
    background: rgba(0, 106, 167, 0.08);
    border-color: #3388bb;
    color: #005a8b;
}

/* Пустое состояние */
.flashcard-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

    .flashcard-empty-state .icon {
        font-size: 3rem;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    .flashcard-empty-state h3 {
        margin-bottom: 10px;
        color: var(--text-light);
    }

    .flashcard-empty-state p {
        margin-bottom: 20px;
        line-height: 1.6;
    }

/* style.css — добавьте этот блок */
.flashcard-launch-btn {
    position: fixed; /* Фиксированное положение на экране */
    bottom: 30px; /* Отступ от нижнего края */
    right: 30px; /* Отступ от правого края */
    width: 56px; /* Квадрат */
    height: 56px;
    border-radius: 16px; /* Слегка скруглённый квадрат */
    background: var(--primary);
    color: white;
    border: 2px solid var(--secondary);
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 999; /* Поверх контента, но ниже словарной подсказки */
}

    .flashcard-launch-btn:hover {
        background: var(--primary-light);
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(254, 203, 0, 0.2);
    }

    .flashcard-launch-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
        border-color: var(--text-muted);
    }

/* Анимация свайпа влево (Не знаю) */
@keyframes swipeLeft {
    0% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }

    30% {
        transform: translateX(-20px) rotate(-3deg);
        opacity: 0.8;
    }

    100% {
        transform: translateX(-200px) rotate(-8deg);
        opacity: 0;
    }
}

/* Анимация свайпа вправо (Знаю) */
@keyframes swipeRight {
    0% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }

    30% {
        transform: translateX(20px) rotate(3deg);
        opacity: 0.8;
    }

    100% {
        transform: translateX(200px) rotate(8deg);
        opacity: 0;
    }
}

/* Анимация появления новой карточки */
@keyframes cardAppear {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    60% {
        transform: scale(1.03);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Классы для анимации свайпа */
.flashcard-container.swipe-left .flashcard {
    animation: swipeLeft 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.flashcard-container.swipe-right .flashcard {
    animation: swipeRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.flashcard-container.card-appear .flashcard {
    animation: cardAppear 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

/* Предотвращаем конфликт с анимацией переворота */
.flashcard-container.swipe-left .flashcard.flipped,
.flashcard-container.swipe-right .flashcard.flipped {
    animation-duration: 0.35s;
}

/* Эмодзи-индикатор при свайпе */
.flashcard-swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: all 0.2s ease;
}

    .flashcard-swipe-indicator.left {
        left: -60px;
    }

    .flashcard-swipe-indicator.right {
        right: -60px;
    }

.flashcard-container.swipe-left .flashcard-swipe-indicator.left {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.flashcard-container.swipe-right .flashcard-swipe-indicator.right {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.level-selection-card {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

    .level-selection-card:hover {
        border-color: var(--secondary);
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(254, 203, 0, 0.1);
    }

    .level-selection-card.selected {
        border-color: var(--secondary);
        background: rgba(254, 203, 0, 0.05);
    }

    .level-selection-card h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
        color: var(--secondary);
    }

    .level-selection-card p {
        color: var(--text-muted);
        font-size: 0.95rem;
        margin-bottom: 20px;
        min-height: 60px;
    }

/* ============================================================ */
/* ПЛАВАЮЩАЯ КНОПКА ВОЗВРАТА */
/* ============================================================ */
.floating-back-button {
    position: fixed;
    /* НОВОЕ ПОЗИЦИОНИРОВАНИЕ: левый верхний угол */
    top: 20px;
    left: 20px;
    /* Убираем старое центрирование */
    transform: none;
    background: var(--bg-card);
    color: var(--text-light);
    border: 1px solid var(--primary-light);
    border-radius: 40px;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    z-index: 998; /* Достаточно высоко, но не перекрывает модальные окна */

    opacity: 0;
    pointer-events: none; /* Не кликабельно, пока скрыто */
    transition: opacity 0.3s ease, background 0.2s, transform 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

    .floating-back-button.visible {
        opacity: 1;
        pointer-events: auto; /* Делаем кликабельным */
    }

    .floating-back-button:hover {
        background: var(--primary-light);
        color: white;
        border-color: var(--secondary);
        transform: scale(1.05); /* Обычный scale вместо смещения */
        text-decoration: none;
    }

body.light-theme .floating-back-button {
    background: #ffffff;
    border-color: #cbd5e0;
    color: #2d3748;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

    body.light-theme .floating-back-button:hover {
        background: #005a8b;
        color: #ffffff;
        border-color: #d49200;
    }

.scroll-to-top-btn {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-light);
    color: var(--text-light);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

    .scroll-to-top-btn.visible {
        opacity: 0.85;
        pointer-events: auto;
    }

    .scroll-to-top-btn:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-2px);
    }

.levels-container ~ .scroll-to-top-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(254, 203, 0, 0.4);
}

/* ============================================================ */
/* БЕЙДЖ ВРЕМЕНИ ЧТЕНИЯ СТАТЬИ */
/* ============================================================ */
.reading-time-badge {
    display: inline-block;
    background: rgba(254, 203, 0, 0.12);
    color: var(--secondary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 15px;
    vertical-align: middle;
    border: 1px solid rgba(254, 203, 0, 0.25);
    white-space: nowrap;
}

/* Светлая тема */
body.light-theme .reading-time-badge {
    background: rgba(212, 146, 0, 0.1);
    color: #92400e;
    border-color: rgba(212, 146, 0, 0.3);
}

/* ============================================================ */
/* АНИМАЦИЯ КОНФЕТТИ ПРИ ЗАВЕРШЕНИИ */
/* ============================================================ */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    z-index: 10001;
    pointer-events: none;
    animation: confetti-fall 3s ease-in forwards;
}

/* ============================================================ */
/* ПЛАВНЫЙ ПЕРЕХОД МЕЖДУ ТЕМАМИ */
/* ============================================================ */

/* Глобальный переход для body */
body {
    transition: background 0.4s ease, color 0.4s ease;
}

/* Все основные контейнеры */
.app-container,
.lesson-app-container,
.levels-container,
.hero,
.features,
.main-header,
.lesson-header-mini,
.lesson-footer-nav,
.main-footer,
.lesson-fullscreen {
    transition: background 0.4s ease, border-color 0.4s ease;
}

/* Карточки и блоки */
.lesson-content-block,
.feature-card,
.level-card,
.lesson-type-card,
.lesson-item-card,
.level-selection-card,
.extra-article-content,
.practice-block,
.example-block,
.extra-materials-section,
.dashboard-card {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

    /* Текст */
    h1, h2, h3, h4, h5, h6, p, li, span, div,
    .lesson-content-block p,
    .lesson-content-block li,
    .extra-article-content p,
    .extra-article-content li,
    .text-muted,
    .swedish-word {
        transition: color 0.4s ease;
    }

    /* Таблицы */
    .lesson-table,
    .lesson-table th,
    .lesson-table td,
    .extra-article-content .lesson-table,
    .extra-article-content .lesson-table th,
    .extra-article-content .lesson-table td {
        transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
    }

/* Кнопки */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.check-btn,
.retry-btn,
.flashcard-nav-btn,
.flashcard-action-btn,
.flashcard-shuffle-btn,
.flashcard-close-btn,
.flashcard-filter-btn,
.theme-toggle-btn,
.notes-toggle-btn,
.scroll-btn,
.floating-back-button,
.scroll-to-top-btn {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.2s ease;
}

/* Поля ввода */
input,
select,
textarea,
.search-input-compact,
.text-input-field,
.wysiwyg-editor,
.wysiwyg-select,
.matching-select {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* Модальные окна */
.custom-alert,
.custom-modal,
.about-modal,
.notes-panel,
.notes-confirm-dialog,
.toast-notification,
.notes-quick-toast,
.dictionary-toast,
.favorite-toast,
.word-tooltip {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Прогресс-бары */
.progress-bar-wrapper,
.progress-bar-fill {
    transition: background 0.4s ease, width 0.4s ease;
}

/* Навигация и ссылки */
.main-nav a,
.back-link,
.breadcrumbs a {
    transition: color 0.4s ease;
}

/* Звёзды избранного */
.favorite-star {
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* Карточки слов в словаре */
.dictionary-card,
.flashcard-face-front,
.flashcard-face-back {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Хедеры модалок и панелей */
.notes-panel-header,
.notes-panel-footer,
.about-modal-header,
.about-modal-footer {
    transition: background 0.4s ease, border-color 0.4s ease;
}

/* Разделители */
.lesson-header-mini,
.lesson-footer-nav,
.main-header,
.wysiwyg-toolbar {
    transition: border-color 0.4s ease;
}

/* Анимация для переключения иконки темы */
.theme-toggle-icon {
    transition: transform 0.4s ease;
}

body.light-theme .theme-toggle-icon {
    transform: rotate(360deg);
}

/* Оверлей для эффекта переключения темы */
.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(254, 203, 0, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .theme-transition-overlay.active {
        opacity: 1;
        animation: themeFlash 0.6s ease-out forwards;
    }

@keyframes themeFlash {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Форсированный переход для элементов, которые могут не подхватиться */
body.light-theme *,
body.light-theme *::before,
body.light-theme *::after {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* Но отключаем анимацию для элементов, которым она мешает */
body.light-theme .progress-bar-fill,
body.light-theme .reading-progress-bar,
body.light-theme .flashcard,
body.light-theme .confetti-piece {
    transition: none !important; /* или свои специфичные transition */
}

/* Кнопка мобильного меню — скрыта на десктопе */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

    .mobile-menu-toggle:hover {
        border-color: var(--secondary);
        color: var(--secondary);
    }

/* ============================================================ */
/* ГЛОБАЛЬНАЯ АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (≤ 768px)   */
/* ============================================================ */
@media (max-width: 768px) {

    /* --- ГЛАВНАЯ СТРАНИЦА, УРОВНИ, УРОКИ: ОБЩИЕ ПРАВИЛА --- */
    body {
        font-size: 16px; /* Базовый размер шрифта */
    }

    .app-container {
        padding: 10px;
    }

    .main-header {
        padding: 12px 0;
        margin-bottom: 20px;
        gap: 15px;
        justify-content: space-between; /* Важно для размещения логотипа и бургера */
        align-items: center;
    }

    .logo {
        font-size: 1.4rem;
    }

    .flag-icon {
        font-size: 1.5rem;
    }

    /* --- МОБИЛЬНОЕ МЕНЮ НАВИГАЦИИ --- */
    .main-nav {
        /* По умолчанию скрываем меню и показываем кнопку-бургер */
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg-dark); /* Чуть более тёмный фон для выпадающего меню */
        border-radius: 12px;
        padding: 15px;
        gap: 15px;
        align-items: flex-start;
        border: 1px solid rgba(255,255,255,0.1);
    }

        .main-nav.mobile-visible {
            display: flex; /* Показываем меню при активации */
        }

    .mobile-menu-toggle {
        display: flex; /* Показываем кнопку-бургер */
    }

    .main-nav a {
        font-size: 1.1rem;
        padding: 8px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .theme-toggle-container {
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .theme-toggle-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* --- ГЛАВНАЯ СТРАНИЦА: HERO-БЛОК --- */
    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0 40px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 20px;
        margin-top: 30px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .floating-cards {
        gap: 10px;
    }

    .card-item {
        padding: 12px 20px;
        font-size: 1.1rem;
    }

    /* --- ОСТАЛЬНЫЕ ОБЩИЕ КОМПОНЕНТЫ --- */
    .features h2 {
        font-size: 1.6rem;
    }

    .levels-header h1 {
        font-size: 1.8rem;
    }

    .levels-grid {
        gap: 15px;
    }

    /* --- СТРАНИЦА УРОКОВ --- */
    .lesson-nav-top {
        flex-direction: column;
        text-align: center;
    }

    .lesson-actions-top {
        justify-content: center;
    }

    .lesson-content-block {
        padding: 25px;
    }

        .lesson-content-block h1 {
            font-size: 2rem;
        }

    /* Таблицы — горизонтальный скролл */
    .lesson-table {
        min-width: 500px;
        font-size: 0.85rem;
    }

        .lesson-table th,
        .lesson-table td {
            padding: 10px 8px;
            white-space: nowrap;
        }

            .lesson-table td:last-child,
            .lesson-table th:last-child {
                white-space: normal;
            }

    .extra-article-content .lesson-table {
        min-width: 500px;
        font-size: 0.85rem;
    }

        .extra-article-content .lesson-table th,
        .extra-article-content .lesson-table td {
            padding: 10px 8px;
            white-space: nowrap;
        }

            .extra-article-content .lesson-table td:last-child,
            .extra-article-content .lesson-table th:last-child {
                white-space: normal;
            }

    /* --- КНОПКИ ПРОКРУТКИ, УВЕДОМЛЕНИЯ, МОДАЛЬНЫЕ ОКНА --- */
    .scroll-buttons-container {
        right: 15px;
        bottom: 15px;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .favorite-toast,
    .dictionary-toast,
    .notes-quick-toast {
        bottom: 15px;
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .word-tooltip {
        max-width: 280px;
    }

    .about-modal {
        max-height: 90vh;
    }

    .about-modal-header {
        padding: 20px 20px 15px;
    }

        .about-modal-header h2 {
            font-size: 1.5rem;
        }

    .about-modal-body {
        padding: 20px;
    }

    .about-modal-footer {
        padding: 15px 20px 20px;
    }

        .about-modal-footer .btn {
            width: 100%;
        }

    .contact-item {
        font-size: 0.95rem;
        word-break: break-all;
    }

    /* --- ПОИСК --- */
    .search-wrapper-compact {
        width: 100%;
    }

    .search-results-dropdown,
    .global-results-dropdown {
        width: calc(100vw - 40px);
        right: 0;
        left: auto;
    }

    .search-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .search-input-compact {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .floating-back-button {
        left: 10px;
        top: 10px;
        padding: 6px 14px;
        font-size: 0.85rem;
        border-radius: 30px;
    }

        .floating-back-button.visible {
            display: inline-block; /* Позволяет кнопке появиться */
        }

    /* --- СЛОВАРЬ (КАРТОЧКИ) --- */
    .flashcard-container {
        max-width: 100%;
        height: 300px;
        margin: 20px 0 25px;
    }

    .flashcard-face {
        padding: 25px;
    }

    .flashcard-word {
        font-size: 2rem;
    }

    .flashcard-translation {
        font-size: 1.4rem;
    }

    .flashcard-header {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .flashcard-controls {
        gap: 10px;
    }

    .flashcard-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .flashcard-action-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .flashcard-stats,
    .flashcard-filters {
        justify-content: center;
    }

    .flashcard-launch-btn {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        border-radius: 14px;
    }

    /* --- ЗАМЕТКИ (РЕДАКТОР) --- */
    .notes-panel {
        width: 95%;
        max-height: 95vh;
    }

    .notes-panel-header {
        padding: 12px 15px;
    }

    .wysiwyg-toolbar {
        padding: 8px 10px;
        gap: 2px;
    }

    .wysiwyg-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .wysiwyg-select {
        padding: 4px 8px;
        font-size: 0.8rem;
        height: 30px;
    }

    .wysiwyg-body {
        padding: 10px !important;
    }

    .wysiwyg-editor {
        min-height: 200px;
        padding: 12px;
    }

    .notes-panel-footer {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
    }

    .notes-footer-left {
        order: 2;
        justify-content: center;
    }

    .notes-footer-info {
        order: 1;
    }

    .notes-footer-actions {
        order: 3;
        justify-content: center;
    }

    .notes-confirm-buttons {
        flex-direction: column;
    }

        .notes-confirm-buttons .btn {
            width: 100%;
        }

    /* --- ИНДИКАТОР ПРОГРЕССА (ТОЧКИ) --- */
    .page-dots-indicator {
        gap: 5px;
        padding: 10px 5px;
    }

    .page-dot {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

        .page-dot.practice-dot {
            width: 20px;
            height: 20px;
            font-size: 11px;
        }

        .page-dot.theory-dot {
            width: 15px;
            height: 15px;
            font-size: 8px;
        }

    /* --- ЗАДАНИЯ НА СООТВЕТСТВИЕ --- */
    .matching-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .matching-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .matching-select {
        width: 100%;
        min-width: unset;
    }
}

.scroll-to-bottom-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-light);
    color: var(--text-light);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

    .scroll-to-bottom-btn.visible {
        opacity: 0.85;
        pointer-events: auto;
    }

    .scroll-to-bottom-btn:hover {
        background: var(--primary);
        color: white;
        transform: translateY(-2px);
    }

/* для светлой темы */
body.light-theme .scroll-to-bottom-btn {
    background: #ffffff;
    border-color: #cbd5e0;
    color: #2d3748;
}

    body.light-theme .scroll-to-bottom-btn:hover {
        background: #005a8b;
        color: #ffffff;
        border-color: #d49200;
    }

/* ============================================================ */
/* ИСТОРИЯ ОТВЕТОВ */
/* ============================================================ */

.answer-history {
    margin-top: 15px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.answer-history-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}

    .answer-history-toggle:hover {
        background: rgba(254, 203, 0, 0.05);
        color: var(--text-light);
    }

.history-toggle-icon {
    font-size: 1.1rem;
}

.history-toggle-text {
    flex: 1;
    font-weight: 600;
}

.history-toggle-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.answer-history-content {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

.answer-history-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-left: 3px solid transparent;
}

    .answer-history-item:last-child {
        border-bottom: none;
    }

.history-icon {
    font-weight: bold;
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.history-correct .history-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.history-incorrect .history-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.history-correct {
    border-left-color: #10b981;
}

.history-incorrect {
    border-left-color: #ef4444;
}

.history-text {
    flex: 1;
    color: var(--text-light);
    word-break: break-word;
}

.history-attempt-number {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 4px;
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Светлая тема */
body.light-theme .answer-history {
    background: rgba(0, 0, 0, 0.02);
    border-color: #dde4ed;
}

body.light-theme .answer-history-toggle {
    color: #64748b;
}

    body.light-theme .answer-history-toggle:hover {
        background: rgba(212, 146, 0, 0.05);
        color: #1a202c;
    }

body.light-theme .answer-history-content {
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .answer-history-item {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .history-text {
    color: #2d3748;
}

body.light-theme .history-correct .history-icon {
    color: #065f46;
    background: rgba(16, 185, 129, 0.1);
}

body.light-theme .history-incorrect .history-icon {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
}