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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
}

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

/* ===== Шапка ===== */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a2a3a;
}

.header h1 span {
    color: #ff6b35;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

/* ===== Главное меню ===== */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.menu-btn {
    background: white;
    border: none;
    border-radius: 24px;
    padding: 32px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
}

.menu-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.menu-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b35;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
}

.emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.menu-btn h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1e293b;
}

.menu-btn p {
    font-size: 14px;
    color: #64748b;
}

/* ===== Общие стили ===== */
.view {
    animation: fadeIn 0.3s ease;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.view-header h2 {
    font-size: 24px;
    color: #1e293b;
}

.back-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.back-btn:hover {
    background: #cbd5e1;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* ===== Теория ===== */
.theory-content {
    background: white;
    border-radius: 20px;
    padding: 28px;
    line-height: 1.7;
    color: #334155;
}

.theory-content h3 {
    color: #1e293b;
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b35;
    display: inline-block;
}

.theory-content p {
    margin-bottom: 12px;
}

.theory-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.theory-content th, .theory-content td {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

.theory-content th {
    background: #f1f5f9;
}

/* ===== Сетка тренажёров ===== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.task-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.task-card:hover {
    transform: translateY(-3px);
    border-color: #ff6b35;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.task-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}

.task-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.task-stats {
    display: flex;
    gap: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}

.legend-bottom {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 6px;
}

.badge.new { background: #9e9e9e; }
.badge.errors { background: #f44336; }
.badge.correct { background: #4caf50; }
.badge.easy { background: #ffd700; }
.badge.hard { background: #ff9800; }

/* ===== Статистика ===== */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a2a3a;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

.stats-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}

.stats-section h3 {
    margin-bottom: 16px;
    color: #1e293b;
}

.daily-item, .recommendation-item {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.recommendation-item {
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 8px;
    border-left: 4px solid #ff6b35;
}

/* ===== Тренажёр ===== */
.trainer-container {
    background: white;
    border-radius: 24px;
    padding: 24px;
}

.trainer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.trainer-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.trainer-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    width: 150px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ff6b35;
    border-radius: 10px;
    transition: width 0.3s;
}

.question-area {
    margin-bottom: 24px;
}

.question-text {
    font-size: 1.3em;
    line-height: 1.6;
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.question-word {
    font-size: 2em;
    text-align: center;
    margin-bottom: 16px;
}

.answer-area {
    margin-bottom: 20px;
}

.answer-input {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.answer-input input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: 0.2s;
}

.answer-input input:focus {
    border-color: #ff6b35;
}

.answer-input button, .choice-buttons button, .digit-buttons button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.answer-input button:hover, .choice-buttons button:hover {
    background: #e55a2b;
}

.choice-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-buttons button:first-child {
    background: #4caf50;
}

.choice-buttons button:first-child:hover {
    background: #43a047;
}

.choice-buttons button:last-child {
    background: #f44336;
}

.choice-buttons button:last-child:hover {
    background: #d32f2f;
}

.digit-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.digit-btn {
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    color: #1e293b;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
}

.digit-btn.selected {
    background: #ff6b35;
    color: white;
}

.selectable-word {
    display: inline-block;
    padding: 2px 4px;
    margin: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.1s;
}

.selectable-word.selected {
    background: #ffd700;
    box-shadow: 0 0 0 2px #ff6b35;
}

.lex-words, .fraz-words {
    line-height: 2;
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.feedback-area {
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.feedback-correct {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 12px;
}

.feedback-incorrect {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 12px;
}

.explanation {
    font-size: 14px;
    font-weight: normal;
    margin-top: 8px;
    display: block;
}

.results-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.result-card {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 20px;
    min-width: 120px;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: #ff6b35;
}

.result-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
}

.secondary-btn, .retry-errors-btn {
    background: #e2e8f0;
    color: #1e293b;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
}

.retry-errors-btn {
    background: #ff9800;
    color: white;
}

/* ===== Адаптив ===== */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .menu-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .menu-btn {
        padding: 20px;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .trainer-header {
        flex-direction: column;
        text-align: center;
    }
    
    .question-text {
        font-size: 1.1em;
        padding: 16px;
    }
    
    .digit-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ===== Кнопка Проверить ===== */
.answer-input, .choice-buttons, .digit-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.answer-input {
    flex-direction: column;
}

.answer-input button, 
.choice-buttons button, 
.digit-buttons button,
#answerArea > button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    min-width: 140px;
}

#answerArea > button {
    display: block;
    margin: 20px auto 0;
}

.answer-input button:hover, 
.choice-buttons button:hover, 
.digit-buttons button:hover,
#answerArea > button:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Кнопки выбора (ВЕРНО/НЕВЕРНО и т.д.) */
.choice-buttons button:first-child {
    background: #4caf50;
}

.choice-buttons button:first-child:hover {
    background: #43a047;
}

.choice-buttons button:last-child {
    background: #f44336;
}

.choice-buttons button:last-child:hover {
    background: #d32f2f;
}

/* Цифровые кнопки */
.digit-btn {
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    color: #1e293b;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    padding: 0;
    min-width: auto;
}

.digit-btn.selected {
    background: #ff6b35;
    color: white;
}

/* Поле ввода */
.answer-input input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: 0.2s;
    text-align: center;
}

.answer-input input:focus {
    border-color: #ff6b35;
}

.reset-stats-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    margin-left: auto;
}

.reset-stats-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.trainer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trainer-actions {
    flex-shrink: 0;
}

.trainer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .trainer-header {
        flex-direction: column;
        align-items: stretch;
    }
    .trainer-left {
        justify-content: space-between;
    }
    .trainer-actions {
        text-align: center;
    }
}

/* ===== кнопка просмотра ошибок ===== */
.show-errors-btn {
    background: #673ab7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.show-errors-btn:hover {
    background: #5e35b1;
    transform: translateY(-2px);
}

/* Модальное окно для ошибок */
.errors-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.errors-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.errors-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f44336;
}

.errors-modal-header h3 {
    color: #c62828;
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.error-item-modal {
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

.error-question {
    font-weight: bold;
    margin-bottom: 8px;
    color: #c62828;
}

.error-correct {
    color: #2e7d32;
    font-size: 14px;
    margin-top: 6px;
}

/* Стили для режима обучения */
.theory-header-small {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.back-to-list-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.back-to-list-btn:hover {
    background: #cbd5e1;
}

.theory-list h2 {
    margin-bottom: 20px;
    color: #1e293b;
}

.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.theory-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.theory-card:hover {
    transform: translateY(-3px);
    border-color: #ff6b35;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.theory-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1e293b;
}

.theory-card p {
    font-size: 13px;
    color: #64748b;
}

.theory-body {
    line-height: 1.7;
    color: #334155;
}

.theory-body h3 {
    color: #1e293b;
    margin: 20px 0 12px;
    font-size: 1.2em;
}

.theory-body p {
    margin-bottom: 12px;
}

.theory-body ul, .theory-body ol {
    margin: 10px 0 10px 25px;
}

.theory-body li {
    margin: 4px 0;
}

.theory-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.theory-body th, .theory-body td {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

.theory-body th {
    background: #f1f5f9;
}

/* Стили для выделения в теории */
.theory-highlight-yellow {
    background-color: #fff9c4;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-green {
    background-color: #c8e6c9;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-pink {
    background-color: #f8bbd0;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-orange {
    background-color: #ffe0b2;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-blue {
    background-color: #b3e5fc;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-purple {
    background-color: #e1bee7;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-beige {
    background-color: #ffecb3;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-red {
    background-color: #ffcdd2;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-error {
    background-color: #ffcdd2;
    text-decoration: line-through;
    padding: 2px 4px;
    border-radius: 4px;
}

.theory-highlight-correct {
    background-color: #c8e6c9;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Стили для примеров заданий */
.examples-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.examples-section h3 {
    font-size: 1.2em;
    color: #1e293b;
    margin-bottom: 16px;
}

.examples-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

.examples-loading, .examples-empty {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

.example-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.example-question {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.example-num {
    font-weight: bold;
    color: #ff6b35;
    min-width: 30px;
}

.example-text {
    flex: 1;
    line-height: 1.5;
}

.example-meaning {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px 0;
    font-style: italic;
    color: #1565c0;
}

.example-answer-wrapper {
    margin-top: 12px;
}

.example-answer-btn {
    background: #e2e8f0;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
}

.example-answer-btn:hover {
    background: #cbd5e1;
}

.example-answer {
    margin-top: 12px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
}

.answer-correct {
    color: #2e7d32;
    font-weight: 500;
    margin-bottom: 8px;
}

.answer-explanation {
    color: #555;
    font-size: 13px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #ddd;
}

.examples-footer {
    margin-top: 20px;
    text-align: center;
}

.solve-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.solve-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Кнопка "Все темы" ярче */
.back-to-list-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.back-to-list-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

.highlight-blank {
    background: #fff9c4;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px dashed #ff6b35;
    font-weight: bold;
}

.highlight-word {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.highlight-error {
    background: #ffcdd2;
    text-decoration: wavy line-through red;
    padding: 2px 4px;
    border-radius: 4px;
}

.highlight-particle {
    background: #e1bee7;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.highlight-hyphen {
    background: #b3e5fc;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

/* ===== Единый стиль для всех полей ввода ===== */
.input-wrapper {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.elegant-input {
    width: 100%;
    max-width: 400px;
    padding: 16px 24px;
    font-size: 1.3em;
    font-family: 'Inter', monospace;
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    outline: none;
    transition: all 0.3s ease;
    color: #1e293b;
    font-weight: 500;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.elegant-input:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255,107,53,0.2), 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.elegant-input::placeholder {
    color: #94a3b8;
    font-size: 0.9em;
    letter-spacing: normal;
}

.submit-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 60px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

.submit-btn:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,107,53,0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* Поле ввода для букв (маленькое, но центрированное) */
.letter-input {
    max-width: 120px;
    padding: 16px 20px;
    font-size: 1.8em;
    text-align: center;
    letter-spacing: normal;
}

/* Контейнер для группы кнопок выбора */
.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.choice-buttons button {
    padding: 14px 32px;
    font-size: 1.1em;
    border-radius: 60px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.choice-buttons button:first-child {
    background: #4caf50;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.choice-buttons button:first-child:hover {
    background: #43a047;
    transform: translateY(-2px);
}

.choice-buttons button:last-child {
    background: #f44336;
    box-shadow: 0 4px 12px rgba(244,67,54,0.3);
}

.choice-buttons button:last-child:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* Стили для ответов в заданиях с выбором цифр */
.digit-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.digit-btn {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 20px;
    font-size: 1.5em;
    font-weight: bold;
    padding: 0;
    min-width: auto;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.digit-btn:hover {
    transform: translateY(-3px);
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.digit-btn.selected {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

/* Инструкция */
.instruction {
    font-size: 1.1em;
    margin: 20px 0 10px;
    color: #475569;
    font-weight: 500;
    text-align: center;
}

/* Контейнер для ответа в заданиях типа ending, vowel и т.д. */
.answer-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

/* Стили для подсказки типа вопроса в задании 15 (Н/НН предложения) */
.nnn2-question-hint {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.nnn2-question-n {
    background: #E8F5E9;
    border-left: 3px solid #4CAF50;
    color: #2E7D32;
}

.nnn2-question-nn {
    background: #FFF3E0;
    border-left: 3px solid #FF9800;
    color: #EF6C00;
}

/* Стили для цифровых кнопок - обычное состояние */
.digit-btn {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 20px;
    font-size: 1.5em;
    font-weight: bold;
    padding: 0;
    min-width: auto;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.digit-btn:hover {
    transform: translateY(-3px);
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Стили для ВЫБРАННОЙ кнопки - оранжевый фон */
.digit-btn.selected {
    background: #ff6b35 !important;
    color: white !important;
    border-color: #ff6b35 !important;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3) !important;
    transform: translateY(-2px);
}

/* Стили для подсказки типа вопроса в задании 15 (Н/НН предложения) */
.nnn2-question-hint {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.nnn2-question-n {
    background: #E8F5E9;
    border-left: 3px solid #4CAF50;
    color: #2E7D32;
}

.nnn2-question-nn {
    background: #FFF3E0;
    border-left: 3px solid #FF9800;
    color: #EF6C00;
}

/* Стили для выделения цветом в заданиях с цифрами */
.digits-highlightable-container {
    line-height: 1.8;
}

.digit-highlightable {
    cursor: pointer;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    transition: background 0.2s;
    background-color: #fff3e6;
    font-weight: bold;
    color: #ff6b35;
    margin: 0 2px;
}

.digit-highlightable:hover {
    transform: scale(1.02);
}

.digits-highlight-yellow {
    background-color: #fff9c4 !important;
    color: #1e293b !important;
}

.digits-highlight-green {
    background-color: #c8e6c9 !important;
    color: #1e293b !important;
}

.digits-highlight-pink {
    background-color: #f8bbd0 !important;
    color: #1e293b !important;
}

.digits-marker-btn {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
}

.digits-marker-btn:hover {
    transform: scale(1.1);
}

.digits-marker-btn.active {
    border: 3px solid #333;
    transform: scale(1.1);
}

/* Стили для выделения цветом в заданиях с цифрами */
.digits-highlightable-container {
    line-height: 1.8;
    font-size: 1.1em;
}

.word-highlightable {
    cursor: pointer;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.word-highlightable:hover {
    background-color: #e2e8f0;
    transform: scale(1.02);
}

.digits-highlight-yellow {
    background-color: #fff9c4 !important;
}

.digits-highlight-green {
    background-color: #c8e6c9 !important;
}

.digits-highlight-pink {
    background-color: #f8bbd0 !important;
}

.digit-number-marker {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    background-color: #fff3e6;
    font-weight: bold;
    color: #ff6b35;
    margin: 0 2px;
}

.digits-marker-btn {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
}

.digits-marker-btn:hover {
    transform: scale(1.1);
}

.digits-marker-btn.active {
    border: 3px solid #333;
    transform: scale(1.1);
}

/* Стили для выделения цветом (как в задании 21) */
.prav-highlightable-container {
    line-height: 1.8;
    font-size: 1.1em;
}

.prav-highlightable {
    cursor: pointer;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.prav-highlightable:hover {
    background-color: #e2e8f0;
    transform: scale(1.02);
}

.prav-highlight-yellow {
    background-color: #fff9c4 !important;
}

.prav-highlight-green {
    background-color: #c8e6c9 !important;
}

.prav-highlight-pink {
    background-color: #f8bbd0 !important;
}

.prav-digit-marker {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    background-color: #fff3e6;
    font-weight: bold;
    color: #ff6b35;
    margin: 0 2px;
}

.prav-marker-btn {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
}

.prav-marker-btn:hover {
    transform: scale(1.1);
}

.prav-marker-btn.active {
    border: 3px solid #333;
    transform: scale(1.1);
}

/* Стили для задания 16 (odn) */
.odn-highlightable-container {
    line-height: 1.8;
    font-size: 1.1em;
}

.odn-highlightable {
    cursor: pointer;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.odn-highlightable:hover {
    background-color: #e2e8f0;
    transform: scale(1.02);
}

.odn-highlight-yellow {
    background-color: #fff9c4 !important;
}

.odn-highlight-green {
    background-color: #c8e6c9 !important;
}

.odn-highlight-pink {
    background-color: #f8bbd0 !important;
}

.odn-marker-btn {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
}

.odn-marker-btn:hover {
    transform: scale(1.1);
}

.odn-marker-btn.active {
    border: 3px solid #333;
    transform: scale(1.1);
}

.odn-answer-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.odn-answer-btn:active {
    transform: translateY(0);
}