:root {
    --primary-bg: #F8F5F0;
    --primary-color: #2D3436;
    --secondary-color: #636E72;
    --accent-color: #00B894;
    --accent-dark: #00A085;
    --card-bg: #FFFFFF;
    --text-light: #757575;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-medium: 16px;
    --radius-large: 24px;
    --transition: 0.3s ease;
    /* Современный чёрный контур для раздела Профиль */
    --profile-contour: 1px solid rgba(0, 0, 0, 0.12);
    --profile-contour-strong: 1px solid rgba(0, 0, 0, 0.18);
}

/* Экран загрузки приложения */
.app-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-loading-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--primary-bg);
    color: var(--primary-color);
}

#app {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    /* Отступ сверху: safe-area (вырез/островок) + запас, чтобы сердца и контент не уходили под системную панель */
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    background: #F7F2E9;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

#status-bar {
    display: none;
}

#content {
    position: relative;
    height: calc(100% - 84px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: #F7F2E9;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section.active {
    display: block;
}

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

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--primary-color);
    text-align: center;
}

/* Надпись ЛИГА ближе к таймеру и баннеру текущей лиги */
#section-league .section-title {
    margin-top: 0;
    margin-bottom: -6px !important;
}
#section-league .league-countdown {
    margin-top: 0;
    margin-bottom: 4px;
}

/* Лента уроков (Duolingo-стиль): контейнер для скролла — заполняет весь раздел сверху */
.lesson-path-scroll-wrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #C9940E rgba(255,255,255,0.3);
}

.lesson-path-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.lesson-path-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.lesson-path-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #C9940E;
    border-radius: 3px;
}

.lesson-path-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #A67C00;
}

/* Внутренний скролл-контейнер с фоном дороги — фон движется вместе с уроками */
.learning-scroll-container {
    position: relative;
    width: 100%;
    min-height: 3000px;
    padding: 70px 0 40px;
    background-image: url('assets_optimized/learning.webp');
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-attachment: scroll;
    background-position: top center;
}

/* Кнопка-кружок урока на тропинке */
.lesson-path-btn {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.9);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    padding: 0;
}

.lesson-path-btn:disabled {
    cursor: not-allowed;
}

/* Пройденный урок — золотой/активный */
.lesson-path-btn.lesson-path-done {
    background: transparent;
    border-color: transparent;
    transform: translateX(-50%) scale(1.05);
}

.lesson-path-btn.lesson-path-done:hover:not(:disabled) {
    transform: translateX(-50%) scale(1.10);
    box-shadow: 0 6px 16px rgba(244,166,35,0.4);
}

.lesson-path-btn.lesson-path-done .lesson-path-done-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Текущий урок — в цвет подсветки выбранного языка (золотисто-янтарный) */
.lesson-path-btn.lesson-path-current {
    background: transparent;
    border-color: transparent;
    transform: translateX(-50%) scale(1.26);
    animation: lesson-pulse 1.5s ease-in-out infinite;
}

/* Прозрачная обводка с отступом от фото (не касается картинки) */
.lesson-path-btn.lesson-path-current::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 111%;
    height: 111%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: lesson-ring-breathe 2s ease-in-out infinite;
}

.lesson-path-btn.lesson-path-current .lesson-path-current-icon {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.lesson-path-btn.lesson-path-current:hover:not(:disabled) {
    transform: translateX(-50%) scale(1.32);
    box-shadow: 0 8px 20px rgba(201, 148, 14, 0.5);
}

.lesson-path-btn.lesson-path-current:active:not(:disabled) {
    transform: translateX(-50%) scale(1.35);
}

@keyframes lesson-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(201, 148, 14, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(201, 148, 14, 0.7); }
}

@keyframes lesson-ring-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* Заблокированный урок */
.lesson-path-btn.lesson-path-locked {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    border-color: rgba(255,255,255,0.6);
    opacity: 0.85;
}

/* Кнопка завершения урока */
.complete-lesson-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.complete-lesson-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 184, 148, 0.3);
}

.complete-lesson-btn:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Контейнер для домашних заданий */
.homeworks-container {
    margin-bottom: 24px;
}

.homework-card {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-color);
}

.homework-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #2D3436;
}

.homework-info {
    flex: 1;
}

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

.homework-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* Прогресс-бар уровня (модальное окно уровня) */
.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #42A5F5 0%, #2196F3 50%, #1976D2 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Оверлей загрузки урока: поверх раздела Обучение, фон замирает, только окно loadingscreen.png */
.lesson-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 20px;
    box-sizing: border-box;
}

.lesson-loading-overlay .lesson-loading-window {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Высота обёртки = картинка + gap 16px + часы 111px, чтобы loadingscreen.png не сдвинулся при центрировании */
.lesson-loading-overlay .lesson-loading-image-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: calc(16px + 111px);
}

.lesson-loading-overlay .ai-loading-image {
    width: auto;
    max-width: 75%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    border-radius: 16px;
    margin-left: auto;
    margin-right: auto;
}

.lesson-loading-overlay .lesson-loading-clock {
    position: absolute;
    bottom: calc(16px + 111px + 54px);
    left: calc(50% - 55px);
    transform: translateX(-50%);
    width: 111px;
    height: 111px;
    object-fit: contain;
    animation: lesson-loading-clock-spin 2s linear infinite;
    z-index: 1;
}

@keyframes lesson-loading-clock-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* СЕКЦИЯ ОБУЧЕНИЕ — бесконечная лента (Duolingo-стиль) */
#section-obuchenie.section.active,
#section-obuchenie {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: -16px -16px 0 -16px;
    width: calc(100% + 32px);
    position: relative;
    overflow: hidden;
}

/* Если фото не найдено, используем градиент */


.learning-custom-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 20px 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.learning-header-spacer {
    flex: 1;
}

.learning-custom-header .learning-gem-counter {
    flex: 1;
    justify-content: flex-end;
}

/* Переключатель языка в обучении */
.language-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Чтобы язык и гемы были по краям */
    padding: 0 15px;
    width: 100%;
    z-index: 10;
}

.learning-language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.learning-language-switcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.learning-language-flag {
    width: 24px;
    height: 18px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
}

.learning-language-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
}

.learning-language-switcher i {
    font-size: 12px;
    color: var(--text-light);
}

.learning-gem-counter {
    padding: 5px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.learning-gem-counter .gem-icon {
    width: 25.97px;
    height: 25.97px;
    object-fit: contain;
}

.learning-gem-counter span {
    color: #039BE5;
    -webkit-text-stroke: 1px white;
    text-stroke: 1px white;
    paint-order: stroke fill;
    display: inline-block;
    min-width: 1.2em;
    text-align: right;
}

/* Анимация пополнения гемов */
.learning-gem-counter.gem-counter-animate {
    animation: gem-counter-pulse 0.9s ease-out;
}
.learning-gem-counter.gem-counter-animate .gem-icon {
    animation: gem-icon-shine 0.9s ease-out;
}
@keyframes gem-counter-pulse {
    0% { transform: scale(1); filter: brightness(1); }
    15% { transform: scale(1.15); filter: brightness(1.4); }
    30% { transform: scale(1.08); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}
@keyframes gem-icon-shine {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    25% { filter: drop-shadow(0 0 8px rgba(3, 155, 229, 0.8)); }
    50% { filter: drop-shadow(0 0 4px rgba(3, 155, 229, 0.5)); }
}

.gem-float-badge {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translate(-8px, -50%);
    margin-right: 4px;
    padding: 4px 10px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #039BE5, #0288D1);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(3, 155, 229, 0.5);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.25s ease, transform 0.5s ease;
}
.gem-float-badge.gem-float-badge-visible {
    opacity: 1;
    transform: translate(-8px, -50%) scale(1.1);
}
.gem-float-badge.gem-float-badge-out {
    opacity: 0;
    transform: translate(-8px, -80px) scale(0.9);
}

.learning-lives-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lives-hearts { 
    font-size: 12px; 
    letter-spacing: 2px; 
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.lives-hearts .heart-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.lives-hearts .heart-icon-empty {
    opacity: 0.3;
}
.lives-label { 
    font-size: 10px; 
    font-weight: 800; 
    text-transform: uppercase; 
    margin-top: -2px; 
}

/* ЭКРАН УРОКА — фон слоновой кости */
.lesson-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFF0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.lesson-header {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 20px 20px 8px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lesson-close-btn {
    background: none;
    border: none;
    color: #1a1a1a;
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: -12px;
}

.lesson-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.lesson-title {
    flex: 1;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
}

/* Прогресс-бар урока — цвет заполнения как у выбранного флага языка (#C9940E) */
.lesson-progress-bar-wrap {
    padding: 2px 20px 16px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.lesson-progress-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.lesson-progress-bar-fill {
    height: 100%;
    background: #C9940E;
    border-radius: 999px;
    transition: width 0.3s ease;
    width: 0%;
}

.lesson-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.exercise {
    display: none;
    padding: 24px 0;
    animation: slideIn 0.4s ease;
}

.exercise.active {
    display: block;
}

.question {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
    text-align: left;
}

/* Кликабельные слова в задании — по нажатию показывается перевод под словом */
.lesson-word,
.word-token {
    cursor: pointer;
    border-bottom: 1px dotted var(--accent-color, #00B894);
    padding: 0 1px;
    border-radius: 2px;
    transition: background 0.15s ease;
}
.lesson-word:hover,
.word-token:hover {
    background: rgba(0, 184, 148, 0.12);
}
.lesson-word:focus,
.word-token:focus {
    outline: 2px solid var(--accent-color, #00B894);
    outline-offset: 2px;
}

/* Окошко перевода под словом (размером с текст) */
.lesson-word-popover {
    display: none;
    position: fixed;
    z-index: 10000;
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1.3;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid rgba(0, 184, 148, 0.4);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    max-width: 90vw;
    white-space: nowrap;
    pointer-events: none;
}

/* Контекстная подсказка перевода (word popup): над словом, тёмный фон, анимация */
.translation-popup {
    font-size: 13px;
    line-height: 1.35;
    color: #fff;
    background: rgba(0, 0, 0, 0.85);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.translation-popup[aria-hidden="false"] {
    opacity: 1;
    transform: translateY(0);
}

/* Словарный вопрос: сверху слово на изучаемом языке, внизу 4 варианта перевода в прямоугольниках */
.vocabulary-word {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
    text-align: center;
    padding: 20px 16px;
    background: linear-gradient(180deg, rgba(255, 214, 107, 0.15) 0%, rgba(246, 169, 2, 0.08) 100%);
    border-radius: 12px;
    border: 2px solid rgba(201, 148, 14, 0.3);
}

.vocabulary-prompt {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    text-align: center;
}

/* Вопрос на перевод: «Переведите это слово» сверху */
.translate-prompt {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-align: center;
}

.options-rectangles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.options-rectangles .option {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.options {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
}

.option {
    padding: 18px 24px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

/* Выделение варианта при наведении — цвет флага (золотисто-янтарный) */
.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.25);
    border-color: #C9940E;
    background: linear-gradient(180deg, rgba(255, 214, 107, 0.2) 0%, rgba(246, 169, 2, 0.15) 100%);
}

.option.correct {
    background: #C8E6C9;
    border-color: #00B894;
    color: #2D3436;
}

.option.wrong {
    background: #FFCDD2;
    border-color: #FF7675;
    color: #2D3436;
}

.lesson-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lesson-footer-content {
    min-height: 50px;
}

/* Нижнее окно результата — во всю ширину, 25% высоты экрана */
.lesson-result-popup {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 25vh;
    min-height: 180px;
    padding: 20px 24px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    z-index: 100;
    animation: slideUpResult 0.3s ease;
}

.lesson-result-popup.result-correct {
    background: #00695C;
    color: #fff;
}

.lesson-result-popup.result-correct .lesson-result-title {
    color: #55EFC4;
}

.lesson-result-popup.result-correct .lesson-result-next-btn {
    background: #00B894;
    color: #fff;
    border-color: transparent;
}

.lesson-result-popup.result-correct .lesson-result-next-btn:hover {
    background: #00A085;
    color: #fff;
}

.lesson-result-popup.result-wrong {
    background: #8B0000;
    color: #fff;
}

.lesson-result-popup.result-wrong .lesson-result-title {
    color: #FF6B6B;
}

.lesson-result-popup.result-wrong .lesson-result-next-btn {
    background: #E74C3C;
    color: #fff;
    border-color: transparent;
}

.lesson-result-popup.result-wrong .lesson-result-next-btn:hover {
    background: #C0392B;
    color: #fff;
}

@keyframes slideUpResult {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lesson-result-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.lesson-result-title {
    font-weight: 800;
    font-size: 18px;
}

.lesson-result-answer {
    font-size: 15px;
    font-weight: 700;
}

.lesson-result-explanation {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.95;
    flex: 1;
    min-height: 0;
}

.lesson-result-next-btn {
    margin-top: auto;
    align-self: center;
}

.lesson-footer-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.check-exercise-btn {
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a1a1a;
    border: 1px solid #3d2314;
    padding: 14px 64px;
    min-width: 340px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.check-exercise-btn:disabled {
    background: #CCCCCC;
    border-color: transparent;
    cursor: not-allowed;
    transform: none;
}

.check-exercise-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

/* Выделение выбранного варианта (до проверки) */
.option.selected,
.gap-fill-option.selected {
    background: white !important;
    border-color: #C9940E;
    color: #A67C00;
    box-shadow: 0 0 0 2px rgba(201, 148, 14, 0.3);
}

.hint {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: 12px;
}

.hint i {
    margin-right: 8px;
    color: #FFD43B;
}

/* Кнопка «ДАЛЕЕ» в уроке — в цветах выделения флага (золотисто-янтарный) */
.next-exercise {
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a1a1a;
    border: 1px solid #3d2314;
    padding: 14px 64px;
    min-width: 340px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.next-exercise:disabled {
    background: #CCCCCC;
    border-color: transparent;
    cursor: not-allowed;
    transform: none;
}

.next-exercise:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

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

/* Библиотека секция */
.search-bar {
    background: white;
    border: 1px solid #4a3728;
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.lesson-cards {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.lesson-card {
    min-width: 160px;
    background: white;
    border-radius: var(--radius-medium);
    padding: 20px;
    box-shadow: var(--shadow-light);
}

.lesson-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.lesson-card .words {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 12px;
}

.progress-bar {
    height: 6px;
    background: #EDEDED;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
}

/* Чаты секция */
.chat-tabs {
    display: flex;
    background: var(--primary-bg);
    border-radius: var(--radius-medium);
    padding: 4px;
    margin-bottom: 24px;
}

.chat-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition);
}

.chat-tab.active {
    background: white;
    color: #A67C00;
    box-shadow: var(--shadow-light);
}

/* Анимация при нажатии: кнопка «Найти собеседника» */
.find-partner-btn {
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.find-partner-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}
.find-partner-btn img {
    pointer-events: none;
}

/* Анимация при нажатии: кнопка «Добавить друга» */
#add-friend-btn {
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
#add-friend-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}
#add-friend-btn img {
    pointer-events: none;
}

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

/* Чаты с друзьями: без карточек, разделитель между строками как в мессенджерах */
#people-chats .chat-list {
    gap: 0;
}
#people-chats .chat-item {
    background: transparent;
    border-radius: 0;
    padding: 14px 0 14px 0;
    margin: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color var(--transition);
}
#people-chats .chat-item:last-child {
    border-bottom: none;
}
#people-chats .chat-item:hover {
    transform: none;
    background-color: rgba(0, 0, 0, 0.04);
}

.chat-item {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: all var(--transition);
}

.chat-item:hover {
    transform: translateX(11px);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.chat-avatar img.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-last-message {
    color: var(--text-light);
    font-size: 14px;
}

.chat-time {
    color: var(--text-light);
    font-size: 14px;
}

/* Лига секция */
.league-info {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: #ffffff;
    border-radius: 24px;
    padding: 18px 18px 18px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 110px;
    box-shadow: var(--shadow-medium);
    position: relative;
    cursor: pointer;
}

/* Баннер текущей лиги — только обрезанная картинка в натуральном размере */
.league-info.league-info-banner {
    padding: 0;
    margin: 0 0 8px 0;
    min-height: 0;
    background: transparent !important;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    justify-content: center;
}
.league-banner-img {
    width: auto;
    max-width: 100%;
    max-height: 120px;
    height: auto;
    object-fit: contain;
    display: block;
    vertical-align: top;
    background: transparent !important;
}

.league-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.league-icon-emoji {
    font-size: 32px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
}

.league-icon-emoji img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.league-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.league-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 6px;
}

.league-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.league-text h3 {
    display: none; /* устаревший подзаголовок скрыт */
}

.league-text h2 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

.league-banner-arrow {
    font-size: 14px;
    opacity: 0.9;
}

.league-info:hover .league-banner-arrow {
    transform: translateX(2px);
    transition: transform 0.15s ease;
}

.league-countdown {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 10px;
    margin-top: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #2D3436);
    opacity: 0.95;
}
.league-countdown-clock {
    display: inline-flex;
    flex-shrink: 0;
}
.league-countdown-clock .league-clock-svg {
    display: block;
    color: inherit;
    width: 19.6px;
    height: 19.6px;
}
.league-countdown-clock .league-clock-face {
    fill: rgba(255,255,255,0.5);
}
.league-countdown-clock #league-clock-hand {
    transition: transform 0.3s ease-out;
}
.league-countdown-text {
    min-width: 0;
}

.leaderboard {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Раздел Лига: без фона и обводки у контейнера и строк, сдвиг влево */
#leaderboard-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
    margin-left: -20px;
}
#section-league .leaderboard-row {
    padding: 8px 16px;
    min-height: 52px;
}
#leaderboard-container .leaderboard-row,
#leaderboard-container .leaderboard-row:hover,
#leaderboard-container .leaderboard-row.zone-promote,
#leaderboard-container .leaderboard-row.zone-promote:hover,
#leaderboard-container .leaderboard-row.zone-demote,
#leaderboard-container .leaderboard-row.zone-demote:hover,
#leaderboard-container .leaderboard-row.gold,
#leaderboard-container .leaderboard-row.silver,
#leaderboard-container .leaderboard-row.bronze,
#leaderboard-container .leaderboard-row.user-row {
    background: none !important;
    border: none !important;
    border-left: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
#leaderboard-container .leaderboard-row:last-child {
    border-bottom: none !important;
}
#leaderboard-container .league-promotion-zone-divider,
#leaderboard-container .league-demotion-zone-divider {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 60px;
    transition: background 0.15s ease;
}

.leaderboard-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.leaderboard-row.zone-promote {
    border-left: 4px solid #10B981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, transparent 12%);
}

.leaderboard-row.zone-promote:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0.02) 12%);
}

.leaderboard-row.zone-demote {
    border-left: 4px solid #EF4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, transparent 12%);
}

.leaderboard-row.zone-demote:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(0, 0, 0, 0.02) 12%);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

/* Зона повышения: места 1–8 переходят в следующую лигу */
.league-promotion-zone-divider {
    padding: 16px 20px;
    margin: 7px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}
.league-promotion-zone-label-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.league-promotion-zone-label-wrap .league-promotion-zone-icon {
    height: 18px;
    width: auto;
    object-fit: contain;
}
.league-promotion-zone-label {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    color: #059669;
    text-transform: uppercase;
}
.league-promotion-zone-divider .league-promotion-zone-sub {
    font-size: 11px;
    color: #047857;
    font-weight: 700;
    opacity: 0.95;
}

/* Зона понижения: места 15–20 опускаются в лигу ниже (нет в бронзовой лиге) */
.league-demotion-zone-divider {
    padding: 16px 20px;
    margin: 7px 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.03) 100%);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.08);
}
.league-demotion-zone-label-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.league-demotion-zone-label-wrap .league-demotion-zone-icon {
    height: 18px;
    width: auto;
    object-fit: contain;
}
.league-demotion-zone-label {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    color: #DC2626;
    text-transform: uppercase;
}
.league-demotion-zone-divider .league-demotion-zone-sub {
    font-size: 11px;
    color: #B91C1C;
    font-weight: 700;
    opacity: 0.95;
}

.rank {
    width: 40px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    color: #3d2314;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rank-img {
    width: 72.675%;   /* ещё −5% */
    height: auto;
    max-height: 25.84px;
    object-fit: contain;
    margin-left: -10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

/* Аватар-картинка (base64) не должна вылезать из кружка: ограничиваем размер и обрезаем */
.user-avatar img.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Тёмно-коричневая обводка для всех фото участников в разделе Лига */
#section-league .user-avatar {
    border: 2px solid #3d2314;
}
#section-league .user-avatar img.avatar-img {
    border-radius: 50%;
}

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

.user-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-title {
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-score {
    font-weight: 700;
    font-size: 14px;
    color: #A67C00;
    margin-left: 8px;
    flex-shrink: 0;
}

.league-features {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow: visible;
}

/* Кнопки раздела Лига — только картинки, без карточек */
.league-feature-btn {
    flex: 1 0 30%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: visible;
}
.league-feature-btn img {
    max-width: 100%;
    max-height: 145px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* масштаб ~1.26 = предыдущий 1.27 − 1% */
    transform: scale(1.26);
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.league-feature-btn:hover img {
    opacity: 0.9;
}
.league-feature-btn:active img {
    opacity: 0.9;
    transform: scale(1.14); /* эффект нажатия — уменьшение ~10% */
}

.feature-icon {
    position: relative;
    z-index: 1;
    font-size: 96px; /* сильно крупнее — почти во всю карточку */
    line-height: 1;
    /* Объёмное "мобайл-игровое" эмодзи: блик + тень */
    text-shadow:
        0 -1px 0 rgba(255,255,255,0.25),
        0 2px 0 rgba(0,0,0,0.10),
        0 10px 18px rgba(0,0,0,0.22);
    filter: drop-shadow(0 10px 16px rgba(0,0,0,0.22));
}

.feature-name {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    color: #2D3436; /* тёмный текст на белом фоне */
    text-shadow: none;
    text-transform: uppercase;
}

/* ==================== ЧЕЛЛЕНДЖИ: ВКЛАДКИ (НА ДЕНЬ / НА НЕДЕЛЮ) ==================== */
.challenges-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.challenges-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #000000;
    background: #FFFFFF;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.challenges-tab.active {
    background: linear-gradient(to bottom, #FFD66B 0%, #F6A902 100%);
    border: 1px solid #000000;
    color: var(--primary-color);
    box-shadow: 0 10px 22px rgba(0, 184, 148, 0.25);
}

.challenges-tab:hover {
    transform: translateY(-1px);
}

/* ==================== МАРАФОН / КЛАНЫ: МОДАЛКИ ==================== */
.marathon-modal, .clan-modal {
    width: 90%;
    max-width: 420px;
    background: white;
    border-radius: var(--radius-large);
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.marathon-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.marathon-option-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 14px 14px;
    background: #FFFFFF;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all var(--transition);
}

.marathon-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
}

.marathon-option-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marathon-option-desc {
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.35;
}

.marathon-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.marathon-input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    outline: none;
    font-size: 14px;
}

.marathon-inline-actions {
    display: flex;
    gap: 10px;
}

.marathon-inline-actions .apply-btn {
    flex: 1;
}

.marathon-group-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 184, 148, 0.06);
    margin-bottom: 12px;
}

.marathon-group-code {
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.marathon-group-note {
    color: var(--text-light);
    font-size: 14px;
}

.clan-locked-hero {
    font-size: 56px;
    text-align: center;
    margin: 6px 0 12px;
    line-height: 1;
    text-shadow:
        0 -1px 0 rgba(255,255,255,0.22),
        0 2px 0 rgba(0,0,0,0.10),
        0 12px 22px rgba(0,0,0,0.20);
}

.clan-locked-title {
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.clan-locked-text {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 4px;
}

/* Профиль секция */
.language-selector {
    display: flex;
    align-items: center;
    gap: 18px;
    background: transparent;
    border-radius: 32px;
    padding: 14px 20px;
    margin: 0 auto 4px auto;
    width: fit-content;
}

.language-flag {
    width: 110px;
    height: 82px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 16px;
    border: 2px solid #f0f0f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    mix-blend-mode: multiply;
}

.language-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #3d2817;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 26px;
    line-height: 1;
    text-align: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    margin-top: 24px;
    flex-shrink: 0;
}

.language-circle:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.language-circle:active {
    transform: scale(0.95);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Прогресс-бар профиля */
.profile-progress {
    margin-bottom: 12px;
    padding: 0 10px;
}

.profile-progress-bar {
    height: 8px;
    background: #EDEDED;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.profile-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.profile-progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
}

/* Новая панель профиля */
.profile-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid #1a0f0a;
}

.profile-panel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-panel-info {
    flex: 1;
}

.profile-panel-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-panel-email {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
}

.profile-panel-date {
    color: var(--text-light);
    font-size: 14px;
}

/* Старый профиль - скрываем элементы */
.profile-main {
    display: none;
}

.stats {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 0;
}

.stat-card {
    flex: 1;
    background: white;
    border-radius: var(--radius-medium);
    padding: 14px 16px;
    text-align: center;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* Карточка стрика v2 (ударный режим) */
.streak-card-v2 {
    flex: 1;
    align-self: flex-start;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #F0EBE3;
    margin-bottom: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.streak-card-v2:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.streak-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.streak-background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
.streak-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 8px 12px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.streak-text-overlay {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin-left: 12px;
}
.streak-count-text {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.streak-label-text {
    font-size: 11px;
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-left: -8px;
}

/* Линия прогресса — современный стиль */
.streak-progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    margin-top: auto;
    margin-bottom: 20px;
    position: relative;
}
.streak-progress-line-fill {
    height: 100%;
    /* Ярко-зелёный прогресс для ударного режима */
    background: linear-gradient(90deg, #B2FF59 0%, #76FF03 40%, #00E676 80%, #00C853 100%);
    border-radius: 999px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.6), 0 0 8px rgba(0, 230, 118, 0.4);
}

/* Карточка уровня v2 (прогресс опыта) */
.level-card-v2 {
    flex: 1;
    align-self: flex-start;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #F0EBE3;
    margin-bottom: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.level-card-v2:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.level-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.level-background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
.level-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 8px 12px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.level-text-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin-left: 20px;
}
.level-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Индикатор владения языком (CEFR) */
.cefr-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #F0EBE3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cefr-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cefr-icon { font-size: 24px; background: #E3F2FD; padding: 6px; border-radius: 14px; }
.cefr-title { display: block; font-size: 16px; font-weight: 600; color: #4A4440; line-height: 1.2; }
.cefr-subtitle { font-size: 11px; color: #8B7E74; font-weight: 600; }
.cefr-progress-container { width: 100%; height: 8px; background: rgba(240, 235, 227, 0.8); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04); }
.cefr-bar-fill { height: 100%; background: linear-gradient(90deg, #5DADE2 0%, #3498db 40%, #2ecc71 100%); border-radius: 999px; width: 0%; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 0 12px rgba(46, 204, 113, 0.2); }
.cefr-footer-text { font-size: 11px; color: #8B7E74; font-weight: 700; margin-top: 6px; }

/* Линия прогресса XP — современный стиль */
.xp-progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(240, 235, 227, 0.8);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.level-card-v2 .xp-progress-bar-container {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    margin-top: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
    width: 100%;
}
.xp-progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #42A5F5 0%, #2196F3 50%, #1976D2 100%);
    border-radius: 999px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.35);
}
.level-card-v2 .xp-progress-line-fill {
    box-shadow: 0 0 14px rgba(33, 150, 243, 0.6), 0 0 8px rgba(33, 150, 243, 0.4);
}

/* Компактные бейджи (streak / level) */
.streak-badge,
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    height: 28px;
    line-height: 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Иконки/эмодзи внутри бейджей */
.streak-badge i,
.level-badge i,
.streak-badge .badge-icon,
.level-badge .badge-icon,
.streak-badge svg,
.level-badge svg {
    font-size: 14px;
    line-height: 1;
}

/* Premium карта — золотой градиент */
.premium-card {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 6px;
    margin-top: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    min-height: 90px;
}
.premium-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.premium-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.premium-background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}
.premium-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px 6px 12px 12px;
}

.store-card {
    background: white;
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.store-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Магазин — без зелёной обводки при наведении/нажатии/фокусе */
.store-card-gemshop:hover,
.store-card-gemshop:active,
.store-card-gemshop:focus {
    border-color: transparent;
    outline: none;
}
.store-card-gemshop:hover {
    box-shadow: var(--shadow-medium);
}
.store-card-gemshop:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.store-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.store-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.18), rgba(0, 184, 148, 0.06));
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.store-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.store-card-subtitle {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
}

.store-card-arrow {
    font-size: 14px;
    color: var(--text-light);
}

/* Магазин — shop2.png на весь блок */
.store-card-gemshop {
    padding: 0;
    overflow: hidden;
    position: relative;
    display: block;
}
.store-card-gemshop-img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    pointer-events: auto;
    vertical-align: middle;
}
.store-card-gemshop-buy {
    position: absolute;
    right: calc(8% - 18px);
    bottom: 8%;
    max-width: 58%;
    max-height: 72%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.store-card-gemshop-buy:hover {
    transform: scale(1.08);
    filter: brightness(1.12);
}
.store-card-gemshop-buy:active {
    transform: scale(0.95);
    filter: brightness(0.95);
}
.upgrade-btn {
    background: transparent;
    color: #1a1a1a;
    border: none;
    padding: 6px 10px;
    transform: translateX(11px) translateY(9px);
    border-radius: 0;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.upgrade-btn:hover {
    background: transparent;
    color: #1a1a1a;
    transform: translateX(11px) translateY(8px);
    box-shadow: none;
}

.upgrade-btn:active {
    transform: translateX(11px) translateY(9px) scale(0.95);
    box-shadow: none;
}

.upgrade-btn i {
    font-size: 0.85em;
    color: #1a1a1a;
    transition: transform 0.2s ease;
}

.upgrade-btn:hover i {
    transform: translateX(1px);
}

.upgrade-btn-img {
    display: block;
    max-height: 32px;
    height: auto;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* Панель друзей */
.friends-panel {
    margin-bottom: 12px;
}

.friends-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.friends-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.friend-card {
    min-width: 100px;
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.friend-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.friend-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.friend-avatar img.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.friend-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

.friend-status {
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.friend-status.online {
    color: #22c55e;
}

.friend-status.online .friend-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.friend-status.offline {
    color: #9ca3af;
}

.friend-status.offline .friend-status-cross {
    font-size: 14px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Панели Достижения и Настройки */
.achievements-settings-panel {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.achievements-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.achievements-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--primary-color);
}

.achievements-card, .settings-card {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: var(--shadow-light);
    min-height: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievements-card:hover, .settings-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.achievements-card:active, .settings-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.achievements-card {
    padding: 8px 12px;
}

.settings-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--primary-color);
}

.settings-card {
    padding: 8px 10px;
}

/* Фон раздела Профиль */
#section-profile {
    background: #F7F2E9;
    overflow-x: hidden;
}

/* Современный чёрный контур — все кнопки и разделы в Профиле */
#section-profile .language-selector {
    border: none;
    box-shadow: none;
}
#section-profile .language-flag {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #F7F2E9;
}
#section-profile .cefr-card,
#section-profile .profile-panel,
#section-profile .streak-card-v2,
#section-profile .level-card-v2,
#section-profile .store-card,
#section-profile .friends-panel,
#section-profile .achievements-card,
#section-profile .settings-card {
    border: var(--profile-contour);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
#section-profile .profile-panel {
    border: 1px solid #1a0f0a;
}
#section-profile .achievements-card,
#section-profile .settings-card {
    border: 1px solid #1a0f0a;
}
#section-profile .premium-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-height: 98px;
    margin-left: 7px;
    margin-right: 7px;
    width: calc(100% - 14px);
    box-sizing: border-box;
}
#section-profile .premium-card .premium-image-wrapper {
    min-height: 98px;
}
#section-profile .premium-card .premium-background-image {
    object-fit: cover;
}
#section-profile .premium-card .upgrade-btn {
    background: transparent !important;
    color: #1a1a1a !important;
    border: none !important;
    font-weight: 600 !important;
    transform: translateX(5px) translateY(9px) scale(1.0612) !important;
    padding: 6px 10px;
}
#section-profile .premium-card .upgrade-btn:hover {
    background: transparent !important;
    color: #1a1a1a !important;
    transform: translateX(5px) translateY(8px) scale(1.0612) !important;
}
#section-profile .premium-card .upgrade-btn:active {
    transform: translateX(5px) translateY(9px) scale(1.008) !important;
}
#section-profile .premium-card .upgrade-btn-img {
    max-height: 32px;
}
#section-profile .premium-card .upgrade-btn i {
    color: #1a1a1a !important;
}
#section-profile .friends-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 20px;
    padding: 16px;
}
#section-profile .friends-title {
    transform: translateX(-12px);
}
#section-profile .friends-id-line {
    margin: 8px 0 12px -12px;
}
#section-profile .friend-card {
    border: 1px solid #1a0f0a;
}
#section-profile .friends-grid {
    margin-left: -11px;
}
#section-profile .calendar-icon-box,
#section-profile .coins-icon-box {
    border: var(--profile-contour);
}
#section-profile .medal {
    border: var(--profile-contour);
}
#section-profile .cefr-icon {
    border: var(--profile-contour);
}
#section-profile .profile-panel-avatar {
    border: var(--profile-contour);
}
#section-profile .store-card-icon {
    border: var(--profile-contour);
}
#section-profile .store-card:hover {
    border-color: var(--accent-color);
}
#section-profile .store-card.store-card-gemshop-buy {
    right: calc(8% - 26px);
}
#section-profile .store-card.store-card-gemshop-buy:hover {
    transform: scale(1.08);
}
#section-profile .store-card.store-card-gemshop-buy:active {
    transform: scale(0.95);
}
#section-profile .store-card.store-card-gemshop:hover,
#section-profile .store-card.store-card-gemshop:active,
#section-profile .store-card.store-card-gemshop:focus {
    border-color: transparent !important;
    outline: none;
}
#section-profile .streak-progress-bar-container,
#section-profile .xp-progress-bar-container,
#section-profile .cefr-progress-container {
    border: var(--profile-contour);
}


/* Достижения - сетка медалек (устаревшая, оставлена для совместимости) */
.medals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: auto;
}

.medal {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0 auto;
}

/* Достижения в профиле — 3 столбца × 2 ряда, фото без обрезки, фиксированный размер */
.profile-achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    margin-top: 6px;
}
.profile-achievement-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    background: #f5f5f5;
    transition: filter 0.2s ease;
}
.profile-achievement-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.profile-achievement-item.unlocked img {
    filter: none;
}
.profile-achievement-item.locked img {
    filter: grayscale(0.85) brightness(0.75);
}

/* Настройки - список опций */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    margin: 0 -4px;
    border-radius: 12px;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.settings-item:last-child {
    border-bottom: none;
    color: #FF7675;
}

.settings-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.settings-item:active {
    background: rgba(0, 0, 0, 0.08);
}

.settings-item span {
    font-size: 14px;
    font-weight: 700;
}

.settings-item i {
    font-size: 14px;
    color: var(--text-light);
}

/* Кнопка начала урока */
.start-lesson-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius-large);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px auto 0;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

.start-lesson-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 184, 148, 0.4);
}

/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.language-modal, .streak-modal, .level-modal, .premium-modal, .shop-modal, .achievements-modal, .all-parrots-modal, .auth-modal, .challenges-modal, .world-stats-modal {
    width: 340px;
    background: white;
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* Окно стрика — фон как у раздела «Профиль» */
.streak-modal {
    background: #F7F2E9;
    overflow: visible;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Небольшое окно выбора лиг */
.league-selector-card {
    width: 320px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    padding: 16px 16px 18px;
    animation: slideUp 0.25s ease;
}

.league-selector-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.league-selector-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.league-pill {
    min-width: 72px;
    padding: 10px 8px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.league-pill-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 2px;
}

.league-pill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.league-pill.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #2D3436;
    box-shadow: 0 10px 24px rgba(255, 215, 0, 0.25);
}

.league-pill.active .league-pill-icon {
    background: rgba(255, 255, 255, 0.25);
}

.league-pill.locked {
    background: #F3F3F4;
    color: #9E9E9E;
}

.league-pill.locked .league-pill-icon {
    background: #E0E0E0;
}

/* ==================== МАГАЗИН (МОДАЛКА) ==================== */
.shop-modal {
    overflow: visible;
}

.shop-modal-header {
    background: #FFFFFF;
    color: #2D3436;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    overflow: visible;
    border-top-left-radius: var(--radius-large);
    border-top-right-radius: var(--radius-large);
}

.shop-modal-header .shop-close-btn {
    flex-shrink: 0;
}

.shop-modal-title-big {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-align: center;
    margin: 0;
}

.shop-header-gems {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    order: 2;
}

.shop-header-diamond {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shop-header-gems-count {
    font-weight: 700;
    font-size: 14px;
    color: #2D3436;
}

.shop-close-btn {
    background: none;
    border: none;
    color: #2D3436;
    font-size: 14px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.shop-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.shop-modal-content {
    padding: 16px;
}

.shop-chests-section {
    background: #FFFFF0;
    border-radius: 16px;
    padding: 10px 20px 10px;
    border: 1px solid #3d2817;
}

.shop-chests-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light, #2D3436);
    margin: 0 0 16px 0;
    text-align: center;
}

.shop-chests-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.shop-chest-cell {
    width: 130px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-chest-cell + .shop-chest-cell {
    margin-left: 4px;
}

.shop-chest-cell-2 {
    margin-left: calc(4px - 38px) !important;
}

.shop-chest-cell-3 {
    margin-left: calc(4px - 38px) !important;
}

.shop-chest-wrap {
    position: relative;
    display: block;
    width: 130px;
    height: 130px;
}

.shop-chest-wrap .shop-chest-img {
    display: block;
}

.shop-chest-overlay {
    position: absolute;
    top: calc(50% + 20px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55.125%;
    height: 55.125%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.shop-chest-overlay:active {
    transform: translate(-50%, -50%) scale(1.15);
}

.shop-chest-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.shop-boosters-section {
    margin-top: 16px;
    background: #FFFFF0;
    border-radius: 16px;
    padding: 10px 20px 10px;
    border: 1px solid #3d2817;
}

.shop-boosters-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light, #2D3436);
    margin: 0 0 16px 0;
    text-align: center;
}

.shop-boosters-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shop-booster-img {
    width: 148px;
    height: 148px;
    object-fit: contain;
}

.shop-booster-wrap {
    position: relative;
    display: block;
    width: 148px;
    height: 148px;
}

.shop-booster-wrap .shop-booster-img {
    display: block;
}

.shop-booster-overlay {
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95.31%;
    height: 95.31%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.shop-booster-overlay:active {
    transform: translate(-50%, -50%) scale(1.15);
}

.shop-booster-wrap.shop-booster-xp,
.shop-booster-wrap.shop-booster-time {
    cursor: pointer;
}

.shop-chest-wrap.shop-chest-rare,
.shop-chest-wrap.shop-chest-epic,
.shop-chest-wrap.shop-chest-mythic {
    cursor: pointer;
}

/* ==================== МОЙ ИНВЕНТАРЬ (магазин) ==================== */
.shop-inventory-section {
    margin-top: 16px;
    background: #FFFFF0;
    border-radius: 16px;
    padding: 10px 20px 16px;
    border: 1px solid #3d2817;
}

.shop-inventory-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light, #2D3436);
    margin: 0 0 12px 0;
    text-align: center;
}

.shop-inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.shop-inventory-card {
    width: calc(50% - 6px);
    min-width: 140px;
    max-width: 165px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(61, 40, 23, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.shop-inventory-card-inner {
    padding: 10px 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.shop-inventory-card-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.shop-inventory-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #2D3436;
    text-align: center;
    line-height: 1.25;
}

.shop-inventory-count {
    display: inline-block;
    color: #c9940e;
    font-weight: 700;
}

.shop-inventory-apply-btn {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #2D3436;
    background: #C9940E;
    border: 1px solid #8b6914;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(201, 148, 14, 0.35);
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.shop-inventory-apply-btn:hover {
    background: #d4a010;
    box-shadow: 0 3px 10px rgba(201, 148, 14, 0.45);
}

.shop-inventory-apply-btn:active {
    transform: scale(0.98);
}

/* ==================== МОДАЛЬНОЕ ОКНО ОТКРЫТИЯ РЕДКОГО СУНДУКА ==================== */
.rare-chest-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
}

.rare-chest-modal.active {
    display: flex;
}

.rare-chest-modal-card {
    background: linear-gradient(180deg, #fef9e7 0%, #f5e6c8 100%);
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 2px solid #c9940e;
    text-align: center;
}

.rare-chest-phase {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rare-chest-phase-chest .rare-chest-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.rare-chest-img-shake {
    animation: rare-chest-shake 0.5s ease-in-out infinite;
}

@keyframes rare-chest-shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    15% { transform: translateX(-4px) rotate(-2deg); }
    30% { transform: translateX(4px) rotate(2deg); }
    45% { transform: translateX(-3px) rotate(-1deg); }
    60% { transform: translateX(3px) rotate(1deg); }
    75% { transform: translateX(-2px) rotate(-0.5deg); }
}

.rare-chest-rewards-title {
    font-size: 18px;
    font-weight: 800;
    color: #2D3436;
    margin: 0 0 16px 0;
    letter-spacing: 0.03em;
}

.rare-chest-rewards-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rare-chest-reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(201, 148, 14, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(12px);
    animation: rare-chest-reward-appear 0.4s ease-out forwards;
}

.rare-chest-reward-item:nth-child(1) { animation-delay: 0.1s; }
.rare-chest-reward-item:nth-child(2) { animation-delay: 0.25s; }
.rare-chest-reward-item:nth-child(3) { animation-delay: 0.4s; }

@keyframes rare-chest-reward-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rare-chest-reward-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.rare-chest-reward-text {
    font-size: 15px;
    font-weight: 700;
    color: #2D3436;
}

.rare-chest-reward-value {
    color: #c9940e;
    margin-left: 4px;
}

.rare-chest-close-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #2D3436;
    background: linear-gradient(180deg, #f0d878 0%, #c9940e 100%);
    border: 2px solid #8b6914;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.35);
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.rare-chest-close-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(201, 148, 14, 0.45);
}

.rare-chest-close-btn:active {
    transform: scale(0.98);
}

/* ==================== МОДАЛЬНОЕ ОКНО ОТКРЫТИЯ ЭПИЧЕСКОГО СУНДУКА ==================== */
.epic-chest-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
}

.epic-chest-modal.active {
    display: flex;
}

.epic-chest-modal-card {
    background: linear-gradient(180deg, #e8e4f0 0%, #c4b8d8 100%);
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 0 30px #FFD700, 0 16px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid #7c6b9e;
    text-align: center;
}

.epic-chest-phase {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epic-chest-phase-chest .epic-chest-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.epic-chest-img-shake {
    animation: shake-hard 0.4s ease-in-out infinite;
}

@keyframes shake-hard {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    10% { transform: translateX(-10px) translateY(-2px) rotate(-5deg); }
    20% { transform: translateX(10px) translateY(2px) rotate(5deg); }
    30% { transform: translateX(-8px) translateY(2px) rotate(-4deg); }
    40% { transform: translateX(8px) translateY(-2px) rotate(4deg); }
    50% { transform: translateX(-6px) translateY(0) rotate(-3deg); }
    60% { transform: translateX(6px) translateY(0) rotate(3deg); }
    70% { transform: translateX(-4px) translateY(-1px) rotate(-2deg); }
    80% { transform: translateX(4px) translateY(1px) rotate(2deg); }
    90% { transform: translateX(-2px) translateY(0) rotate(-1deg); }
}

.epic-chest-rewards-title {
    font-size: 18px;
    font-weight: 800;
    color: #2D3436;
    margin: 0 0 16px 0;
    letter-spacing: 0.03em;
}

.epic-chest-rewards-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epic-chest-reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    border: 1px solid rgba(124, 107, 158, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(12px);
    animation: epic-chest-reward-appear 0.4s ease-out forwards;
}

.epic-chest-reward-item:nth-child(1) { animation-delay: 0.1s; }
.epic-chest-reward-item:nth-child(2) { animation-delay: 0.22s; }
.epic-chest-reward-item:nth-child(3) { animation-delay: 0.34s; }
.epic-chest-reward-item:nth-child(4) { animation-delay: 0.46s; }

@keyframes epic-chest-reward-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epic-chest-reward-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.epic-chest-reward-text {
    font-size: 15px;
    font-weight: 700;
    color: #2D3436;
}

.epic-chest-reward-value {
    color: #7c6b9e;
    margin-left: 4px;
}

.epic-chest-close-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #2D3436;
    background: linear-gradient(180deg, #b8a8d0 0%, #7c6b9e 100%);
    border: 2px solid #5a4a7a;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 107, 158, 0.4);
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.epic-chest-close-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(124, 107, 158, 0.5);
}

.epic-chest-close-btn:active {
    transform: scale(0.98);
}

/* ==================== МОДАЛЬНОЕ ОКНО ОТКРЫТИЯ МИФИЧЕСКОГО СУНДУКА ==================== */
.mythic-chest-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
}

.mythic-chest-modal.active {
    display: flex;
}

.mythic-chest-modal-card {
    position: relative;
    background: linear-gradient(180deg, #2d1b4e 0%, #1a0a2e 100%);
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 0 50px #A020F0, 0 20px 56px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(160, 32, 240, 0.3);
    border: 2px solid #A020F0;
    text-align: center;
    overflow: hidden;
}

.mythic-chest-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mythic-chest-confetti.active {
    opacity: 1;
}

.mythic-confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    opacity: 0.95;
    animation: mythic-confetti-fly 2s ease-out forwards;
}

@keyframes mythic-confetti-fly {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.95;
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 80px)) rotate(720deg);
        opacity: 0;
    }
}

.mythic-chest-phase {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.mythic-chest-phase-chest .mythic-chest-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.mythic-chest-img-shake {
    animation: shake-hard 0.4s ease-in-out infinite;
}

.mythic-chest-rewards-title {
    font-size: 18px;
    font-weight: 800;
    color: #f0e6ff;
    margin: 0 0 16px 0;
    letter-spacing: 0.03em;
}

.mythic-chest-rewards-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mythic-chest-reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(160, 32, 240, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(160, 32, 240, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(12px);
    animation: mythic-chest-reward-appear 0.45s ease-out forwards;
}

.mythic-chest-reward-item:nth-child(1) { animation-delay: 0.1s; }
.mythic-chest-reward-item:nth-child(2) { animation-delay: 0.2s; }
.mythic-chest-reward-item:nth-child(3) { animation-delay: 0.32s; }
.mythic-chest-reward-item:nth-child(4) { animation-delay: 0.44s; }
.mythic-chest-reward-item:nth-child(5) { animation-delay: 0.56s; }

@keyframes mythic-chest-reward-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mythic-chest-reward-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.mythic-chest-reward-text {
    font-size: 15px;
    font-weight: 700;
    color: #f0e6ff;
}

.mythic-chest-reward-value {
    color: #FFD700;
    margin-left: 4px;
}

.mythic-chest-close-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1a0a2e;
    background: linear-gradient(180deg, #c8a0f0 0%, #A020F0 100%);
    border: 2px solid #7c3aed;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(160, 32, 240, 0.5);
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.mythic-chest-close-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(160, 32, 240, 0.6);
}

.mythic-chest-close-btn:active {
    transform: scale(0.98);
}

/* ==================== ПОЛНОЭКРАННАЯ АНИМАЦИЯ XP BOOST (x2) ==================== */
.xp-boost-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.xp-boost-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.xp-boost-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.85) 0%, rgba(0, 150, 199, 0.9) 50%, rgba(88, 86, 214, 0.85) 100%);
    animation: xp-boost-backdrop-pulse 1.5s ease-in-out;
}

.xp-boost-content {
    position: relative;
    text-align: center;
    animation: xp-boost-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.xp-boost-badge {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    animation: xp-boost-glow 1.2s ease-in-out infinite alternate;
}

.xp-boost-multiplier {
    font-size: 72px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 200, 0.9), 0 0 60px rgba(255, 220, 100, 0.6), 0 4px 12px rgba(0, 0, 0, 0.25);
    line-height: 1;
    margin-bottom: 12px;
    animation: xp-boost-scale-pulse 0.8s ease-in-out 0.3s both;
}

.xp-boost-duration {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.xp-boost-sparkles {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 45%);
    pointer-events: none;
    animation: xp-boost-sparkle 2s ease-in-out;
}

@keyframes xp-boost-backdrop-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

@keyframes xp-boost-pop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes xp-boost-glow {
    from { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6)); }
    to { filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.9)); }
}

@keyframes xp-boost-scale-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes xp-boost-sparkle {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ==================== ПОЛНОЭКРАННАЯ АНИМАЦИЯ TIME BOOST (жизни не тратятся) ==================== */
.time-boost-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.time-boost-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.time-boost-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(225, 95, 50, 0.88) 0%, rgba(241, 148, 50, 0.9) 40%, rgba(230, 126, 34, 0.88) 100%);
    animation: time-boost-backdrop-pulse 1.5s ease-in-out;
}

.time-boost-content {
    position: relative;
    text-align: center;
    animation: time-boost-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.time-boost-badge {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(0, 0, 0, 0.35);
    margin-bottom: 12px;
    animation: time-boost-glow 1.2s ease-in-out infinite alternate;
}

.time-boost-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(255, 200, 180, 0.9));
    animation: time-boost-heart-pulse 0.8s ease-in-out 0.3s both;
}

.time-boost-duration {
    font-size: 17px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.time-boost-sparkles {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
                radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.3) 0%, transparent 45%);
    pointer-events: none;
    animation: time-boost-sparkle 2s ease-in-out;
}

@keyframes time-boost-backdrop-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

@keyframes time-boost-pop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes time-boost-glow {
    from { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6)); }
    to { filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.9)); }
}

@keyframes time-boost-heart-pulse {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes time-boost-sparkle {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ==================== МОДАЛЬНЫЕ ОКНА ЛИГИ: ЧЕЛЛЕНДЖИ / СТАТИСТИКА МИРА ==================== */
.challenges-modal {
    background: #FFFFF0;
}

.challenges-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 4px;
    background: transparent;
}

.challenges-modal-header-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.challenges-modal .modal-content {
    padding-top: 8px;
    background: #FFFFF0;
}

.challenges-modal .modal-footer {
    background: #FFFFF0;
}

.challenges-modal .modal-footer .apply-btn {
    background: linear-gradient(to bottom, #FFD66B 0%, #F6A902 100%);
    color: #4B2C20;
    border: 2.5px solid #000000;
}

.challenges-modal .modal-footer .apply-btn:hover {
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

.challenges-subtitle,
.world-stats-subtitle {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 12px;
}

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

.challenge-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: var(--shadow-light);
}

.challenge-card-left {
    flex-shrink: 0;
}

.challenge-task-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.challenge-task-icon--book {
    width: 62px;
    height: 62px;
}

.challenge-task-icon--goal {
    width: 70px;
    height: 70px;
    margin-left: -4px;
}

.challenge-task-icon--goal.challenge-task-icon--goal-after-xp {
    margin-left: -8px;
}

.challenge-card-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.challenge-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    line-height: 1.2;
}

.challenge-progress-bar {
    height: 8px;
    background: #EDEDED;
    border-radius: 999px;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.challenge-card-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.challenge-reward-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.challenge-claim-btn {
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
    color: #1a1a1a;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.challenge-claim-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 215, 0, 0.35);
}

.challenge-claim-btn--disabled,
.challenge-claim-btn:disabled {
    background: #9E9E9E;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    cursor: not-allowed;
}

.challenge-claimed {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
}

/* В модалке статистики мира используем уже существующие карточки .stat-card, но без "кликабельного" поведения */
.world-stats {
    flex-wrap: wrap;
}

.world-stats .stat-card {
    flex: 1 1 46%;
    padding: 16px 14px;
}

.world-stats .stat-card:last-child {
    flex-basis: 100%;
}

.world-stats .stat-value {
    font-size: 14px;
    line-height: 1.15;
    word-break: break-word;
}

.world-stats .stat-card {
    cursor: default;
}

.world-stats .stat-card:hover {
    transform: none;
    box-shadow: var(--shadow-light);
}

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

.modal-header {
    background: var(--accent-color);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

.modal-content {
    padding: 20px;
    max-height: 420px;
    overflow-y: auto;
}

/* Auth modal */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.auth-tab {
    flex: 1;
    border: 2px solid #eee;
    background: #fafafa;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.auth-tab.active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, white);
    color: var(--primary-color);
}

.auth-field {
    display: block;
    margin-bottom: 12px;
}

.auth-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #eee;
    outline: none;
    font-size: 14px;
    transition: all var(--transition);
}

.auth-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.auth-error {
    background: #ffecec;
    border: 1px solid #ffbdbd;
    color: #b11a1a;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Модальное окно Профиль (фон слоновая кость) */
#profile-modal .profile-modal-card {
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #FFFFF0;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-top: 48px;
    background: #FFFFF0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 24px 24px 0 0;
}

.profile-modal-header-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 112px;
    height: 112px;
    object-fit: contain;
    pointer-events: none;
}

.profile-modal-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s;
}

.profile-modal-back:hover {
    background: rgba(0, 0, 0, 0.06);
}

.profile-modal-title {
    position: absolute;
    left: 0;
    right: 0;
    padding-left: 48px;
    padding-right: 48px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    pointer-events: none;
}

.profile-modal-body {
    padding: 24px 20px 20px;
}

.profile-modal-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    cursor: pointer;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 14px;
}

.profile-modal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7fdbda 0%, #5cb8b6 100%);
    color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.profile-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-modal-avatar-label {
    flex: 1;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.profile-modal-avatar-wrap .profile-modal-avatar-chevron {
    margin-left: auto;
    color: rgba(0, 0, 0, 0.5);
    font-size: 14px;
}

.profile-modal-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    gap: 12px;
    transition: background 0.2s;
}

.profile-modal-row:active {
    background: rgba(0, 0, 0, 0.05);
}

.profile-modal-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    flex-shrink: 0;
}

.profile-modal-value {
    flex: 1;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.85);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-modal-chevron {
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    flex-shrink: 0;
}

.profile-modal-inline-input {
    display: none;
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 15px;
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.profile-modal-inline-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.profile-modal-inline-input:focus {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.08);
}

.profile-modal-row.editing .profile-modal-value,
.profile-modal-row.editing .profile-modal-chevron {
    display: none;
}

.profile-modal-row.editing .profile-modal-inline-input {
    display: block;
}

.profile-modal-footer {
    padding: 24px 20px;
}

.profile-modal-logout {
    width: 100%;
    padding: 16px 24px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.profile-modal-logout:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.profile-modal-logout:active {
    transform: translateY(0);
}

/* Модальное окно профиля друга */
#friend-profile-modal .friend-profile-modal-card {
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #FFFFF0;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.friend-profile-modal-top {
    padding: 16px 20px 0;
    background: #FFFFF0;
    border-radius: 24px 24px 0 0;
}

.friend-profile-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s;
}

.friend-profile-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.friend-profile-modal-photo-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 20px 8px;
    margin-top: -72px;
    background: transparent;
}

.friend-profile-modal-nickname-wrap {
    display: flex;
    justify-content: center;
    padding: 0 20px 4px;
    background: #FFFFF0;
}

.friend-profile-modal-nickname {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

.friend-profile-modal-year-wrap {
    display: flex;
    justify-content: center;
    padding: 0 20px 16px;
    margin-top: -2px;
    background: #FFFFF0;
}

.friend-profile-modal-year {
    font-size: 15px;
    color: #333;
    text-align: center;
}

.friend-profile-modal-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.friend-profile-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-profile-modal-divider {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    margin: 0 20px;
}

.friend-profile-modal-level-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 20px 8px;
    background: #FFFFF0;
}

.friend-profile-modal-level {
    font-size: 14px;
    font-weight: 700;
    color: #c9a227;
    text-align: center;
}

.friend-profile-modal-league-wrap {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
    padding: 0 20px 16px;
    background: #FFFFF0;
}

.friend-profile-modal-league-label {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
}

.friend-profile-modal-league-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.friend-profile-modal-divider-below-league {
    margin-top: 0;
}

.friend-profile-modal-stats-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 20px 0;
    background: #FFFFF0;
}

.friend-profile-modal-stat {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.friend-profile-modal-stat-label {
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
}

.friend-profile-modal-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.friend-profile-modal-streak-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    margin-top: -10px;
    background: #FFFFF0;
}

.friend-profile-modal-streak-text {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}

.friend-profile-modal-write-wrap {
    display: flex;
    justify-content: center;
    padding: 0 20px 20px;
    padding-left: 23px;
    background: transparent;
}

.friend-profile-modal-write-wrap .friend-profile-modal-write-btn {
    max-width: 251px;
    width: 87%;
}

.friend-profile-modal-write-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: 2px solid #3E2723;
    border-radius: 9999px;
    color: #3E2723;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.friend-profile-modal-write-btn:hover {
    opacity: 0.85;
}

.friend-profile-modal-write-btn:active {
    transform: scale(0.98);
}

.language-section {
    margin-bottom: 30px;
}

.language-section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
    text-align: center;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 10px;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition);
}

.language-flag-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid transparent;
    margin-bottom: 8px;
    transition: all var(--transition);
}

/* Флаги языков РФ: крупный кроп — видно только полотнище, без полей и лишнего */
.language-section-rf .language-flag-circle {
    background-size: 165%;
    background-position: center;
}

.language-item.selected .language-flag-circle {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.3);
    transform: scale(1.05);
}

.language-item:hover .language-flag-circle {
    transform: scale(1.05);
}

.language-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

.language-item.selected .language-name {
    color: var(--accent-color);
    font-weight: 700;
}

/* Окно выбора языка: фон как в профиле, крестик, кнопка Применить */
#language-modal .language-modal {
    background: #F7F2E9;
    position: relative;
}
#language-modal .language-modal .modal-header {
    background: #F7F2E9;
    color: var(--primary-color);
}
#language-modal .language-modal .modal-content {
    background: #F7F2E9;
}
#language-modal .language-modal .modal-footer {
    background: #F7F2E9;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.language-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}
.language-modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}
#language-modal .language-modal .modal-footer .apply-btn {
    border-radius: 999px;
    border: 1px solid #3d2314;
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a1a1a;
}
#language-modal .language-modal .modal-footer .apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

/* Подсветка выбранного языка — тёплый золотисто-янтарный (в тон кнопке и фону) */
#language-modal .language-item.selected .language-flag-circle {
    border-color: #C9940E;
    box-shadow: 0 0 0 3px rgba(201, 148, 14, 0.35);
}
#language-modal .language-item.selected .language-name {
    color: #A67C00;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #F0F0F0;
    display: flex;
    justify-content: center;
}

.apply-btn, .continue-btn, .level-continue-btn, .back-btn, .subscribe-btn, .achievements-close-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-medium);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
}

.apply-btn:hover, .continue-btn:hover, .back-btn:hover, .subscribe-btn:hover, .achievements-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

/* Кнопка «Продолжить обучение» в новом модальном окне уровня (level-progress-modal) */
.level-progress-modal .continue-btn {
    background: linear-gradient(180deg, #FFD54F 0%, #FFB300 40%, #FF8F00 100%);
    color: #000;
    border-radius: 9999px;
}

.level-progress-modal .continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.level-progress-modal .modal-footer {
    padding: 12px 16px;
}

/* Кнопка «Продолжить» в окне ударного режима — овальная, градиент #FFD66B → #F6A902, тёмно-коричневый текст */
.streak-modal .continue-btn {
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a0f05;
    border-radius: 9999px;
}
.streak-modal .continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 169, 2, 0.4);
}

/* Кнопка «Продолжить обучение» в модальном окне уровня — жёлто-оранжевая с чёрным текстом */
.level-continue-btn {
    background: linear-gradient(180deg, #FFD54F 0%, #FFB300 40%, #FF8F00 100%);
    color: #000;
}
.level-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.streak-header {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Окно ударного режима: золотая шапка в 2 раза ниже, icon.png выходит за верх окна */
.streak-modal .streak-header {
    background: linear-gradient(180deg, #FFF2AD 0%, #FFD66B 50%, #F6A902 100%);
    color: #fff;
    justify-content: flex-end;
    min-height: 68px;
    padding: 8px 20px 10px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    border-top-left-radius: var(--radius-large);
    border-top-right-radius: var(--radius-large);
}

.streak-header-icon {
    display: block;
    width: auto;
    height: 96px;
    object-fit: contain;
    margin-bottom: auto;
    margin-top: 4px;
}

/* Иконка в окне стрика: выходит за верх модалки */
.streak-modal .streak-header-icon {
    position: absolute;
    left: 50%;
    top: -24px;
    transform: translate(-50%, -50%);
    margin: 0;
}

.streak-header-label {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    color: #1a0f05;
}

.streak-content {
    padding: 24px 20px;
    text-align: center;
}

/* В окне ударного режима весь текст чёрный; отступ сверху до переключателя дат в 2 раза меньше */
.streak-modal .streak-content {
    color: #000;
    padding: 6px 20px 24px 20px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.streak-modal .calendar-header,
.streak-modal .calendar-month-title,
.streak-modal .calendar-nav-btn,
.streak-modal .calendar-weekday {
    color: #000;
}
.streak-modal .calendar-header {
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}
.streak-modal .calendar-month-title {
    flex: 0;
}
.streak-modal .calendar-day,
.streak-modal .calendar-weekday {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.streak-modal .calendar-weekday {
    color: #FFFFF0;
    -webkit-text-stroke: 1px #3D2314;
    paint-order: stroke fill;
    transform: translateY(9px);
    position: sticky;
    top: 0;
    z-index: 2;
}
.streak-modal .calendar-day {
    color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}
.streak-modal .calendar-day.today {
    border-color: #000;
    color: #000;
}
/* Пройденные дни — ярко-зелёный фон, чёрный текст */
.streak-modal .calendar-day.active-day {
    background: linear-gradient(135deg, #76FF03 0%, #00E676 50%, #00C853 100%);
    color: #000;
    font-weight: bold;
}
.streak-modal .calendar-day.active-day.today {
    background: linear-gradient(135deg, #76FF03 0%, #00E676 50%, #00C853 100%);
    color: #000;
    border-color: #000;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
    margin-bottom: 24px;
}

/* Обёртка календаря в модалке стрика: фон, строка дней недели + сетка дат */
.streak-modal .calendar-grid-wrapper {
    background: url('assets_optimized/pages.webp') no-repeat center calc(50% + 3px);
    background-size: 109%;
    border: none;
    border-radius: 0;
    padding: 12px 10px;
    min-height: 220px;
    margin-bottom: 24px;
}

/* Строка дней недели — фиксирована, не зависит от числа рядов в месяце */
.streak-modal .calendar-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
    flex-shrink: 0;
}

/* Сетка дат — всегда 6 рядов (42 ячейки), фиксированная высота, дни недели не сдвигаются */
.streak-modal .calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    text-align: center;
    min-height: 180px;
}

/* Пустые ячейки-заполнители (чтобы высота не менялась между месяцами) */
.streak-modal .calendar-day-empty {
    background: transparent !important;
    color: transparent;
    border: none;
}

.calendar-day {
    padding: 10px 0;
    border-radius: 50%;
    font-size: 14px;
    transition: all 0.2s;
    /* По умолчанию дни "неактивны" (серые) */
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.45);
}

.calendar-day.active-day {
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 2px solid var(--accent-color);
    /* Сегодня без заливки (только контур), если нет активности */
    background: transparent;
    color: var(--primary-color);
    font-weight: 700;
}

/* Если сегодня был урок — оставляем контур и добавляем заливку */
.calendar-day.active-day.today {
    background-color: var(--accent-color);
    color: white;
}

.calendar-day:empty {
    background: transparent;
}

.calendar-weekday {
    padding: 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
}

.calendar-nav-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    transition: all 0.2s;
}

/* В модалке ударного режима стрелки месяцев — left.png / right.png, без фона, увеличено 3× */
.streak-modal .calendar-nav-btn {
    background: transparent;
    color: #000;
    border: none;
    border-radius: 8px;
    width: 96px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0);
    box-shadow: none;
    transition: transform 0.12s ease-out, opacity 0.12s ease-out;
}

.streak-modal .calendar-nav-btn .calendar-nav-btn-img {
    width: 54px;
    height: 54px;
}

.calendar-nav-btn-img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.calendar-nav-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.streak-modal .calendar-nav-btn:hover {
    background: transparent;
    opacity: 0.85;
    transform: translateY(-2px);
}
.streak-modal .calendar-nav-btn:active {
    background: transparent;
    opacity: 0.7;
    transform: translateY(0);
}
.streak-modal .calendar-nav-btn:focus {
    outline: none;
}

.calendar-month-title {
    flex: 1;
    text-align: center;
}

.level-header {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 24px 20px;
    text-align: center;
}

.level-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.level-progress-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

.level-progress-bar {
    height: 12px;
    background: #EDEDED;
    border-radius: 6px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #42A5F5 0%, #2196F3 50%, #1976D2 100%);
    border-radius: 6px;
    width: 90%;
}

.level-xp-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.level-xp-current {
    font-weight: 700;
    color: var(--primary-color);
}

.level-xp-total {
    font-weight: 700;
    color: var(--text-light);
}

.level-xp-next {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.level-content {
    padding: 20px;
}

/* ==================== УРОВНИ: НОВЫЕ СТАТ-КАРТОЧКИ ==================== */
.stats-cards.level-stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stats-card.level-stats-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 14px 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stats-card.level-stats-card.is-wide {
    grid-column: 1 / -1;
}

.stats-card-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 8px;
}

.stats-card-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}

.stats-card-title {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light);
}

.stats-card-subtitle {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary-color);
}

/* ==================== УРОВНИ: БЛОК "БУДУЩАЯ НАГРАДА" ==================== */
.level-upcoming-reward {
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.20);
    border-radius: 16px;
    padding: 14px 14px;
    margin-bottom: 18px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.level-upcoming-reward-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

.level-upcoming-reward-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-upcoming-reward-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.level-upcoming-reward-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 2px;
}

.level-upcoming-reward-desc {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.25;
}

@media (max-width: 400px) {
    .stats-cards.level-stats-cards {
        grid-template-columns: 1fr;
    }
    .stats-card.level-stats-card.is-wide {
        grid-column: auto;
    }
}

/* ==================== НОВОЕ МОДАЛЬНОЕ ОКНО УРОВНЯ ==================== */
.level-progress-modal {
    width: 100%;
    max-width: 340px;
    background: #FFFFFF;
    border-radius: var(--radius-large);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.level-progress-header {
    padding: 12px 16px 8px;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #FFFFFF;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.level-progress-header-coins {
    display: block;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    margin-top: -88px;
}

.level-progress-header-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-color, #1a1a1a);
    text-transform: uppercase;
}

.modal-progress-container {
    padding: 10px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-progress-bar-fat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.level-progress-track {
    width: 100%;
    height: 24px;
    background: #ECF0F1;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.level-progress-fill-fat {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #42A5F5 0%, #2196F3 50%, #1976D2 100%);
    transition: width 0.5s ease;
}

.level-xp-main {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

.level-xp-sub {
    font-size: 14px;
    text-align: center;
    color: var(--text-light);
    font-weight: 700;
}

.level-stats-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    gap: 10px;
    background: #F8F4E8; /* слоновая кость */
}

.stat-row-item:not(:last-child) {
    border-bottom: 1px solid #1a1a1a;
}

.stat-row-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.stat-row-item .stat-row-label {
    flex: 1;
}

.stat-row-label {
    color: var(--secondary-color);
}

.stat-row-value {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
}

.stat-row-accuracy {
    background: #F8F4E8;
}

.stat-row-vocab {
    background: #F8F4E8;
}

.stat-row-vocab .stat-row-icon {
    width: 59px;
    height: 59px;
}

.stat-row-intensity {
    background: #F8F4E8;
}

.stat-row-intensity .stat-row-icon {
    width: 59px;
    height: 59px;
}

.future-rewards-block {
    margin-top: 2px;
    padding: 4px 0;
}

.future-rewards-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color, #1a1a1a);
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 6px;
}

.future-rewards-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.future-reward-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.level-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.level-stat {
    background: #F8F9FA;
    border-radius: var(--radius-medium);
    padding: 16px;
    text-align: center;
}

.level-stat-title {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 700;
}

.level-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.level-stat-value span {
    color: var(--accent-color);
}

.level-rewards {
    margin-bottom: 24px;
}

.level-rewards-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
    text-align: center;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.reward-item {
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reward-icon {
    font-size: 26px;
}

.reward-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

/* Premium Modal - новый дизайн */
.premium-modal {
    position: relative;
    background: #F5F1E8;
    border-radius: 24px;
    overflow: visible;
}

/* Шапка Premium: золотая зона с баннером по центру */
.premium-modal-header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 4px 20px;
    background: linear-gradient(135deg, #FFE082 0%, #FFD54F 50%, #FFC107 100%);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    overflow: visible;
}

.premium-header-banner-img {
    max-width: 100%;
    max-height: 168px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.premium-modal-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: #F5F1E8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-modal-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
    /* Отображаем попугая полностью, сохраняя пропорции */
}

.premium-modal-content {
    padding: 2px 20px 20px;
    background: #F5F1E8;
    border-radius: 0 0 24px 24px;
}

.premium-plans {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    justify-content: center;
}

.premium-plan {
    flex: 1;
    background: white;
    border-radius: 14px;
    padding: 10px 12px;
    border: 2px solid #D4A84B;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.premium-plan.selected {
    background: linear-gradient(180deg, #FFE681 0%, #FFC132 100%);
    border-color: #53371D;
    border-width: 2px;
    box-shadow: 0 4px 0 #D9941E, 0 6px 12px rgba(217, 148, 30, 0.3);
}

.premium-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.plan-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.plan-price {
    font-size: 26px;
    font-weight: 700;
    color: #2D3436;
    margin: 0;
    line-height: 1.1;
}

.premium-plan.selected .plan-price {
    color: #3E2B1A;
}

.plan-period {
    font-size: 14px;
    color: #2D3436;
    font-weight: 700;
    margin: 0;
}

.premium-plan.selected .plan-period {
    color: #3E2B1A;
}

.plan-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #2D3436;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: white;
    transform: scale(1.1);
}

.premium-features {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.premium-feature-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.premium-feature-icon {
    font-size: 32px;
    margin-bottom: 4px;
    height: 77px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-feature-icon img {
    width: 77px;
    height: 77px;
    object-fit: contain;
    display: block;
    /* объём: лёгкая тень и подсветка */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)) drop-shadow(0 1px 2px rgba(255,100,100,0.3));
}

.premium-feature-text {
    font-size: 14px;
    font-weight: 700;
    color: #2D3436;
    line-height: 1.3;
}

.premium-subscribe-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    border: 2px solid #53371D;
    border-radius: 999px;
    color: #3E2B1A;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #D9941E, 0 6px 12px rgba(217, 148, 30, 0.3);
}

.premium-subscribe-btn:hover {
    background: linear-gradient(180deg, #FFDD7A 0%, #F7B010 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #D9941E, 0 8px 16px rgba(217, 148, 30, 0.4);
}

.premium-subscribe-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #D9941E, 0 3px 8px rgba(217, 148, 30, 0.3);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

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

.feature-icon {
    font-size: 14px;
    width: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
}

/* AI Чат модальное окно — оформление как у чата с другом */
.ai-chat-modal {
    width: 375px;
    height: 812px;
    background: white;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    position: relative;
}

.ai-chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-right: 16px;
    color: #333;
    position: relative;
    overflow: hidden;
}

.ai-chat-info {
    flex: 1;
}

.ai-chat-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ai-chat-status {
    font-size: 14px;
    opacity: 0.9;
}

.close-ai-chat {
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-ai-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #F5F5F5;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.ai-chat-input {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
    gap: 12px;
}

.ai-chat-input input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.ai-chat-input input:focus {
    border-color: #C9940E;
}

.send-ai-message {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-ai-message:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.35);
}

/* Индикатор «печатает...» в AI-чате */
.ai-typing-indicator {
    align-self: flex-start;
    display: none;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 14px;
}

.ai-typing-indicator.active {
    display: flex;
}

.ai-typing-indicator .ai-typing-text {
    margin-right: 2px;
}

.ai-typing-indicator .typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ai-typing-indicator .typing-dots span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: ai-typing-bounce 1.4s infinite ease-in-out both;
}

.ai-typing-indicator .typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator .typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Чат с другом модальное окно */
.friend-chat-modal {
    width: 375px;
    height: 812px;
    background: white;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}

.friend-chat-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    position: relative;
}

.friend-chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-right: 16px;
    color: #333;
    position: relative;
    overflow: hidden;
}

.friend-chat-avatar img.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.friend-request-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.friend-request-avatar img.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.friend-chat-info {
    flex: 1;
}

.friend-chat-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.friend-chat-status {
    font-size: 14px;
    opacity: 0.9;
}

.close-friend-chat {
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-friend-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.friend-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #F5F5F5;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Разделитель даты в стиле Telegram */
.friend-chat-date-separator {
    align-self: center;
    margin: 12px 0 4px;
    padding: 6px 14px;
    font-size: 13px;
    color: #707579;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    white-space: nowrap;
}

.friend-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.friend-user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    border-bottom-right-radius: 4px;
}

.friend-friend-message {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-message-text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.friend-message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.friend-chat-input {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
    gap: 12px;
}

.friend-chat-input input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.friend-chat-input input:focus {
    border-color: #C9940E;
}

.send-friend-message {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9940E, #A67C00);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-friend-message:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.35);
}

/* Индикатор набора сообщения для друга */
.friend-typing-indicator {
    display: none;
    align-self: flex-start;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-typing-indicator.active {
    display: block;
}

.friend-typing-dots {
    display: flex;
    gap: 4px;
}

.friend-typing-dots span {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.friend-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.friend-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Нижняя навигация */
#bottom-nav {
    position: absolute;
    bottom: 4px;
    left: 12px;
    right: 12px;
    height: 76px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0 6px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all var(--transition);
    padding: 8px 2px;
    border-radius: 12px;
    flex: 1;
    min-width: 0;
    margin: 0 1px;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.nav-item.active {
    color: #A67C00;
    background: rgba(201, 148, 14, 0.15);
}

.nav-icon {
    font-size: 14px;
    margin-bottom: 2px;
}

.nav-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    width: 100%;
    letter-spacing: -0.2px;
}

/* Toast уведомления */
.language-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: toastSlideIn 0.3s ease, toastSlideOut 0.3s ease 2.7s forwards;
}

@keyframes toastSlideIn {
    from { top: -100px; opacity: 0; }
    to { top: 80px; opacity: 1; }
}

@keyframes toastSlideOut {
    to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.toast-icon {
    font-size: 14px;
}

.toast-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.toast-text strong {
    color: var(--accent-color);
}

/* ==================== СТИЛИ ДЛЯ БИБЛИОТЕКИ ==================== */

/* Горизонтальная лента домашних заданий */
.homework-slider {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.homework-slider::-webkit-scrollbar {
    display: none;
}

.homework-card-horizontal {
    min-width: 160px;
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.homework-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.homework-card-horizontal.view-all {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
}

.homework-card-horizontal.view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

.homework-icon-horizontal {
    font-size: 26px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    display: flex;
    align-items: center;
    justify-content: center;
}

.homework-card-horizontal.view-all .homework-icon-horizontal {
    background: rgba(255, 255, 255, 0.2);
}

.homework-info-horizontal {
    text-align: center;
}

.homework-title-horizontal {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.homework-card-horizontal.view-all .homework-title-horizontal {
    color: white;
}

.homework-desc-horizontal {
    font-size: 14px;
    color: var(--text-light);
}

.homework-card-horizontal.view-all .homework-desc-horizontal {
    color: rgba(255, 255, 255, 0.9);
}

/* Фильтры уровней */
.level-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.level-filters::-webkit-scrollbar {
    display: none;
}

.level-filter-btn {
    padding: 5px 10px;
    background: #F8F9FA;
    border: 1px solid #4a3728;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #4a3728;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.level-filter-btn:hover {
    border-color: #3d2c1e;
    color: #3d2c1e;
}

.level-filter-btn.active-filter {
    background: #C9940E;
    border-color: #C9940E;
    color: white;
    box-shadow: 0 0 0 2px rgba(201, 148, 14, 0.35);
}

/* Сетка контента */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 16px;
}

.content-card {
    background: white;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all var(--transition);
    cursor: pointer;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.content-card-image {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.content-card-type {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.content-card-info {
    padding: 12px;
}

.content-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.content-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-level {
    font-size: 14px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-color);
    color: white;
}

.content-card-category {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
}

/* Адаптивность */
@media (max-width: 400px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .homework-card-horizontal {
        min-width: 140px;
    }
    
    .level-filters {
        gap: 5px;
    }
    
    .level-filter-btn {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 6px;
    }
}
/* ==================== СТИЛИ ДЛЯ ТАБЛИЦЫ ЛИГИ ==================== */

.leaderboard-row.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-left: 4px solid #FFD700;
    position: relative;
}

.leaderboard-row.gold .rank {
    color: #3d2314;
    font-weight: 700;
}

.leaderboard-row.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
    border-left: 4px solid #C0C0C0;
}

.leaderboard-row.silver .rank {
    color: #3d2314;
    font-weight: 700;
}

.leaderboard-row.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
    border-left: 4px solid #CD7F32;
}

.leaderboard-row.bronze .rank {
    color: #3d2314;
    font-weight: 700;
}

/* Стили для текущей лиги пользователя */
/* Стиль для строки пользователя в таблице лидеров */
.leaderboard-row.user-row {
    background: rgba(201, 148, 14, 0.12) !important;
    border-left: 4px solid #C9940E !important;
    box-shadow: 0 0 0 1px rgba(201, 148, 14, 0.2);
    border-radius: 8px;
    font-weight: bold;
}

.leaderboard-row.user-row .user-name {
    color: #A67C00;
    font-weight: 700;
}

/* Тема списка участников по текущей лиге */
#leaderboard-container.league-theme-0 {
    background: linear-gradient(180deg, #FAF4EE 0%, #F0E6DC 100%);
    border: 1px solid rgba(159, 110, 76, 0.25);
    box-shadow: 0 2px 12px rgba(159, 110, 76, 0.15);
}
#leaderboard-container.league-theme-0 .leaderboard-row {
    border-bottom-color: rgba(199, 180, 159, 0.6);
}
#leaderboard-container.league-theme-0 .rank { color: #3d2314; }
#leaderboard-container.league-theme-0 .user-score { color: #A67C00; }
#leaderboard-container.league-theme-0 .leaderboard-row.gold { background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.06)); border-left-color: #CD7F32; }
#leaderboard-container.league-theme-0 .leaderboard-row.gold .rank { color: #3d2314; }
#leaderboard-container.league-theme-0 .leaderboard-row.silver { background: linear-gradient(135deg, rgba(199, 180, 159, 0.25), rgba(199, 180, 159, 0.08)); border-left-color: #B8A090; }
#leaderboard-container.league-theme-0 .leaderboard-row.silver .rank { color: #3d2314; }
#leaderboard-container.league-theme-0 .leaderboard-row.bronze { background: linear-gradient(135deg, rgba(159, 110, 76, 0.2), rgba(159, 110, 76, 0.06)); border-left-color: #9F6E4C; }
#leaderboard-container.league-theme-0 .leaderboard-row.bronze .rank { color: #3d2314; }
#leaderboard-container.league-theme-0 .leaderboard-row.user-row { background: rgba(201, 148, 14, 0.12) !important; border-left-color: #C9940E !important; }
#leaderboard-container.league-theme-0 .leaderboard-row.user-row .user-name { color: #A67C00; }

#leaderboard-container.league-theme-1 {
    background: linear-gradient(180deg, #F2F4F6 0%, #E4E8EC 100%);
    border: 1px solid rgba(107, 123, 140, 0.25);
    box-shadow: 0 2px 12px rgba(107, 123, 140, 0.15);
}
#leaderboard-container.league-theme-1 .leaderboard-row {
    border-bottom-color: rgba(192, 200, 208, 0.7);
}
#leaderboard-container.league-theme-1 .rank { color: #3d2314; }
#leaderboard-container.league-theme-1 .user-score { color: #A67C00; }
#leaderboard-container.league-theme-1 .leaderboard-row.gold { background: linear-gradient(135deg, rgba(142, 158, 171, 0.25), rgba(142, 158, 171, 0.08)); border-left-color: #8E9EAB; }
#leaderboard-container.league-theme-1 .leaderboard-row.gold .rank { color: #3d2314; }
#leaderboard-container.league-theme-1 .leaderboard-row.silver { background: linear-gradient(135deg, rgba(192, 200, 208, 0.3), rgba(192, 200, 208, 0.1)); border-left-color: #8E9EAB; }
#leaderboard-container.league-theme-1 .leaderboard-row.silver .rank { color: #3d2314; }
#leaderboard-container.league-theme-1 .leaderboard-row.bronze { background: linear-gradient(135deg, rgba(160, 168, 176, 0.25), rgba(160, 168, 176, 0.08)); border-left-color: #7D8B99; }
#leaderboard-container.league-theme-1 .leaderboard-row.bronze .rank { color: #3d2314; }
#leaderboard-container.league-theme-1 .leaderboard-row.user-row { background: rgba(201, 148, 14, 0.12) !important; border-left-color: #C9940E !important; }
#leaderboard-container.league-theme-1 .leaderboard-row.user-row .user-name { color: #A67C00; }

#leaderboard-container.league-theme-2 {
    background: linear-gradient(180deg, #FFFBF0 0%, #FFF3D6 100%);
    border: 1px solid rgba(201, 162, 39, 0.3);
    box-shadow: 0 2px 12px rgba(201, 162, 39, 0.15);
}
#leaderboard-container.league-theme-2 .leaderboard-row {
    border-bottom-color: rgba(232, 217, 160, 0.6);
}
#leaderboard-container.league-theme-2 .rank { color: #3d2314; }
#leaderboard-container.league-theme-2 .user-score { color: #A67C00; }
#leaderboard-container.league-theme-2 .leaderboard-row.gold { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.06)); border-left-color: #C9A227; }
#leaderboard-container.league-theme-2 .leaderboard-row.gold .rank { color: #3d2314; }
#leaderboard-container.league-theme-2 .leaderboard-row.silver { background: linear-gradient(135deg, rgba(232, 217, 160, 0.3), rgba(232, 217, 160, 0.1)); border-left-color: #D4C078; }
#leaderboard-container.league-theme-2 .leaderboard-row.silver .rank { color: #3d2314; }
#leaderboard-container.league-theme-2 .leaderboard-row.bronze { background: linear-gradient(135deg, rgba(212, 192, 120, 0.25), rgba(212, 192, 120, 0.08)); border-left-color: #B89630; }
#leaderboard-container.league-theme-2 .leaderboard-row.bronze .rank { color: #3d2314; }
#leaderboard-container.league-theme-2 .leaderboard-row.user-row { background: rgba(201, 148, 14, 0.12) !important; border-left-color: #C9940E !important; }
#leaderboard-container.league-theme-2 .leaderboard-row.user-row .user-name { color: #A67C00; }

#leaderboard-container.league-theme-3 {
    background: linear-gradient(180deg, #E8F8F2 0%, #D4F0E4 100%);
    border: 1px solid rgba(0, 184, 148, 0.25);
    box-shadow: 0 2px 12px rgba(0, 184, 148, 0.12);
}
#leaderboard-container.league-theme-3 .leaderboard-row {
    border-bottom-color: rgba(165, 242, 198, 0.5);
}
#leaderboard-container.league-theme-3 .rank { color: #3d2314; }
#leaderboard-container.league-theme-3 .user-score { color: #A67C00; }
#leaderboard-container.league-theme-3 .leaderboard-row.gold { background: linear-gradient(135deg, rgba(0, 184, 148, 0.2), rgba(0, 184, 148, 0.06)); border-left-color: #00B894; }
#leaderboard-container.league-theme-3 .leaderboard-row.gold .rank { color: #3d2314; }
#leaderboard-container.league-theme-3 .leaderboard-row.silver { background: linear-gradient(135deg, rgba(165, 242, 198, 0.25), rgba(165, 242, 198, 0.08)); border-left-color: #00B894; }
#leaderboard-container.league-theme-3 .leaderboard-row.silver .rank { color: #3d2314; }
#leaderboard-container.league-theme-3 .leaderboard-row.bronze { background: linear-gradient(135deg, rgba(125, 224, 168, 0.2), rgba(125, 224, 168, 0.06)); border-left-color: #00A884; }
#leaderboard-container.league-theme-3 .leaderboard-row.bronze .rank { color: #3d2314; }
#leaderboard-container.league-theme-3 .leaderboard-row.user-row { background: rgba(201, 148, 14, 0.12) !important; border-left-color: #C9940E !important; }
#leaderboard-container.league-theme-3 .leaderboard-row.user-row .user-name { color: #A67C00; }

#leaderboard-container.league-theme-4 {
    background: linear-gradient(180deg, #E8F4FC 0%, #D0E8F8 100%);
    border: 1px solid rgba(9, 132, 227, 0.25);
    box-shadow: 0 2px 12px rgba(9, 132, 227, 0.12);
}
#leaderboard-container.league-theme-4 .leaderboard-row {
    border-bottom-color: rgba(154, 215, 255, 0.5);
}
#leaderboard-container.league-theme-4 .rank { color: #3d2314; }
#leaderboard-container.league-theme-4 .user-score { color: #A67C00; }
#leaderboard-container.league-theme-4 .leaderboard-row.gold { background: linear-gradient(135deg, rgba(9, 132, 227, 0.2), rgba(9, 132, 227, 0.06)); border-left-color: #0984E3; }
#leaderboard-container.league-theme-4 .leaderboard-row.gold .rank { color: #3d2314; }
#leaderboard-container.league-theme-4 .leaderboard-row.silver { background: linear-gradient(135deg, rgba(154, 215, 255, 0.25), rgba(154, 215, 255, 0.08)); border-left-color: #3498DB; }
#leaderboard-container.league-theme-4 .leaderboard-row.silver .rank { color: #3d2314; }
#leaderboard-container.league-theme-4 .leaderboard-row.bronze { background: linear-gradient(135deg, rgba(120, 200, 248, 0.2), rgba(120, 200, 248, 0.06)); border-left-color: #2980B9; }
#leaderboard-container.league-theme-4 .leaderboard-row.bronze .rank { color: #3d2314; }
#leaderboard-container.league-theme-4 .leaderboard-row.user-row { background: rgba(201, 148, 14, 0.12) !important; border-left-color: #C9940E !important; }
#leaderboard-container.league-theme-4 .leaderboard-row.user-row .user-name { color: #A67C00; }

/* ==================== ГЛОБАЛЬНЫЙ РЕЙТИНГ (Yearly Leaderboard) ==================== */
/* Сегментированный контрол: золотой слайдер плавно переезжает к выбранной кнопке */
.league-view-tabs {
    position: relative;
    display: flex;
    gap: 0;
    margin: 14px 0 14px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Плавно перемещающаяся «пилюля» с золотым градиентом, без острых углов */
.league-view-tab-slider {
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: calc(50% - 5px);
    border-radius: 10px;
    background: linear-gradient(180deg, #FFF2AD 0%, #FFD66B 45%, #F6A902 100%);
    box-shadow: 0 2px 6px rgba(246, 169, 2, 0.35);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.league-view-tabs.league-view-tabs--global .league-view-tab-slider {
    transform: translateX(100%);
}

/* Анимация золотистой части при нажатии на выбранную кнопку */
.league-view-tab-slider.league-view-tab-slider--tap {
    animation: league-slider-tap 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes league-slider-tap {
    0%   { box-shadow: 0 2px 6px rgba(246, 169, 2, 0.35); filter: brightness(1); }
    45%  { box-shadow: 0 6px 20px rgba(246, 169, 2, 0.55), 0 0 24px rgba(255, 214, 107, 0.45); filter: brightness(1.08); }
    100% { box-shadow: 0 2px 6px rgba(246, 169, 2, 0.35); filter: brightness(1); }
}

.league-view-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    transition: color 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.league-view-tab:hover:not(.active) {
    opacity: 0.9;
}

/* Тактильный отклик при удержании на выбранной кнопке */
.league-view-tab.active:active {
    transform: scale(0.96);
}

/* Красивая анимация при нажатии на уже выбранную кнопку */
.league-view-tab.active.league-view-tab--tap {
    animation: league-tab-tap 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes league-tab-tap {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.08); }
    65%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}

/* Текст на выбранной кнопке (слайдер под ней) */
.league-view-tab.active {
    color: #2D2826;
}

/* По умолчанию и бронзовая лига — тема 0 */
.league-view-tab:not(.active) { color: #3C2E2A; }

/* Бронзовая лига (тема 0) */
.league-view-tabs.league-theme-0 .league-view-tab:not(.active) { color: #3C2E2A; }

/* Серебряная лига (тема 1) */
.league-view-tabs.league-theme-1 .league-view-tab:not(.active) { color: #2C3338; }

/* Золотая лига (тема 2) */
.league-view-tabs.league-theme-2 .league-view-tab:not(.active) { color: #3C3520; }

/* Изумрудная лига (тема 3) */
.league-view-tabs.league-theme-3 .league-view-tab:not(.active) { color: #1E4D36; }

/* Алмазная лига (тема 4) */
.league-view-tabs.league-theme-4 .league-view-tab:not(.active) { color: #1A3A52; }

.global-rating-title {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #2D3436;
    background: radial-gradient(circle at 20% 0%, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.12) 40%, rgba(255, 255, 255, 0.0) 70%),
        linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 165, 0, 0.08));
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Чуть более "торжественные" рамки для топ-3 в глобальном рейтинге */
.global-rating .leaderboard-row.gold {
    box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.65), 0 10px 22px rgba(255, 215, 0, 0.12);
}

.global-rating .leaderboard-row.silver {
    box-shadow: inset 0 0 0 2px rgba(192, 192, 192, 0.65), 0 10px 22px rgba(192, 192, 192, 0.10);
}

.global-rating .leaderboard-row.bronze {
    box-shadow: inset 0 0 0 2px rgba(205, 127, 50, 0.65), 0 10px 22px rgba(205, 127, 50, 0.10);
}

/* ==================== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ДОСТИЖЕНИЙ ==================== */

.achievements-modal-header {
    background: transparent;
    padding: 0;
    position: relative;
}

.achievements-modal-header-img {
    display: block;
    width: 70%;
    max-width: 70%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.close-achievements {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #2D3436;
    font-size: 26px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-achievements:hover {
    background: rgba(255, 255, 255, 0.3);
}

.achievements-modal-content {
    padding: 20px;
    max-height: 620px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #F6A902 #F0F0F0;
}
.achievements-modal-content::-webkit-scrollbar {
    width: 6px;
}
.achievements-modal-content::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}
.achievements-modal-content::-webkit-scrollbar-thumb {
    background-color: #F6A902;
    border-radius: 3px;
}
.achievements-modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #E09A02;
}

/* Модальное окно «Все попугаи» — чуть ниже верха окна достижений */
#all-parrots-modal.modal-overlay.active {
    align-items: flex-start;
    padding-top: calc((100vh - 90vh) / 2 + 8vh);
}

.all-parrots-modal .achievements-modal-header-img {
    max-width: 70%;
}
.all-parrots-modal-content {
    padding: 20px;
    max-height: 620px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #F6A902 #F0F0F0;
}
.all-parrots-modal-content::-webkit-scrollbar {
    width: 6px;
}
.all-parrots-modal-content::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}
.all-parrots-modal-content::-webkit-scrollbar-thumb {
    background-color: #F6A902;
    border-radius: 3px;
}
.all-parrots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 4px 0;
}
.all-parrots-grid .achievement-card,
.all-parrots-grid .parrot-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0 4px;
    gap: 6px;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    aspect-ratio: 3 / 4;
}
.all-parrots-grid .parrot-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.all-parrots-grid .parrot-card.locked,
.all-parrots-grid .achievement-card.locked {
    filter: grayscale(1) brightness(0.35);
    opacity: 0.35;
}

.achievements-section {
    margin-bottom: 30px;
}

.section-title-small {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
    text-align: left;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Универсальная сетка достижений / попугаев / наград */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.achievements-grid.rewards-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Награды в окне достижений — без белого фона, только изображение и подпись */
.rewards-grid .achievement-card,
.rewards-grid .reward-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0 4px;
    gap: 6px;
    justify-content: flex-start;
}

.rewards-grid .reward-description {
    border-top: none;
    padding-top: 4px;
}

/* Обёртка скролла попугаев: сетка + кнопка «ПОСМОТРЕТЬ ВСЕХ» в конце */
.parrots-scroll-wrapper {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    align-items: stretch;
    scrollbar-width: thin;
    scrollbar-color: #F6A902 #F0F0F0;
}

.parrots-scroll-wrapper .parrots-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    flex-shrink: 0;
    overflow: visible;
}

.parrots-view-all-btn {
    flex-shrink: 0;
    align-self: center;
    min-width: 140px;
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #A67C00;
    background: transparent;
    border: 2px solid #C9940E;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.parrots-view-all-btn:hover {
    transform: scale(1.02);
    opacity: 0.85;
}

.parrots-view-all-btn:active {
    transform: scale(0.98);
}

.parrots-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.parrots-scroll-wrapper::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}

.parrots-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #F6A902;
    border-radius: 3px;
}

.parrots-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #E09A02;
}

/* Сетка попугаев внутри обёртки (без своего скролла) */
.parrots-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding-bottom: 0;
    align-items: stretch;
}

.parrots-grid::-webkit-scrollbar {
    height: 6px;
}

.parrots-grid::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}

.parrots-grid::-webkit-scrollbar-thumb {
    background-color: #F6A902;
    border-radius: 3px;
}

.parrots-grid::-webkit-scrollbar-thumb:hover {
    background-color: #E09A02;
}

.achievement-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 12px 8px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition), opacity var(--transition);
    aspect-ratio: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Карточки попугаев — только фото и подпись, без серого фона */
.parrots-grid .achievement-card,
.parrots-grid .parrot-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0 4px;
    gap: 6px;
    justify-content: flex-start;
    min-width: 100px;
    flex-shrink: 0;
    width: 100px;
}

.parrots-grid .achievement-card {
    aspect-ratio: 3 / 4;
}

.parrots-grid .parrot-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Условия получения не показываем под карточкой — только по клику на попугая */
.parrots-grid .parrot-desc,
.parrots-grid .parrot-description {
    display: none !important;
}

.parrots-grid .parrot-description {
    border-top: none;
    padding-top: 4px;
    font-size: 10px;
}

/* Контейнер изображения попугая */
.parrot-image-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.parrot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Описание попугая */
.parrot-description {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.4;
    padding-top: 10px;
    border-top: 1px solid #F0F0F0;
    width: 100%;
}

/* Награды: изображение сверху, текст снизу (та же форма карточки) */
.reward-image-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.reward-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Награда red.webp — на 10% крупнее */
.reward-image[src*="red.webp"] {
    transform: scale(1.1);
    transform-origin: center center;
}

.reward-description {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.3;
    padding-top: 8px;
    border-top: 1px solid #F0F0F0;
    width: 100%;
}

.achievement-card .achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F5F5;
    font-size: 14px;
}

.achievement-card .achievement-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.achievement-card .achievement-subtitle {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.achievement-card.unlocked:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.achievement-card.locked {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: default;
}

.achievement-card.locked .achievement-icon i {
    filter: grayscale(1);
}

.achievement-card.locked .parrot-image,
.achievement-card.locked .reward-image {
    filter: grayscale(1);
}

/* Недоступные коллекционные попугаи — ещё более серые */
.parrot-card.locked,
.parrots-grid .achievement-card.locked {
    filter: grayscale(1) brightness(0.35);
    opacity: 0.35;
    cursor: default;
}

.parrot-card.locked .parrot-icon,
.parrot-card.locked .parrot-name,
.parrot-card.locked .parrot-desc {
    opacity: 0.8;
}

.parrot-card.locked .parrot-name,
.parrot-card.locked .parrot-desc {
    color: #8a8a8a;
}

/* Старые стили для попугаев удалены - используются новые стили выше */

/* Сетка медалей 3x3 */
.medals-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.medal-item {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.medal-item.unlocked {
    border-color: var(--accent-color);
}

.medal-item.locked {
    filter: grayscale(100%) opacity(0.5);
}

.medal-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0F0F0, #E0E0E0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.medal-item.unlocked .medal-icon {
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
}

.medal-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
}

/* Список значков */
.badges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge-item {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.badge-item.unlocked {
    border-color: var(--accent-color);
}

.badge-item.locked {
    filter: grayscale(100%) opacity(0.5);
}

.badge-icon {
    font-size: 26px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0F0F0, #E0E0E0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-item.unlocked .badge-icon {
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    color: white;
}

.badge-info {
    flex: 1;
}

.badge-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.badge-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.3;
}

.achievements-modal-footer {
    padding: 20px;
    border-top: 1px solid #F0F0F0;
    display: flex;
    justify-content: center;
}

/* Кнопка «ЗАКРЫТЬ» в достижениях: теплый желтый градиент, темно-коричневый текст, черная обводка */
.achievements-modal .achievements-close-btn {
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #4B2C20;
    border: 2px solid #000000;
}

.achievements-modal .achievements-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

/* ==================== СТИЛИ ДЛЯ СИСТЕМЫ ДОСТИЖЕНИЙ ==================== */

/* Уведомление о разблокировке достижения */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 3s forwards;
    border-left: 4px solid var(--accent-color);
}

.notification-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.notification-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    to { transform: translateX(100%); opacity: 0; }
}

/* Уведомление «условие получения» при клике на попугая/награду — вверху экрана */
.parrot-condition-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    width: 340px;
    background: linear-gradient(145deg, #fffef7 0%, #fff9e6 100%);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(201, 148, 14, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 10001;
    animation: parrotConditionIn 0.35s ease, parrotConditionOut 0.35s ease 2.8s forwards;
    border-left: 4px solid #C9940E;
}

.parrot-condition-toast .condition-toast-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parrot-condition-toast .condition-toast-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.21);
}

.parrot-condition-toast .condition-toast-body {
    flex: 1;
    min-width: 0;
}

.parrot-condition-toast .condition-toast-label {
    font-size: 11px;
    font-weight: 700;
    color: #8a7a4a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.parrot-condition-toast .condition-toast-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.parrot-condition-toast .condition-toast-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.35;
}

@keyframes parrotConditionIn {
    from { top: -120px; opacity: 0; transform: translateX(-50%) scale(0.95); }
    to { top: 70px; opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes parrotConditionOut {
    to { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.98); }
}

/* Прогресс-бар для достижений */
.medal-progress {
    margin-top: 8px;
    width: 100%;
}

.medal-progress-bar {
    height: 6px;
    background: #EDEDED;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.medal-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.medal-progress-text {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    font-weight: 700;
}

.medal-description {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    margin-top: 4px;
    line-height: 1.1;
}

/* Адаптация сетки медалей для достижений */
.medals-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.medal-item {
    background: white;
    border-radius: var(--radius-medium);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    border: 2px solid transparent;
    min-height: 140px;
    position: relative;
    text-align: center;
}

.medal-item.unlocked {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 184, 148, 0.2);
}

.medal-item.locked {
    filter: grayscale(100%) opacity(0.5);
}

.medal-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0F0F0, #E0E0E0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.medal-item.unlocked .medal-icon {
    background: linear-gradient(135deg, #FFEAA7, #FDCB6E);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.medal-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
}

.medal-description {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.1;
    margin-top: 4px;
}

/* Адаптивность для мобильных экранов (375px) */
@media (max-width: 375px) {
    .medals-grid-large {
        gap: 8px;
    }
    
    .medal-item {
        padding: 12px;
        min-height: 130px;
    }
    
    .medal-icon {
        font-size: 26px;
        width: 45px;
        height: 45px;
    }
    
    .medal-name {
        font-size: 11px;
    }
    
    .medal-description {
        font-size: 14px;
        line-height: 1.1;
    }
}

/* Стили для нового формата уроков */
.lesson-theory {
    background: #E3F2FD;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--accent-color);
}

.lesson-theory p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--primary-color);
}

/* Стили для reorder (перестановка слов) */
.reorder-container {
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.reorder-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0;
}

.reorder-word {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Выделение слова при наведении — цвет флага (золотисто-янтарный) */
.reorder-word:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.25);
    border-color: #C9940E;
    background: linear-gradient(180deg, rgba(255, 214, 107, 0.2) 0%, rgba(246, 169, 2, 0.15) 100%);
}

.reorder-answer {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 2px dashed rgba(0, 0, 0, 0.15);
}

.reorder-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 50px;
    padding: 10px;
    background: transparent;
    border-radius: 8px;
}

/* Выбранные слова в упражнении «собери фразу» — цвет флага (золотисто-янтарный) */
.reorder-selected-word {
    margin: 5px;
    padding: 8px 15px;
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a1a1a;
    border: 1px solid #3d2314;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.reorder-selected-word:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(246, 169, 2, 0.35);
}

/* Кнопка «Проверить» в уроке — в цветах выделения флага (золотисто-янтарный) */
.reorder-check-btn {
    margin-top: 15px;
    padding: 12px 24px;
    background: linear-gradient(180deg, #FFD66B 0%, #F6A902 100%);
    color: #1a1a1a;
    border: 1px solid #3d2314;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.reorder-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 169, 2, 0.35);
}

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

/* Стили для gap-fill (заполнение пропуска) */
.gap-fill-container {
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.gap-fill-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0;
}

.gap-fill-option {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Выделение варианта при наведении — цвет флага (золотисто-янтарный) */
.gap-fill-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 148, 14, 0.25);
    border-color: #C9940E;
    background: linear-gradient(180deg, rgba(255, 214, 107, 0.2) 0%, rgba(246, 169, 2, 0.15) 100%);
}

.gap-fill-option.correct {
    background: #C8E6C9;
    border-color: #00B894;
    color: #2D3436;
}

.gap-fill-option.wrong {
    background: #FFCDD2;
    border-color: #FF7675;
    color: #2D3436;
}

.gap-fill-input-container {
    margin-top: 20px;
    width: 100%;
}

.gap-fill-input {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    text-align: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.gap-fill-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}