/* webapp/css/themes/theme-modern-dark.css */

body.theme-modern-dark {
    /* === ОСНОВНЫЕ ЦВЕТА === */
    --theme-bg-primary: #1a1a2e;
    /* Глубокий тёмно-синий */
    --theme-bg-secondary: #16213e;
    /* Средний тёмно-синий */
    --theme-bg-content: #0f3460;
    /* Поверхности и карточки */
    --theme-bg-elevated: #1e2a4a;
    /* Приподнятые элементы */

    /* === ТЕКСТ === */
    --theme-text-primary: #ffffff;
    --theme-text-secondary: #b8c5d6;
    --theme-text-placeholder: #7a8ba0;
    --theme-border-color: #2a3441;

    /* === АКЦЕНТНЫЕ ЦВЕТА === */
    --theme-accent-primary: #0099cc;
    /* Умеренный циан */
    --theme-accent-secondary: #cc4499;
    /* Умеренный розовый */
    --theme-accent-alt1: #feca57;
    /* Золотистый */
    --theme-accent-alt2: #00ff88;
    /* Неоновый зелёный */

    /* === СОСТОЯНИЯ === */
    --theme-success-color: #00ff88;
    /* Неоновый зелёный */
    --theme-error-color: #ff4757;
    /* Неоновый красный */
    --theme-warning-color: #ffa502;
    /* Неоновый оранжевый */

    /* === КНОПКИ === */
    --theme-button-text-on-accent: #ffffff;
    --theme-button-text-on-normal: var(--theme-text-primary);
    --theme-focus-ring-color: rgba(0, 212, 255, 0.5);

    /* === ШРИФТЫ === */
    --font-main: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* === НЕОМОРФНЫЕ ТЕНИ === */
    --neo-shadow-light: rgba(255, 255, 255, 0.1);
    --neo-shadow-dark: rgba(0, 0, 0, 0.5);
    --neo-shadow-inset-light: inset 2px 2px 5px rgba(255, 255, 255, 0.1);
    --neo-shadow-inset-dark: inset -2px -2px 5px rgba(0, 0, 0, 0.5);

    /* === СТЕКЛЯННЫЕ ЭФФЕКТЫ === */
    --neo-glass-bg: rgba(255, 255, 255, 0.05);
    --neo-glass-border: rgba(255, 255, 255, 0.1);
    --neo-glass-shadow: rgba(0, 0, 0, 0.3);

    /* === SRS ПРОГРЕСС-БАРЫ === */
    --theme-srs-bar-short: #feca57;
    /* Золотистый для новых */
    --theme-srs-bar-medium: #00d4ff;
    /* Циан для изучаемых */
    --theme-srs-bar-long: #ff6ec7;
    /* Розовый для уверенных */
    --theme-srs-bar-learned: #00ff88;
    /* Зелёный для изученных */
    --theme-srs-segment-inactive-bg: var(--theme-border-color);

    /* === ГРАММАТИКА === */
    --theme-grammar-feedback-correct-bg: rgba(0, 255, 136, 0.1);
    --theme-grammar-feedback-correct-border: var(--theme-success-color);
    --theme-grammar-feedback-correct-text: var(--theme-success-color);
    --theme-grammar-feedback-incorrect-bg: rgba(255, 71, 87, 0.1);
    --theme-grammar-feedback-incorrect-border: var(--theme-error-color);
    --theme-grammar-feedback-incorrect-text: var(--theme-error-color);
    --theme-grammar-ai-explanation-bg: var(--theme-bg-content);
    --theme-grammar-ai-explanation-border: var(--theme-border-color);
    --theme-grammar-ai-explanation-text: var(--theme-text-primary);
    --theme-grammar-chat-bg: var(--theme-bg-secondary);
    --theme-grammar-chat-user-msg-bg: var(--theme-accent-primary);
    --theme-grammar-chat-user-msg-text: var(--theme-button-text-on-accent);
    --theme-grammar-chat-ai-msg-bg: var(--theme-bg-content);
    --theme-grammar-chat-ai-msg-text: var(--theme-text-primary);

    /* === РЕЖИМЫ ИЗУЧЕНИЯ === */
    --mode-mc-bg: var(--theme-accent-primary);
    --mode-mc-text: #fff;
    --mode-audition-bg: var(--theme-bg-elevated);
    --mode-audition-text: #fff;
    --mode-dictation-bg: var(--theme-accent-alt1);
    --mode-dictation-text: #000;
    --mode-phrase-translation-bg: var(--theme-accent-secondary);
    --mode-phrase-translation-text: #fff;
    --mode-phrase-audition-bg: #7e57c2;
    --mode-phrase-audition-text: #fff;
    --mode-input-bg: var(--theme-success-color);
    --mode-input-text: #000;
    --theme-gold: var(--theme-accent-alt1);
}

/* === ИМПОРТ ДОПОЛНИТЕЛЬНЫХ СТИЛЕЙ ДЛЯ ФОРМ === */
/* Импорты перенесены в конец файла для правильного приоритета */

/* === ИСПРАВЛЕНИЕ ПСЕВДОЭЛЕМЕНТОВ === */
/* Убираем псевдоэлементы у заголовков которые создают синие линии */
body.theme-modern-dark h1::after,
body.theme-modern-dark h2::after,
body.theme-modern-dark .title::after,
body.theme-modern-dark [class*="title"]::after {
    display: none !important;
}

/* === НЕОМОРФНЫЕ КНОПКИ === */
body.theme-modern-dark .button {
    background: var(--theme-bg-content);
    border-radius: 16px;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Добавляем тонкое внутреннее свечение для всех кнопок */
body.theme-modern-dark .button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

body.theme-modern-dark .button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark .button:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light);
    transform: translateY(0);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .button:active:not(:disabled)::before {
    opacity: 0.3;
}

/* === АКЦЕНТНЫЕ КНОПКИ С НЕОНОВЫМ СВЕЧЕНИЕМ === */
body.theme-modern-dark .button-primary {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary));
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.3);
    color: var(--theme-button-text-on-accent);
    position: relative;
}

body.theme-modern-dark .button-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .button-primary:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(0, 212, 255, 0.5),
        0 0 60px rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
}

body.theme-modern-dark .button-primary:hover:not(:disabled)::after {
    opacity: 1;
}

body.theme-modern-dark .button-primary:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 15px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

/* === ВТОРИЧНЫЕ КНОПКИ === */
body.theme-modern-dark .button-secondary {
    background: var(--theme-bg-content);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--theme-text-primary);
}

body.theme-modern-dark .button-secondary:hover:not(:disabled) {
    border-color: var(--theme-accent-primary);
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 15px rgba(0, 212, 255, 0.2);
}

/* === КНОПКИ УСПЕХА === */
body.theme-modern-dark .button-success {
    background: linear-gradient(135deg, var(--theme-success-color), #00cc66);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 255, 136, 0.3);
    color: #000;
}

body.theme-modern-dark .button-success:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(0, 255, 136, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark .button-success:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 15px rgba(0, 255, 136, 0.4);
}

/* === КНОПКИ ОШИБКИ === */
body.theme-modern-dark .button-danger {
    background: linear-gradient(135deg, var(--theme-error-color), #cc3333) !important;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(255, 71, 87, 0.3);
    color: var(--theme-button-text-on-accent);
}

body.theme-modern-dark .button-danger:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(255, 71, 87, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark .button-danger:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 15px rgba(255, 71, 87, 0.4);
}

/* === КНОПКИ ПРЕДУПРЕЖДЕНИЯ === */
body.theme-modern-dark .button-warning {
    background: linear-gradient(135deg, var(--theme-warning-color), #cc7700);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(255, 165, 2, 0.3);
    color: var(--theme-button-text-on-accent);
}

body.theme-modern-dark .button-warning:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(255, 165, 2, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark .button-warning:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 15px rgba(255, 165, 2, 0.4);
}

/* === АЛЬТЕРНАТИВНЫЕ АКЦЕНТНЫЕ КНОПКИ === */
body.theme-modern-dark .button-accent-alt1 {
    background: linear-gradient(135deg, var(--theme-accent-alt1), #cc9900);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(254, 202, 87, 0.3);
    color: #000;
}

body.theme-modern-dark .button-accent-alt1:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(254, 202, 87, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark .button-accent-alt2 {
    background: linear-gradient(135deg, var(--theme-accent-alt2), #00cc66);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 255, 136, 0.3);
    color: #000;
}

body.theme-modern-dark .button-accent-alt2:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(0, 255, 136, 0.5);
    transform: translateY(-3px);
}

/* === СТЕКЛЯННЫЕ КАРТОЧКИ И ПАНЕЛИ === */

/* Основные контентные секции */
body.theme-modern-dark .content-section {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Safari поддержка */
    border: 1px solid var(--neo-glass-border);
    border-radius: 20px;
    box-shadow:
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Добавляем тонкий градиентный оверлей для глубины */
body.theme-modern-dark .content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .content-section:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 212, 255, 0.1);
}

body.theme-modern-dark .content-section:hover::before {
    opacity: 1;
}

/* Карточки изучения */
body.theme-modern-dark .content-card-bg {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 24px;
    box-shadow:
        0 12px 40px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Специальный эффект "парения" для карточек изучения */
body.theme-modern-dark .content-card-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 212, 255, 0.05) 0%,
            rgba(255, 110, 199, 0.03) 50%,
            rgba(254, 202, 87, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .content-card-bg:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 60px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 30px rgba(0, 212, 255, 0.15),
        0 0 60px rgba(255, 110, 199, 0.08);
}

body.theme-modern-dark .content-card-bg:hover::after {
    opacity: 1;
}

/* Специальные панели с усиленным стеклянным эффектом */
body.theme-modern-dark #daily-reward-section {
    background: linear-gradient(135deg,
            rgba(0, 212, 255, 0.1) 0%,
            rgba(255, 110, 199, 0.05) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid;
    border-image: linear-gradient(135deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary)) 1;
    border-radius: 20px;
    box-shadow:
        0 16px 48px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 40px rgba(0, 212, 255, 0.1);
    animation: modernDarkRewardGlow 3s ease-in-out infinite alternate;
}

@keyframes modernDarkRewardGlow {
    0% {
        box-shadow:
            0 16px 48px rgba(0, 212, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 40px rgba(0, 212, 255, 0.1);
    }

    100% {
        box-shadow:
            0 20px 60px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.25),
            0 0 60px rgba(0, 212, 255, 0.15);
    }
}

/* Панели с градиентными границами */
body.theme-modern-dark .content-section.gradient-border,
body.theme-modern-dark .content-card-bg.gradient-border {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

body.theme-modern-dark .content-section.gradient-border::before,
body.theme-modern-dark .content-card-bg.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg,
            var(--theme-accent-primary) 0%,
            var(--theme-accent-secondary) 25%,
            var(--theme-accent-alt1) 50%,
            var(--theme-accent-alt2) 75%,
            var(--theme-accent-primary) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
    animation: modernDarkBorderFlow 4s linear infinite;
}

@keyframes modernDarkBorderFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Специальные эффекты для разных типов панелей */
body.theme-modern-dark .progress-svg-container {
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 20px auto !important;
    width: 150px !important;
    height: 150px !important;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 40px rgba(255, 110, 199, 0.3)) !important;
}

body.theme-modern-dark .progress-svg-container:hover {
    transform: scale(1.12) translateY(-6px) !important;
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 80px rgba(255, 110, 199, 0.5)) drop-shadow(0 0 120px rgba(254, 202, 87, 0.4)) drop-shadow(0 0 160px rgba(0, 255, 136, 0.3)) !important;
}

/* Стеклянные эффекты для модальных окон и всплывающих панелей */
body.theme-modern-dark .ai-explanation-content,
body.theme-modern-dark #input-ai-explanation-display,
body.theme-modern-dark #mc-ai-explanation-display {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Чат области с стеклянным эффектом */
body.theme-modern-dark #dictation-feedback-message,
body.theme-modern-dark #phrase-audition-feedback-chat-area,
body.theme-modern-dark #phrase-translation-feedback-chat-area {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 12px;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        0 4px 16px var(--neo-glass-shadow);
}

/* Динамические тени для интерактивных элементов */
body.theme-modern-dark .content-section.interactive,
body.theme-modern-dark .content-card-bg.interactive {
    cursor: pointer;
}

body.theme-modern-dark .content-section.interactive:active,
body.theme-modern-dark .content-card-bg.interactive:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow:
        0 8px 24px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Дополнительные стеклянные панели */

/* Секция управления словами */
body.theme-modern-dark #manage-words-section {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 20px;
    box-shadow:
        0 12px 40px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Контейнеры режимов изучения */
body.theme-modern-dark .study-mode-button-container {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow:
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Статистические панели */
body.theme-modern-dark .grid.grid-cols-2,
body.theme-modern-dark .grid.grid-cols-3 {
    gap: 16px;
}

body.theme-modern-dark .grid>div {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow:
        0 4px 16px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .grid>div:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 15px rgba(0, 212, 255, 0.1);
}

/* Специальные эффекты для заголовков в стеклянных панелях */
body.theme-modern-dark .content-section h2,
body.theme-modern-dark .content-card-bg h3 {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
}

body.theme-modern-dark .content-section h2::after,
body.theme-modern-dark .content-card-bg h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    border-radius: 1px;
    opacity: 0.7;
}

/* Улучшенные тултипы */
body.theme-modern-dark .custom-tooltip {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 8px;
    box-shadow:
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: var(--theme-text-primary);
    padding: 8px 12px;
    font-size: 12px;
    max-width: 200px;
    z-index: 1000;
}

/* Стеклянные эффекты для навигации */
body.theme-modern-dark #bottom-nav {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 20px 20px 0 0;
    box-shadow:
        0 -8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

body.theme-modern-dark #bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--theme-accent-primary) 50%,
            transparent 100%);
    opacity: 0.5;
}

/* Анимированные частицы для фона стеклянных панелей */
body.theme-modern-dark .content-section.with-particles::before,
body.theme-modern-dark .content-card-bg.with-particles::before {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 110, 199, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(254, 202, 87, 0.06) 0%, transparent 50%);
    animation: modernDarkParticleFloat 8s ease-in-out infinite;
}

@keyframes modernDarkParticleFloat {

    0%,
    100% {
        background-position: 0% 0%, 100% 100%, 40% 60%;
        opacity: 0.3;
    }

    33% {
        background-position: 30% 30%, 70% 70%, 60% 40%;
        opacity: 0.5;
    }

    66% {
        background-position: 70% 10%, 30% 90%, 20% 80%;
        opacity: 0.4;
    }
}

/* Специальные эффекты для активных состояний */
body.theme-modern-dark .content-section.active,
body.theme-modern-dark .content-card-bg.active {
    border-color: var(--theme-accent-primary);
    box-shadow:
        0 16px 48px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 2px var(--theme-accent-primary),
        0 0 30px rgba(0, 212, 255, 0.3);
}

/* Эффекты загрузки для стеклянных панелей */
body.theme-modern-dark .content-section.loading,
body.theme-modern-dark .content-card-bg.loading {
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .content-section.loading::after,
body.theme-modern-dark .content-card-bg.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: modernDarkShimmerGlass 2s infinite;
}

@keyframes modernDarkShimmerGlass {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Fallback для браузеров без поддержки backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {

    body.theme-modern-dark .content-section,
    body.theme-modern-dark .content-card-bg {
        background: rgba(26, 26, 46, 0.85);
    }

    body.theme-modern-dark #daily-reward-section {
        background: rgba(0, 212, 255, 0.15);
    }

    body.theme-modern-dark #manage-words-section {
        background: rgba(26, 26, 46, 0.9);
    }

    body.theme-modern-dark .study-mode-button-container {
        background: rgba(26, 26, 46, 0.8);
    }

    body.theme-modern-dark .grid>div {
        background: rgba(26, 26, 46, 0.7);
    }
}

/* === НЕОМОРФНЫЕ ИНПУТЫ === */
/* Старые стили закомментированы - используются новые из modern-dark-forms.css */
/*
body.theme-modern-dark .input-field {
    background: var(--theme-bg-content);
    border: none;
    border-radius: 12px;
    box-shadow: 
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-primary);
}

body.theme-modern-dark .input-field:focus {
    box-shadow: 
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 0 2px var(--theme-accent-primary);
}

body.theme-modern-dark .input-field::placeholder {
    color: var(--theme-text-placeholder);
}
*/

/* === СОВРЕМЕННЫЕ ПРОГРЕСС-БАРЫ === */
body.theme-modern-dark .progress-bar {
    background: var(--theme-bg-content);
    border-radius: 20px;
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light);
    overflow: hidden;
    position: relative;
}

body.theme-modern-dark .progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            var(--theme-accent-primary) 0%,
            var(--theme-accent-secondary) 50%,
            var(--theme-accent-alt1) 100%);
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    animation: modernDarkPulse 2s ease-in-out infinite alternate;
}

@keyframes modernDarkPulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    }

    100% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    }
}

/* === МОДАЛЬНЫЕ ОКНА === */
body.theme-modern-dark .modal-bg {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--neo-glass-border) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 60px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    animation: modernDarkModalAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

@keyframes modernDarkModalAppear {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(30px) rotateX(15deg);
        filter: blur(10px);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-5px) rotateX(0deg);
        filter: blur(2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
        filter: blur(0px);
    }
}

/* === СОВРЕМЕННАЯ НАВИГАЦИЯ С АНИМАЦИЯМИ === */

/* Плавающая навигация с неоморфными элементами */
body.theme-modern-dark #bottom-nav {
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.95) 0%,
        rgba(30, 30, 50, 0.98) 50%,
        rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 24px 24px 0 0;
    box-shadow:
        0 -12px 40px rgba(0, 0, 0, 0.6),
        0 -4px 20px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    padding: 8px 4px 12px 4px;
    height: 72px; /* Увеличили высоту для лучших пропорций */
}

/* Анимация плавания навигации */
@keyframes modernDarkNavFloat {
    0% {
        transform: translateY(0px);
        box-shadow:
            0 -12px 40px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    100% {
        transform: translateY(-2px);
        box-shadow:
            0 -16px 48px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.08),
            0 0 20px rgba(0, 212, 255, 0.1);
    }
}

/* Градиентная линия сверху навигации */
body.theme-modern-dark #bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--theme-accent-primary) 25%,
            var(--theme-accent-secondary) 50%,
            var(--theme-accent-alt1) 75%,
            transparent 100%);
    opacity: 0.8;
    animation: modernDarkGradientFlow 3s linear infinite;
}

/* Анимация градиентного потока */
@keyframes modernDarkGradientFlow {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Волновой эффект при переключении страниц */
body.theme-modern-dark #bottom-nav::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--wave-x, 50%) var(--wave-y, 50%),
            rgba(0, 212, 255, 0.2) 0%,
            rgba(255, 110, 199, 0.1) 30%,
            transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-radius: inherit;
}

/* Активация волнового эффекта */
body.theme-modern-dark #bottom-nav.wave-active::after {
    opacity: 1;
    transform: scale(2);
}

/* Чистые элементы навигации без лишних эффектов */
body.theme-modern-dark .nav-item {
    border-radius: 12px;
    padding: 8px 12px;
    margin: 2px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(45, 45, 65, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 0;
    flex: 1;
}

/* Внутреннее свечение для nav-item */
body.theme-modern-dark .nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(0, 0, 0, 0.05) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Неоновое свечение для активных элементов навигации */
body.theme-modern-dark .nav-item.active {
    background: linear-gradient(145deg,
        rgba(0, 150, 200, 0.9) 0%,
        rgba(0, 120, 180, 0.95) 30%,
        rgba(100, 50, 150, 0.9) 70%,
        rgba(80, 40, 130, 0.95) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow:
        0 6px 20px rgba(0, 100, 200, 0.4),
        0 2px 10px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    color: white;
    transform: translateY(-1px);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Анимация свечения активного элемента */
@keyframes modernDarkActiveGlow {
    0% {
        box-shadow:
            6px 6px 12px var(--neo-shadow-dark),
            -6px -6px 12px var(--neo-shadow-light),
            0 0 25px rgba(0, 212, 255, 0.6),
            0 0 50px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow:
            6px 6px 12px var(--neo-shadow-dark),
            -6px -6px 12px var(--neo-shadow-light),
            0 0 35px rgba(0, 212, 255, 0.8),
            0 0 70px rgba(0, 212, 255, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Эффект наведения для неактивных элементов */
body.theme-modern-dark .nav-item:hover:not(.active) {
    background: linear-gradient(145deg, 
        rgba(50, 50, 70, 0.9) 0%,
        rgba(45, 45, 65, 0.95) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: rgba(0, 212, 255, 0.9);
    transform: translateY(-1px);
}

body.theme-modern-dark .nav-item:hover:not(.active)::before {
    opacity: 1;
}

/* Эффект нажатия */
body.theme-modern-dark .nav-item:active {
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light);
    transform: translateY(0) scale(0.98);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Микроанимации для иконок при наведении - горизонтальная компоновка */
body.theme-modern-dark .nav-item .icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    line-height: 1;
}

/* Состояния наведения и активности */
body.theme-modern-dark .nav-item:hover {
    background: rgba(55, 55, 80, 0.6);
    transform: translateY(-1px);
}

body.theme-modern-dark .nav-item:hover .icon {
    color: rgba(0, 200, 255, 0.9);
    transform: scale(1.1);
}

body.theme-modern-dark .nav-item.active {
    background: rgba(65, 65, 90, 0.7);
    border-color: rgba(0, 200, 255, 0.3);
}

body.theme-modern-dark .nav-item.active .icon {
    color: rgba(255, 255, 255, 1);
}

/* Пульсация иконки активного элемента */
@keyframes modernDarkIconPulse {
    0% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    }

    100% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1));
    }
}

/* Специальные анимации для разных иконок */
body.theme-modern-dark .nav-item[data-page="page-home"]:hover .icon {
    animation: modernDarkHomeIconBounce 0.6s ease-in-out;
}

body.theme-modern-dark .nav-item[data-page="page-study"]:hover .icon {
    animation: modernDarkStudyIconGlow 0.8s ease-in-out;
}

body.theme-modern-dark .nav-item[data-page="page-add-word"]:hover .icon {
    animation: modernDarkAddIconPop 0.5s ease-in-out;
}

body.theme-modern-dark .nav-item[data-page="page-courses"]:hover .icon {
    animation: modernDarkCoursesIconFloat 0.7s ease-in-out;
}

body.theme-modern-dark .nav-item[data-page="page-stats"]:hover .icon {
    animation: modernDarkStatsIconPulse 0.6s ease-in-out;
}

/* Анимации для конкретных иконок - спокойные без вращения */
@keyframes modernDarkHomeIconBounce {

    0%,
    100% {
        transform: scale(1.2) translateY(0);
    }

    50% {
        transform: scale(1.3) translateY(-3px);
    }
}

@keyframes modernDarkStudyIconGlow {
    0% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
    }

    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.8));
    }

    100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
    }
}

@keyframes modernDarkAddIconPop {
    0% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1.2);
    }
}

@keyframes modernDarkCoursesIconFloat {

    0%,
    100% {
        transform: scale(1.2) translateY(0);
    }

    25% {
        transform: scale(1.25) translateY(-2px);
    }

    50% {
        transform: scale(1.3) translateY(-4px);
    }

    75% {
        transform: scale(1.25) translateY(-2px);
    }
}

@keyframes modernDarkStatsIconPulse {
    0% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 6px rgba(255, 110, 199, 0.4));
    }

    50% {
        transform: scale(1.35);
        filter: drop-shadow(0 0 10px rgba(255, 110, 199, 0.7));
    }

    100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 6px rgba(255, 110, 199, 0.4));
    }
}

/* Текст навигации - выровнен по центру с иконкой */
body.theme-modern-dark .nav-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    margin: 0;
    padding: 0;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 20px;
}

body.theme-modern-dark .nav-item:hover .nav-text {
    color: rgba(0, 212, 255, 0.95);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

body.theme-modern-dark .nav-item.active .nav-text {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 480px) {
    body.theme-modern-dark .nav-item .icon {
        font-size: 18px;
        margin-bottom: 1px;
    }
    
    body.theme-modern-dark .nav-text {
        font-size: 9px;
        margin-top: 0;
    }
}

@media (max-width: 360px) {
    body.theme-modern-dark .nav-item .icon {
        font-size: 16px;
        margin-bottom: 0;
    }
    
    body.theme-modern-dark .nav-text {
        font-size: 8px;
        margin-top: 0;
    }
}

/* Индикатор активной страницы */
body.theme-modern-dark .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg,
            var(--theme-accent-secondary),
            var(--theme-accent-alt1));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 110, 199, 0.8);
    animation: modernDarkIndicatorPulse 2s ease-in-out infinite alternate;
}

@keyframes modernDarkIndicatorPulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 110, 199, 0.8);
        opacity: 0.8;
    }

    100% {
        box-shadow: 0 0 20px rgba(255, 110, 199, 1);
        opacity: 1;
    }
}

/* Эффект ряби при клике */
body.theme-modern-dark .nav-item {
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .nav-item .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: modernDarkRippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes modernDarkRippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    body.theme-modern-dark .nav-item {
        min-height: 55px;
        padding: 8px 4px;
        margin: 2px;
    }

    body.theme-modern-dark .nav-item .icon {
        font-size: 20px;
        margin-bottom: 2px;
    }

    body.theme-modern-dark .nav-text {
        font-size: 10px;
    }
}

/* Поддержка prefers-reduced-motion для доступности */
@media (prefers-reduced-motion: reduce) {

    body.theme-modern-dark #bottom-nav,
    body.theme-modern-dark .nav-item,
    body.theme-modern-dark .nav-item .icon,
    body.theme-modern-dark .nav-text {
        animation: none !important;
        transition: none !important;
    }

    body.theme-modern-dark .nav-item:hover .icon {
        transform: scale(1.1);
        animation: none;
    }
}

/* === КНОПКИ РЕЖИМОВ ИЗУЧЕНИЯ === */
body.theme-modern-dark #study-mode-mc-button {
    background: linear-gradient(135deg, var(--mode-mc-bg), #0099cc);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.3);
    color: var(--mode-mc-text);
}

body.theme-modern-dark #study-mode-mc-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(0, 212, 255, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark #study-mode-input-button {
    background: linear-gradient(135deg, var(--mode-input-bg), #00cc66);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 255, 136, 0.3);
    color: var(--mode-input-text);
}

body.theme-modern-dark #study-mode-input-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(0, 255, 136, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark #study-mode-audition-button {
    background: linear-gradient(135deg, var(--mode-audition-bg), #1a2a4a);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(30, 42, 74, 0.3);
    color: var(--mode-audition-text);
}

body.theme-modern-dark #study-mode-audition-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(30, 42, 74, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark #study-mode-dictation-button {
    background: linear-gradient(135deg, var(--mode-dictation-bg), #cc9900);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(254, 202, 87, 0.3);
    color: var(--mode-dictation-text);
}

body.theme-modern-dark #study-mode-dictation-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(254, 202, 87, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark #study-mode-phrase-translation-button {
    background: linear-gradient(135deg, var(--mode-phrase-translation-bg), #cc3399);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(255, 110, 199, 0.3);
    color: var(--mode-phrase-translation-text);
}

body.theme-modern-dark #study-mode-phrase-translation-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(255, 110, 199, 0.5);
    transform: translateY(-3px);
}

body.theme-modern-dark #study-mode-phrase-audition-button {
    background: linear-gradient(135deg, var(--mode-phrase-audition-bg), #5a3d99);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(126, 87, 194, 0.3);
    color: var(--mode-phrase-audition-text);
}

body.theme-modern-dark #study-mode-phrase-audition-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(126, 87, 194, 0.5);
    transform: translateY(-3px);
}

/* === КНОПКИ МНОЖЕСТВЕННОГО ВЫБОРА === */
body.theme-modern-dark .mc-option-button {
    background: var(--theme-bg-content);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow:
        6px 6px 12px var(--neo-shadow-dark),
        -6px -6px 12px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-primary);
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .mc-option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .mc-option-button:hover:not(:disabled) {
    border-color: var(--theme-accent-primary);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 15px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

body.theme-modern-dark .mc-option-button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark .mc-option-button.selected {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary));
    border-color: var(--theme-accent-primary);
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.4);
    color: white;
}

body.theme-modern-dark .mc-option-button.correct {
    background: linear-gradient(135deg, var(--theme-success-color), #00cc66);
    border-color: var(--theme-success-color);
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light),
        0 0 20px rgba(0, 255, 136, 0.4);
    color: #000;
}

body.theme-modern-dark .mc-option-button.incorrect {
    background: linear-gradient(135deg, var(--theme-error-color), #cc3333);
    border-color: var(--theme-error-color);
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light),
        0 0 20px rgba(255, 71, 87, 0.4);
    color: white;
}

/* === КНОПКИ-ИКОНКИ === */
body.theme-modern-dark .button-icon-study {
    background: var(--theme-bg-content);
    border-radius: 50%;
    box-shadow:
        4px 4px 8px var(--neo-shadow-dark),
        -4px -4px 8px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-primary);
}

body.theme-modern-dark .button-icon-study:hover:not(:disabled) {
    box-shadow:
        6px 6px 12px var(--neo-shadow-dark),
        -6px -6px 12px var(--neo-shadow-light),
        0 0 10px rgba(0, 212, 255, 0.2);
    transform: translateY(-1px) scale(1.05);
}

body.theme-modern-dark .button-icon-study:active:not(:disabled) {
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light);
    transform: scale(0.95);
}

/* === КНОПКА "ДАЛЕЕ" В РЕЖИМАХ ИЗУЧЕНИЯ === */
body.theme-modern-dark .button-study-next-active {
    background: var(--theme-bg-content);
    border: 2px solid var(--theme-accent-primary);
    border-radius: 12px;
    box-shadow:
        6px 6px 12px var(--neo-shadow-dark),
        -6px -6px 12px var(--neo-shadow-light),
        0 0 15px rgba(0, 212, 255, 0.3);
    color: var(--theme-accent-primary);
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .button-study-next-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 212, 255, 0.1) 0%,
            rgba(0, 212, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .button-study-next-active:hover:not(:disabled) {
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 25px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

body.theme-modern-dark .button-study-next-active:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark .button-study-next-active:active:not(:disabled) {
    box-shadow:
        inset 3px 3px 6px var(--neo-shadow-dark),
        inset -3px -3px 6px var(--neo-shadow-light),
        0 0 10px rgba(0, 212, 255, 0.3);
    transform: translateY(0);
}

/* === СПЕЦИАЛЬНЫЕ ЭФФЕКТЫ === */
body.theme-modern-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
}

/* Анимированные частицы для фона */
body.theme-modern-dark::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 110, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(254, 202, 87, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* === АНИМАЦИИ ЗАГРУЗКИ === */
body.theme-modern-dark .loading-skeleton {
    background: linear-gradient(90deg,
            var(--theme-bg-content) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            var(--theme-bg-content) 75%);
    background-size: 200% 100%;
    animation: modernDarkShimmer 1.5s infinite;
}

@keyframes modernDarkShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* === СПЕЦИАЛЬНЫЕ АНИМАЦИИ ДЛЯ КНОПОК === */
@keyframes modernDarkNeoGlow {
    0% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 20px rgba(0, 212, 255, 0.3);
    }

    50% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 30px rgba(0, 212, 255, 0.5);
    }

    100% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 20px rgba(0, 212, 255, 0.3);
    }
}

@keyframes modernDarkNeoPress {
    0% {
        transform: translateY(0);
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light);
    }

    50% {
        transform: translateY(1px);
        box-shadow:
            4px 4px 8px var(--neo-shadow-dark),
            -4px -4px 8px var(--neo-shadow-light);
    }

    100% {
        transform: translateY(0);
        box-shadow:
            inset 4px 4px 8px var(--neo-shadow-dark),
            inset -4px -4px 8px var(--neo-shadow-light);
    }
}

@keyframes modernDarkNeoRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Эффект ряби для кнопок */
body.theme-modern-dark .button {
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

body.theme-modern-dark .button:focus:not(:active)::after {
    animation: modernDarkNeoRipple 0.6s ease-out;
}

/* Пульсация для активных кнопок */
body.theme-modern-dark .button-primary.active,
body.theme-modern-dark .button-study-next-active {
    animation: modernDarkNeoGlow 2s ease-in-out infinite;
}

/* Эффект встряски для ошибок */
@keyframes modernDarkNeoShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(2px);
    }
}

body.theme-modern-dark .button.error {
    animation: modernDarkNeoShake 0.5s ease-in-out;
}

/* Эффект успеха */
@keyframes modernDarkNeoSuccess {
    0% {
        transform: scale(1);
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 20px rgba(0, 255, 136, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            12px 12px 24px var(--neo-shadow-dark),
            -12px -12px 24px var(--neo-shadow-light),
            0 0 40px rgba(0, 255, 136, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 20px rgba(0, 255, 136, 0.3);
    }
}

body.theme-modern-dark .button.success {
    animation: modernDarkNeoSuccess 0.6s ease-in-out;
}

/* === МИКРОАНИМАЦИИ === */
body.theme-modern-dark * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Специальные переходы для кнопок */
body.theme-modern-dark .button {
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .button:active {
    transition:
        transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === ПОДДЕРЖКА ДОСТУПНОСТИ === */
@media (prefers-reduced-motion: reduce) {
    body.theme-modern-dark * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === ОТКЛЮЧЕННЫЕ КНОПКИ === */
body.theme-modern-dark .button:disabled,
body.theme-modern-dark .button.disabled {
    background: var(--theme-bg-secondary) !important;
    color: var(--theme-text-secondary) !important;
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px rgba(255, 255, 255, 0.02) !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
}

body.theme-modern-dark .button:disabled::before,
body.theme-modern-dark .button:disabled::after,
body.theme-modern-dark .button.disabled::before,
body.theme-modern-dark .button.disabled::after {
    display: none !important;
}

/* === ФОКУС КНОПОК === */
body.theme-modern-dark .button:focus,
body.theme-modern-dark .button:focus-visible {
    outline: none !important;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 0 2px var(--theme-bg-primary),
        0 0 0 4px var(--theme-focus-ring-color);
}

body.theme-modern-dark .button-primary:focus,
body.theme-modern-dark .button-primary:focus-visible {
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.3),
        0 0 0 2px var(--theme-bg-primary),
        0 0 0 4px var(--theme-focus-ring-color);
}

/* === ПЕРЕКЛЮЧАТЕЛИ (TOGGLE) === */
body.theme-modern-dark .toggle-button {
    background: var(--theme-bg-content);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    height: 24px;
    padding: 2px;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

body.theme-modern-dark .toggle-button.active {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary));
    border-color: var(--theme-accent-primary);
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light),
        0 0 15px rgba(0, 212, 255, 0.3);
    color: white;
}

body.theme-modern-dark .toggle-button-slider {
    background: var(--theme-bg-elevated);
    border-radius: 50%;
    box-shadow:
        3px 3px 6px var(--neo-shadow-dark),
        -3px -3px 6px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20px;
    height: 20px;
    position: relative;
    left: 0;
    top: 0;
}

body.theme-modern-dark .toggle-button.active .toggle-button-slider {
    background: white;
    box-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -2px -2px 4px rgba(255, 255, 255, 0.1);
    transform: translateX(18px);
}

/* === КАСТОМНЫЕ ЧЕКБОКСЫ === */
body.theme-modern-dark .custom-checkbox {
    background: var(--theme-bg-content);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .custom-checkbox:checked {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary));
    border-color: var(--theme-accent-primary);
    box-shadow:
        2px 2px 4px var(--neo-shadow-dark),
        -2px -2px 4px var(--neo-shadow-light),
        0 0 10px rgba(0, 212, 255, 0.3);
}

body.theme-modern-dark .custom-checkbox:checked::after {
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

body.theme-modern-dark .custom-checkbox:focus {
    outline: none;
    box-shadow:
        inset 2px 2px 4px var(--neo-shadow-dark),
        inset -2px -2px 4px var(--neo-shadow-light),
        0 0 0 2px var(--theme-focus-ring-color);
}

/* === ОТЗЫВЧИВОСТЬ === */
@media (max-width: 768px) {
    body.theme-modern-dark .button {
        border-radius: 12px;
        box-shadow:
            6px 6px 12px var(--neo-shadow-dark),
            -6px -6px 12px var(--neo-shadow-light);
    }

    body.theme-modern-dark .button:hover:not(:disabled) {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 15px rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    body.theme-modern-dark .content-section {
        border-radius: 16px;
    }

    body.theme-modern-dark .mc-option-button {
        box-shadow:
            4px 4px 8px var(--neo-shadow-dark),
            -4px -4px 8px var(--neo-shadow-light);
    }

    body.theme-modern-dark .mc-option-button:hover:not(:disabled) {
        box-shadow:
            6px 6px 12px var(--neo-shadow-dark),
            -6px -6px 12px var(--neo-shadow-light),
            0 0 10px rgba(0, 212, 255, 0.2);
        transform: translateY(-1px);
    }
}

/*
 ===== СОВРЕМЕННЫЕ ПРОГРЕСС-БАРЫ ===== */

/* Объёмные прогресс-бары с неоморфизмом и внутренним свечением */
body.theme-modern-dark .srs-progress-bar-container {
    background: #0f3460 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 2px 2px 8px rgba(0, 0, 0, 0.4),
        inset -2px -2px 8px rgba(255, 255, 255, 0.05) !important;
    padding: 8px !important;
    position: relative !important;
    overflow: visible !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    gap: 3px !important;
    height: 40px !important;
    min-height: 40px !important;
}

/* Анимированный фон с градиентом */
body.theme-modern-dark .srs-progress-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 212, 255, 0.1),
            transparent);
    animation: neo-progress-shimmer 3s infinite;
    z-index: 0;
}

@keyframes neo-progress-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Сегменты прогресс-бара с 3D эффектом глубины */
body.theme-modern-dark .srs-progress-segment {
    flex: 1 !important;
    position: relative !important;
    border-radius: 12px !important;
    margin: 0 2px !important;
    background: #16213e !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.6),
        inset -1px -1px 3px rgba(255, 255, 255, 0.03) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1 !important;
    height: 100% !important;
    min-height: 24px !important;
}

/* Заливка сегментов с внутренним свечением */
body.theme-modern-dark .srs-progress-segment::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg,
            var(--segment-color-start, #feca57),
            var(--segment-color-end, #ff6ec7)) !important;
    box-shadow:
        0 0 15px var(--segment-glow-color, rgba(254, 202, 87, 0.4)),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 0 !important;
}

/* Цвета для разных уровней SRS с неоновыми акцентами */
body.theme-modern-dark .srs-segment-short {
    --segment-color-start: #feca57;
    --segment-color-end: #ff9ff3;
    --segment-glow-color: rgba(254, 202, 87, 0.5);
}

body.theme-modern-dark .srs-segment-medium {
    --segment-color-start: #ff6ec7;
    --segment-color-end: #00d4ff;
    --segment-glow-color: rgba(255, 110, 199, 0.5);
}

body.theme-modern-dark .srs-segment-long {
    --segment-color-start: #00d4ff;
    --segment-color-end: #00ff88;
    --segment-glow-color: rgba(0, 212, 255, 0.5);
}

body.theme-modern-dark .srs-segment-learned {
    --segment-color-start: #00ff88;
    --segment-color-end: #43e97b;
    --segment-glow-color: rgba(0, 255, 136, 0.6);
}

/* Анимация заполнения с пульсацией */
body.theme-modern-dark .srs-segment-fill-full::before {
    width: 100% !important;
    animation: neo-progress-pulse 2s ease-in-out infinite !important;
}

@keyframes neo-progress-pulse {

    0%,
    100% {
        box-shadow:
            0 0 15px var(--segment-glow-color),
            inset 0 2px 4px rgba(255, 255, 255, 0.2),
            inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow:
            0 0 25px var(--segment-glow-color),
            0 0 35px var(--segment-glow-color),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* Половинное заполнение с градиентом */
body.theme-modern-dark .srs-segment-fill-half::before {
    width: 50% !important;
    background: linear-gradient(90deg,
            var(--segment-color-start) 0%,
            var(--segment-color-end) 50%,
            transparent 50%,
            transparent 100%) !important;
    animation: neo-progress-half-pulse 1.5s ease-in-out infinite !important;
}

@keyframes neo-progress-half-pulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Частицы-эффекты для завершённого прогресса */
body.theme-modern-dark .srs-progress-bar-container.completed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(255, 110, 199, 0.3) 0%, transparent 50%);
    animation: neo-particles-float 4s ease-in-out infinite;
    pointer-events: none;
    border-radius: 20px;
}

@keyframes neo-particles-float {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* Круговой прогресс-бар на главной странице с неоновым свечением */
body.theme-modern-dark .progress-svg__background-circle {
    stroke: var(--theme-bg-content);
    stroke-width: 12;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

body.theme-modern-dark .progress-svg__bar-circle {
    stroke: url(#neoProgressGradient);
    stroke-width: 12;
    filter: drop-shadow(0 0 10px var(--theme-accent-primary));
    animation: neo-progress-glow 3s ease-in-out infinite;
}

@keyframes neo-progress-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px var(--theme-accent-primary));
    }

    50% {
        filter: drop-shadow(0 0 20px var(--theme-accent-primary)) drop-shadow(0 0 30px var(--theme-accent-secondary));
    }
}

body.theme-modern-dark .progress-svg__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    color: var(--theme-text-primary);
    text-shadow: 0 0 10px var(--theme-accent-primary);
}

/* Прогресс-бар курса с анимированными градиентами */
body.theme-modern-dark #course-detail-progress-bar {
    background: linear-gradient(90deg, var(--theme-accent-primary), var(--theme-success-color));
    border-radius: 8px;
    box-shadow:
        0 0 15px rgba(0, 212, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark #course-detail-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: neo-course-progress-shine 2s infinite;
}

@keyframes neo-course-progress-shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Прогресс сессии курса */
body.theme-modern-dark #course-session-progress-bar {
    background: linear-gradient(90deg, var(--theme-accent-secondary), var(--theme-accent-alt1));
    box-shadow: 0 0 10px rgba(255, 110, 199, 0.4);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark #course-session-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.2) 100%);
    animation: neo-session-progress-flow 3s ease-in-out infinite;
}

@keyframes neo-session-progress-flow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    body.theme-modern-dark .srs-progress-bar-container {
        padding: 6px;
        border-radius: 16px;
    }

    body.theme-modern-dark .srs-progress-segment {
        margin: 0 1px;
        border-radius: 10px;
    }

    body.theme-modern-dark .progress-svg-container {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.2));
        animation: none;
    }

    body.theme-modern-dark .progress-svg-container::before {
        animation: none;
    }
}

/* Поддержка prefers-reduced-motion для доступности */
@media (prefers-reduced-motion: reduce) {

    body.theme-modern-dark .srs-progress-segment::before,
    body.theme-modern-dark .srs-progress-bar-container::before,
    body.theme-modern-dark .progress-svg__bar-circle,
    body.theme-modern-dark #course-detail-progress-bar::before,
    body.theme-modern-dark #course-session-progress-bar::after,
    body.theme-modern-dark .srs-progress-bar-container.completed::after {
        animation: none;
    }

    body.theme-modern-dark .srs-progress-segment,
    body.theme-modern-dark .srs-progress-segment::before,
    body.theme-modern-dark .progress-svg-container {
        transition: none;
    }
}

/* Убираем лишние псевдоэлементы с голубыми полосками */
body.theme-modern-dark *::before,
body.theme-modern-dark *::after {
    border-color: transparent !important;
}

body.theme-modern-dark h3.card-mode-title::after,
body.theme-modern-dark .text-center.mb-3::after {
    display: none !important;
}

/* Fallback для браузеров без поддержки backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
    body.theme-modern-dark .srs-progress-bar-container {
        background: rgba(15, 52, 96, 0.9);
    }
}

/ * Увеличиваем размер самого SVG прогресс-бара */ body.theme-modern-dark .progress-svg {
    width: 100% !important;
    height: 100% !important;
    transform: rotate(-90deg) !important;
    display: block !important;
}

/* Убираем любые квадратные контейнеры */
body.theme-modern-dark .progress-svg-container * {
    border-radius: 50% !important;
    background: transparent !important;
}

/* === ИМПОРТ ДОПОЛНИТЕЛЬНЫХ СТИЛЕЙ ДЛЯ ФОРМ В КОНЦЕ === */
/* Импортируем в самом конце для максимального приоритета */
@import url('./modern-dark-forms.css');
@import url('./modern-dark-forms-integration.css');

/* === КРИТИЧЕСКИЕ СТИЛИ С МАКСИМАЛЬНЫМ ПРИОРИТЕТОМ === */
/* Эти стили должны применяться в любом случае */

/* Кнопка сохранения слова - КРИТИЧЕСКИЙ СТИЛЬ */
body.theme-modern-dark .button-primary.button-save-word,
body.theme-modern-dark #save-word-button.button-primary,
body.theme-modern-dark #save-word-button {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary)) !important;
    background-image: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary)) !important;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.3) !important;
    color: white !important;
}

/* === СТЕКЛЯННЫЕ СЕЛЕКТЫ - КРИТИЧЕСКИЙ СТИЛЬ === */
body.theme-modern-dark select.input-field {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;

    /* Кастомная стрелка */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300d4ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 16px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    padding-right: 48px !important;

    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* === ПОИСК С ИКОНКОЙ - КРИТИЧЕСКИЙ СТИЛЬ === */
body.theme-modern-dark .modern-search-input,
body.theme-modern-dark #course-words-search-input {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;

    /* Иконка поиска */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300d4ff'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3e%3c/svg%3e") !important;
    background-position: left 16px center !important;
    background-repeat: no-repeat !important;
    background-size: 18px !important;
    padding-left: 48px !important;
}

/* === КНОПКИ ОЧИСТКИ - КРИТИЧЕСКИЙ СТИЛЬ === */
body.theme-modern-dark .clear-input-btn {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid var(--neo-glass-border) !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--theme-text-secondary) !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;

    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;

    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
}

body.theme-modern-dark .clear-input-btn:hover {
    background: var(--theme-error-color) !important;
    color: white !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow:
        0 4px 16px rgba(255, 71, 87, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* === АНИМИРОВАННЫЕ ЛЕЙБЛЫ - КРИТИЧЕСКИЙ СТИЛЬ === */
body.theme-modern-dark .modern-input-label {
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--theme-text-placeholder) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
    padding: 0 8px !important;
    z-index: 2 !important;
}

body.theme-modern-dark .modern-input-container .input-field:focus+.modern-input-label,
body.theme-modern-dark .modern-input-container .input-field:not(:placeholder-shown)+.modern-input-label,
body.theme-modern-dark .modern-input-container .input-field.has-value+.modern-input-label {
    top: -8px !important;
    left: 16px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--theme-accent-primary) !important;
    background: var(--theme-bg-content) !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6) !important;
    transform: translateY(0) scale(1.1) !important;
}

/* === СООБЩЕНИЯ ОБ ОШИБКАХ - КРИТИЧЕСКИЙ СТИЛЬ === */
body.theme-modern-dark .input-hint.error {
    background: rgba(255, 71, 87, 0.1) !important;
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-top: 8px !important;
    color: rgb(255, 71, 87) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;

    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;

    box-shadow:
        0 4px 12px rgba(255, 71, 87, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;

    animation: modernErrorSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* === HOVER ЭФФЕКТЫ ДЛЯ ВСЕХ ИНТЕРАКТИВНЫХ ЭЛЕМЕНТОВ === */

/* Hover для всех кнопок */
body.theme-modern-dark .button:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 12px 24px var(--neo-shadow-dark),
        0 6px 12px rgba(0, 212, 255, 0.2) !important;
}

/* Hover для инпутов */
body.theme-modern-dark .input-field:hover {
    transform: translateY(-1px) !important;
    box-shadow:
        inset 8px 8px 16px var(--neo-shadow-dark),
        inset -8px -8px 16px var(--neo-shadow-light),
        0 4px 8px rgba(0, 212, 255, 0.1) !important;
}

/* Hover для селектов */
body.theme-modern-dark select.input-field:hover {
    transform: translateY(-1px) !important;
    backdrop-filter: blur(25px) !important;
}

/* Hover для чекбоксов */
body.theme-modern-dark .custom-checkbox:hover {
    transform: scale(1.05) !important;
    box-shadow:
        0 4px 8px rgba(0, 212, 255, 0.3),
        inset 2px 2px 4px var(--neo-shadow-dark) !important;
}

/* Hover для иконочных кнопок */
body.theme-modern-dark .button-icon-study:hover {
    transform: scale(1.1) !important;
    box-shadow:
        0 8px 16px var(--neo-shadow-dark),
        0 4px 8px rgba(0, 212, 255, 0.3) !important;
}

/* Hover для карточек */
body.theme-modern-dark .test-section:hover,
body.theme-modern-dark .content-section:hover,
body.theme-modern-dark .content-card-bg:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 16px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Hover для лейблов */
body.theme-modern-dark .modern-input-label:hover {
    color: var(--theme-accent-secondary) !important;
    text-shadow: 0 0 12px rgba(255, 110, 199, 0.8) !important;
}

/* === ДОПОЛНИТЕЛЬНЫЕ HOVER ЭФФЕКТЫ ДЛЯ ВСЕХ ЭЛЕМЕНТОВ === */

/* Все интерактивные элементы должны иметь cursor: pointer */
body.theme-modern-dark .button,
body.theme-modern-dark .input-field,
body.theme-modern-dark .clear-input-btn,
body.theme-modern-dark select.input-field,
body.theme-modern-dark .custom-checkbox,
body.theme-modern-dark .button-icon-study,
body.theme-modern-dark .modern-submit-button,
body.theme-modern-dark .test-section,
body.theme-modern-dark .content-section,
body.theme-modern-dark .content-card-bg {
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Специальные курсоры для инпутов */
body.theme-modern-dark .input-field,
body.theme-modern-dark select.input-field {
    cursor: text !important;
}

/* Hover для всех элементов с классом button */
body.theme-modern-dark .button-primary:hover,
body.theme-modern-dark .button-secondary:hover,
body.theme-modern-dark .button-success:hover,
body.theme-modern-dark .button-danger:hover,
body.theme-modern-dark .button-warning:hover,
body.theme-modern-dark .button-accent-alt1:hover,
body.theme-modern-dark .button-accent-alt2:hover {
    transform: translateY(-2px) scale(1.02) !important;
    cursor: pointer !important;
}

/* Hover для текстовых элементов */
body.theme-modern-dark .test-title:hover,
body.theme-modern-dark .section-title:hover,
body.theme-modern-dark h1:hover,
body.theme-modern-dark h2:hover,
body.theme-modern-dark h3:hover,
body.theme-modern-dark h4:hover {
    color: var(--theme-accent-primary) !important;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6) !important;
    transition: all 0.3s ease !important;
    cursor: default !important;
}

/* Hover для всех span элементов */
body.theme-modern-dark span:hover {
    transition: all 0.2s ease !important;
    cursor: default !important;
}

/* Hover для всех div элементов с контентом */
body.theme-modern-dark .test-item:hover,
body.theme-modern-dark .test-item-compact:hover,
body.theme-modern-dark .study-card-mock:hover,
body.theme-modern-dark .controls-panel-mock:hover,
body.theme-modern-dark .mock-chat-area:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    cursor: default !important;
}

/* Hover для всех label элементов */
body.theme-modern-dark label:hover {
    color: var(--theme-accent-secondary) !important;
    transition: color 0.2s ease !important;
    cursor: pointer !important;
}

/* Hover для всех p элементов */
body.theme-modern-dark p:hover {
    color: var(--theme-text-primary) !important;
    transition: color 0.2s ease !important;
    cursor: default !important;
}

/* Hover для всех li элементов */
body.theme-modern-dark li:hover {
    color: var(--theme-accent-primary) !important;
    transition: color 0.2s ease !important;
    cursor: default !important;
}

/* Hover для всех textarea элементов */
body.theme-modern-dark textarea:hover {
    transform: translateY(-1px) !important;
    box-shadow:
        inset 8px 8px 16px var(--neo-shadow-dark),
        inset -8px -8px 16px var(--neo-shadow-light),
        0 4px 8px rgba(0, 212, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    cursor: text !important;
}

/* Hover для всех Material Icons */
body.theme-modern-dark .material-symbols-rounded:hover {
    color: var(--theme-accent-primary) !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* Инпуты с inset тенями - КРИТИЧЕСКИЙ СТИЛЬ */
body.theme-modern-dark .input-field,
body.theme-modern-dark select.input-field,
body.theme-modern-dark textarea.input-field {
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
}

/*
 ========================================
   МОДЕРНИЗАЦИЯ МОДАЛЬНЫХ ОКОН
   ======================================== */

/* === ОСНОВНЫЕ СТИЛИ МОДАЛЬНЫХ ОКОН === */
body.theme-modern-dark #edit-word-modal,
body.theme-modern-dark #global-error-modal {
    /* Размытый фон с анимацией */
    background: rgba(26, 26, 46, 0.8) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;

    /* Анимация появления фона */
    animation: modernDarkModalBackdropAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes modernDarkModalBackdropAppear {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }

    100% {
        opacity: 1;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
}

/* === СТЕКЛЯННЫЕ КОНТЕЙНЕРЫ МОДАЛЬНЫХ ОКОН === */
body.theme-modern-dark .modal-bg {
    /* Стеклянный эффект */
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;

    /* Границы с градиентом */
    border: 1px solid transparent !important;
    background-clip: padding-box !important;
    position: relative !important;

    /* Увеличенный радиус для современности */
    border-radius: 28px !important;

    /* Объёмные тени */
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;

    /* Анимация появления с масштабированием */
    animation: modernDarkModalContentAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;

    /* Эффект парения */
    transform-style: preserve-3d !important;
}

/* Анимированная граница */
body.theme-modern-dark .modal-bg::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg,
            var(--theme-accent-primary) 0%,
            var(--theme-accent-secondary) 25%,
            var(--theme-accent-alt1) 50%,
            var(--theme-accent-alt2) 75%,
            var(--theme-accent-primary) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0.6;
    animation: modernDarkBorderGlow 3s linear infinite;
    z-index: -1;
}

@keyframes modernDarkBorderGlow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.9;
    }
}

@keyframes modernDarkModalContentAppear {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(30px) rotateX(15deg);
        filter: blur(10px);
    }

    60% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-5px) rotateX(0deg);
        filter: blur(2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
        filter: blur(0px);
    }
}

/* === ЗАГОЛОВКИ МОДАЛЬНЫХ ОКОН === */
body.theme-modern-dark .modal-bg h3 {
    color: var(--theme-text-primary) !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 1.5rem !important;

    /* Неоновое свечение заголовка */
    text-shadow:
        0 0 10px rgba(0, 212, 255, 0.3),
        0 0 20px rgba(0, 212, 255, 0.1) !important;

    /* Анимация появления заголовка */
    animation: modernDarkTitleAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both !important;
}

@keyframes modernDarkTitleAppear {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        text-shadow: 0 0 0 rgba(0, 212, 255, 0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow:
            0 0 10px rgba(0, 212, 255, 0.3),
            0 0 20px rgba(0, 212, 255, 0.1);
    }
}

/* === КОНТЕНТ МОДАЛЬНЫХ ОКОН === */
body.theme-modern-dark .modal-form-content-wrapper {
    /* Анимация появления контента */
    animation: modernDarkContentSlideIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both !important;
}

@keyframes modernDarkContentSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === КНОПКИ В МОДАЛЬНЫХ ОКНАХ === */
body.theme-modern-dark .modal-bg .button {
    /* Анимация появления кнопок */
    animation: modernDarkButtonsAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both !important;

    /* Дополнительные эффекты для кнопок в модалках */
    position: relative !important;
    overflow: hidden !important;
}

/* Эффект ряби при нажатии */
body.theme-modern-dark .modal-bg .button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

body.theme-modern-dark .modal-bg .button:active::after {
    width: 300px;
    height: 300px;
}

@keyframes modernDarkButtonsAppear {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === СПЕЦИАЛЬНЫЕ ЭФФЕКТЫ ДЛЯ РАЗНЫХ ТИПОВ МОДАЛОК === */

/* Модальное окно редактирования слов */
body.theme-modern-dark #edit-word-modal .modal-bg {
    /* Дополнительное свечение для редактирования */
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Модальное окно ошибок */
body.theme-modern-dark #global-error-modal .modal-bg {
    /* Красноватое свечение для ошибок */
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 71, 87, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-modern-dark #global-error-modal .modal-bg::before {
    background: linear-gradient(135deg,
            var(--theme-error-color) 0%,
            var(--theme-warning-color) 50%,
            var(--theme-error-color) 100%);
}

/* === АНИМАЦИИ ЗАКРЫТИЯ === */
body.theme-modern-dark .modal-bg.closing {
    animation: modernDarkModalContentDisappear 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes modernDarkModalContentDisappear {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        transform: scale(0.8) translateY(20px) rotateX(-10deg);
        filter: blur(5px);
    }
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ === */
@media (max-width: 640px) {
    body.theme-modern-dark .modal-bg {
        margin: 1rem !important;
        border-radius: 24px !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
    }

    body.theme-modern-dark .modal-bg::before {
        border-radius: 24px;
    }

    /* Уменьшенные эффекты для мобильных */
    body.theme-modern-dark .modal-bg {
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow:
            0 15px 50px rgba(0, 0, 0, 0.4),
            0 8px 25px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }
}

/* === ПОДДЕРЖКА PREFERS-REDUCED-MOTION === */
@media (prefers-reduced-motion: reduce) {

    body.theme-modern-dark #edit-word-modal,
    body.theme-modern-dark #global-error-modal {
        animation: none !important;
    }

    body.theme-modern-dark .modal-bg,
    body.theme-modern-dark .modal-bg h3,
    body.theme-modern-dark .modal-form-content-wrapper,
    body.theme-modern-dark .modal-bg .button {
        animation: none !important;
    }

    body.theme-modern-dark .modal-bg::before {
        animation: none !important;
        opacity: 0.6 !important;
    }

    body.theme-modern-dark .modal-bg .button::after {
        transition: none !important;
    }
}

/* === УЛУЧШЕНИЯ ДЛЯ ДОСТУПНОСТИ === */
body.theme-modern-dark .modal-bg:focus-within {
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* === ЧАСТИЦЫ-ЭФФЕКТЫ (ОПЦИОНАЛЬНО) === */
body.theme-modern-dark .modal-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 110, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(254, 202, 87, 0.1) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    animation: modernDarkParticleFloat 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes modernDarkParticleFloat {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0px);
    }

    50% {
        opacity: 0.3;
        transform: translateY(-5px);
    }
}

/* =
== РАСШИРЕННЫЕ СТИЛИ МОДАЛЬНЫХ ОКОН === */

/* Улучшенный фон модального окна с анимированными границами */
body.theme-modern-dark .modal-bg {
    position: relative;
    overflow: hidden;
}

/* Анимированная граница модального окна */
body.theme-modern-dark .modal-bg::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary),
            var(--theme-accent-alt1),
            var(--theme-accent-alt2),
            var(--theme-accent-primary));
    background-size: 400% 400%;
    border-radius: 26px;
    z-index: -1;
    animation: modernDarkModalBorderGlow 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes modernDarkModalBorderGlow {

    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0.6;
    }

    25% {
        background-position: 100% 50%;
        opacity: 0.8;
    }

    50% {
        background-position: 100% 100%;
        opacity: 0.7;
    }

    75% {
        background-position: 0% 100%;
        opacity: 0.9;
    }
}

/* Дополнительное внутреннее свечение */
body.theme-modern-dark .modal-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center,
            rgba(0, 212, 255, 0.05) 0%,
            rgba(255, 110, 199, 0.03) 50%,
            transparent 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

/* Контент модального окна поверх эффектов */
body.theme-modern-dark .modal-bg>* {
    position: relative;
    z-index: 2;
}

/* Дублированная анимация удалена - используется оригинальная выше */

/* Анимация исчезновения модального окна */
body.theme-modern-dark .modal-bg.modal-closing {
    animation: modernDarkModalDisappear 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modernDarkModalDisappear {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        transform: scale(0.8) translateY(20px) rotateX(-10deg);
        filter: blur(5px);
    }
}

/* Улучшенный фон overlay с анимированным размытием */
body.theme-modern-dark #edit-word-modal,
body.theme-modern-dark #global-error-modal {
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    background: rgba(26, 26, 46, 0.4);
    animation: modernDarkOverlayAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modernDarkOverlayAppear {
    0% {
        backdrop-filter: blur(0px) saturate(100%);
        -webkit-backdrop-filter: blur(0px) saturate(100%);
        background: rgba(26, 26, 46, 0);
    }

    100% {
        backdrop-filter: blur(15px) saturate(180%);
        -webkit-backdrop-filter: blur(15px) saturate(180%);
        background: rgba(26, 26, 46, 0.4);
    }
}

/* Стили для заголовков модальных окон */
body.theme-modern-dark .modal-bg h3 {
    background: linear-gradient(135deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

/* Декоративная линия под заголовком */
body.theme-modern-dark .modal-bg h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--theme-accent-primary),
            var(--theme-accent-secondary),
            transparent);
    border-radius: 1px;
    animation: modernDarkTitleUnderline 2s ease-in-out infinite alternate;
}

@keyframes modernDarkTitleUnderline {
    0% {
        width: 40px;
        opacity: 0.6;
    }

    100% {
        width: 80px;
        opacity: 1;
    }
}

/* Улучшенные кнопки в модальных окнах */
body.theme-modern-dark .modal-bg .button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффект волны при нажатии на кнопки в модальных окнах */
body.theme-modern-dark .modal-bg .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 1;
}

body.theme-modern-dark .modal-bg .button:active::before {
    width: 300px;
    height: 300px;
}

/* Специальные стили для кнопок отмены и сохранения */
body.theme-modern-dark .modal-bg #cancel-edit-modal-button {
    background: linear-gradient(135deg,
            rgba(255, 71, 87, 0.1),
            rgba(255, 71, 87, 0.2));
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--theme-error-color);
    box-shadow:
        0 4px 15px rgba(255, 71, 87, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-modern-dark .modal-bg #cancel-edit-modal-button:hover {
    background: linear-gradient(135deg,
            rgba(255, 71, 87, 0.2),
            rgba(255, 71, 87, 0.3));
    box-shadow:
        0 6px 20px rgba(255, 71, 87, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

body.theme-modern-dark .modal-bg #save-edit-modal-button {
    background: linear-gradient(135deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    box-shadow:
        0 4px 15px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-modern-dark .modal-bg #save-edit-modal-button:hover {
    box-shadow:
        0 6px 25px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Анимированные поля ввода в модальных окнах */
body.theme-modern-dark .modal-bg .input-field {
    background: var(--neo-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--neo-glass-border);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body.theme-modern-dark .modal-bg .input-field:focus {
    border-color: var(--theme-accent-primary);
    box-shadow:
        0 0 0 3px rgba(0, 212, 255, 0.1),
        0 4px 15px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

/* Анимированные лейблы */
body.theme-modern-dark .modal-bg label {
    color: var(--theme-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body.theme-modern-dark .modal-bg label::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    border-radius: 2px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .modal-bg .input-field:focus+label::before,
body.theme-modern-dark .modal-bg label:hover::before {
    height: 100%;
}

/* Улучшенная прокрутка в модальных окнах */
body.theme-modern-dark .modal-form-content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent-primary) transparent;
}

body.theme-modern-dark .modal-form-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

body.theme-modern-dark .modal-form-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

body.theme-modern-dark .modal-form-content-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    border-radius: 3px;
}

body.theme-modern-dark .modal-form-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            var(--theme-accent-secondary),
            var(--theme-accent-alt1));
}

/* 
=== СТИЛИ ДЛЯ GIFT МОДАЛЬНОГО ОКНА === */

/* Основной контейнер gift модального окна */
body.theme-modern-dark .gift-modal {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 2px solid var(--neo-glass-border) !important;
    border-radius: 24px !important;
    box-shadow:
        0 25px 80px var(--neo-glass-shadow),
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    animation: modernDarkGiftModalAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

/* Анимированная граница для gift модального окна */
body.theme-modern-dark .gift-modal::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary),
            var(--theme-accent-alt1),
            var(--theme-accent-alt2),
            var(--theme-accent-primary));
    background-size: 400% 400%;
    border-radius: 27px;
    z-index: -1;
    animation: modernDarkGiftBorderGlow 3s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes modernDarkGiftModalAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6) rotateY(20deg);
        filter: blur(15px);
    }

    60% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1) rotateY(-5deg);
        filter: blur(3px);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
        filter: blur(0px);
    }
}

@keyframes modernDarkGiftBorderGlow {

    0%,
    100% {
        background-position: 0% 50%;
        opacity: 0.8;
    }

    25% {
        background-position: 100% 50%;
        opacity: 1;
    }

    50% {
        background-position: 100% 100%;
        opacity: 0.9;
    }

    75% {
        background-position: 0% 100%;
        opacity: 1;
    }
}

/* Внутреннее свечение для gift модального окна */
body.theme-modern-dark .gift-modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center,
            rgba(0, 212, 255, 0.08) 0%,
            rgba(255, 110, 199, 0.05) 40%,
            rgba(254, 202, 87, 0.03) 70%,
            transparent 100%);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

/* Контент gift модального окна поверх эффектов */
body.theme-modern-dark .gift-modal>* {
    position: relative;
    z-index: 2;
}

/* Стили для gift анимации */
body.theme-modern-dark .gift-animation {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4)) !important;
    animation: modernDarkGiftAnimationFloat 3s ease-in-out infinite alternate;
}

@keyframes modernDarkGiftAnimationFloat {
    0% {
        transform: translateY(0px) scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
    }

    100% {
        transform: translateY(-8px) scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
    }
}

/* Стили для текста подарка */
body.theme-modern-dark .gift-text,
body.theme-modern-dark .gift-modal-scrollbox {
    background: var(--neo-glass-bg) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid var(--neo-glass-border) !important;
    border-radius: 16px !important;
    color: var(--theme-text-primary) !important;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Стили для badge подарка */
body.theme-modern-dark .gift-type-badge {
    background: linear-gradient(135deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary)) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    color: var(--theme-button-text-on-accent) !important;
    box-shadow:
        0 4px 15px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    animation: modernDarkGiftBadgePulse 2s ease-in-out infinite alternate;
}

@keyframes modernDarkGiftBadgePulse {
    0% {
        box-shadow:
            0 4px 15px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow:
            0 6px 25px rgba(0, 212, 255, 0.5),
            0 0 20px rgba(0, 212, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Стили для кнопки закрытия gift модального окна */
body.theme-modern-dark .gift-close-btn,
body.theme-modern-dark .gift-modal-close-fixed {
    background: linear-gradient(135deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary)) !important;
    border: none !important;
    border-radius: 16px !important;
    color: var(--theme-button-text-on-accent) !important;
    box-shadow:
        0 4px 15px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark .gift-close-btn:hover,
body.theme-modern-dark .gift-modal-close-fixed:hover {
    box-shadow:
        0 6px 25px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

body.theme-modern-dark .gift-close-btn:active,
body.theme-modern-dark .gift-modal-close-fixed:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow:
        0 2px 10px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Эффект волны для кнопки закрытия */
body.theme-modern-dark .gift-close-btn::before,
body.theme-modern-dark .gift-modal-close-fixed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 1;
}

body.theme-modern-dark .gift-close-btn:active::before,
body.theme-modern-dark .gift-modal-close-fixed:active::before {
    width: 300px;
    height: 300px;
}

/* Overlay для gift модального окна */
body.theme-modern-dark #gift-modal-overlay {
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    background: rgba(26, 26, 46, 0.5) !important;
    animation: modernDarkGiftOverlayAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modernDarkGiftOverlayAppear {
    0% {
        backdrop-filter: blur(0px) saturate(100%);
        -webkit-backdrop-filter: blur(0px) saturate(100%);
        background: rgba(26, 26, 46, 0);
    }

    100% {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        background: rgba(26, 26, 46, 0.5);
    }
}

/* Специальные стили для разных типов подарков */
body.theme-modern-dark .gift-modal--rare::before {
    background: linear-gradient(45deg,
            var(--theme-accent-secondary),
            var(--theme-accent-alt2),
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
}

body.theme-modern-dark .gift-modal--legendary::before {
    background: linear-gradient(45deg,
            var(--theme-accent-alt1),
            var(--theme-accent-primary),
            var(--theme-accent-secondary),
            var(--theme-accent-alt1));
    animation-duration: 2s;
}

body.theme-modern-dark .gift-modal--advice .gift-type-badge {
    background: linear-gradient(135deg,
            var(--theme-success-color),
            var(--theme-accent-alt2)) !important;
}

body.theme-modern-dark .gift-modal--motivation .gift-type-badge {
    background: linear-gradient(135deg,
            var(--theme-warning-color),
            var(--theme-accent-alt1)) !important;
}

/* Улучшенная прокрутка в gift модальном окне */
body.theme-modern-dark .gift-modal-scrollbox {
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent-primary) transparent;
}

body.theme-modern-dark .gift-modal-scrollbox::-webkit-scrollbar {
    width: 6px;
}

body.theme-modern-dark .gift-modal-scrollbox::-webkit-scrollbar-track {
    background: transparent;
}

body.theme-modern-dark .gift-modal-scrollbox::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            var(--theme-accent-primary),
            var(--theme-accent-secondary));
    border-radius: 3px;
}

body.theme-modern-dark .gift-modal-scrollbox::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            var(--theme-accent-secondary),
            var(--theme-accent-alt1));
}

/* === А
НИМАЦИИ ИСЧЕЗНОВЕНИЯ ДЛЯ GIFT МОДАЛЬНОГО ОКНА === */

@keyframes modernDarkGiftModalDisappear {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7) rotateY(-15deg);
        filter: blur(8px);
    }
}

@keyframes modernDarkGiftOverlayDisappear {
    0% {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        background: rgba(26, 26, 46, 0.5);
    }

    100% {
        backdrop-filter: blur(0px) saturate(100%);
        -webkit-backdrop-filter: blur(0px) saturate(100%);
        background: rgba(26, 26, 46, 0);
    }
}

/* === ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ МОДАЛЬНЫХ ОКОН === */

/* Плавные переходы для всех элементов модальных окон */
body.theme-modern-dark .modal-bg *,
body.theme-modern-dark .gift-modal * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшенные фокусы для элементов в модальных окнах */
body.theme-modern-dark .modal-bg button:focus,
body.theme-modern-dark .gift-modal button:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(0, 212, 255, 0.3),
        0 4px 15px rgba(0, 212, 255, 0.2);
}

body.theme-modern-dark .modal-bg input:focus,
body.theme-modern-dark .modal-bg textarea:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(0, 212, 255, 0.1),
        0 4px 15px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Анимированные placeholder'ы */
body.theme-modern-dark .modal-bg input::placeholder,
body.theme-modern-dark .modal-bg textarea::placeholder {
    color: var(--theme-text-placeholder);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .modal-bg input:focus::placeholder,
body.theme-modern-dark .modal-bg textarea:focus::placeholder {
    color: rgba(0, 212, 255, 0.6);
}

/* Улучшенные тени для модальных окон при hover */
body.theme-modern-dark .modal-bg:hover {
    box-shadow:
        0 25px 80px var(--neo-glass-shadow),
        0 0 50px rgba(0, 212, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.theme-modern-dark .gift-modal:hover {
    box-shadow:
        0 30px 100px var(--neo-glass-shadow),
        0 0 60px rgba(0, 212, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Респонсивные улучшения для мобильных устройств */
@media (max-width: 768px) {
    body.theme-modern-dark .modal-bg {
        margin: 16px;
        max-width: calc(100vw - 32px);
        border-radius: 20px;
    }

    body.theme-modern-dark .gift-modal {
        margin: 16px;
        max-width: calc(100vw - 32px);
        border-radius: 20px;
    }

    body.theme-modern-dark .modal-bg::before,
    body.theme-modern-dark .gift-modal::before {
        border-radius: 23px;
    }
}

/* Улучшенная анимация для кнопок в модальных окнах */
body.theme-modern-dark .modal-bg .button,
body.theme-modern-dark .gift-modal button {
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark .modal-bg .button:hover,
body.theme-modern-dark .gift-modal button:hover {
    transform: translateY(-2px) scale(1.02);
}

body.theme-modern-dark .modal-bg .button:active,
body.theme-modern-dark .gift-modal button:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   СПЕЦИАЛЬНЫЕ ЭФФЕКТЫ ДЛЯ РЕЖИМОВ ИЗУЧЕНИЯ
   ======================================== */

/* === MC РЕЖИМ: НЕОМОРФНЫЕ КАРТОЧКИ И КНОПКИ ОТВЕТОВ === */

/* УДАЛЕНО - заменено на простую рамку ниже */

/* УДАЛЕНО - старые сложные стили */

@keyframes mcBackgroundFloat {

    0%,
    100% {
        background-position: 20% 30%, 80% 70%, 50% 50%;
        opacity: 0.6;
    }

    33% {
        background-position: 40% 20%, 60% 80%, 30% 70%;
        opacity: 0.8;
    }

    66% {
        background-position: 70% 40%, 30% 60%, 80% 30%;
        opacity: 0.7;
    }
}

/* Неоморфные кнопки ответов для MC режима */
body.theme-modern-dark .mc-option-button {
    background: var(--theme-bg-content);
    border: none;
    border-radius: 16px;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    letter-spacing: 0.025em;
    margin: 8px 0;
    padding: 16px 20px;
    text-align: left;
    color: var(--theme-text-primary);
    cursor: pointer;
    transform-origin: center;
}

/* Внутреннее свечение для кнопок MC */
body.theme-modern-dark .mc-option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(255, 255, 255, 0.01) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark .mc-option-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-3px) scale(1.02);
}

body.theme-modern-dark .mc-option-button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark .mc-option-button:active:not(:disabled) {
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light);
    transform: translateY(-1px) scale(0.98);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Правильный ответ в MC режиме */
body.theme-modern-dark .mc-option-button.correct {
    background: linear-gradient(135deg, var(--theme-success-color), #00cc66);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 25px rgba(0, 255, 136, 0.4);
    color: #000;
    animation: mcCorrectPulse 0.6s ease-out;
}

@keyframes mcCorrectPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Неправильный ответ в MC режиме */
body.theme-modern-dark .mc-option-button.incorrect {
    background: linear-gradient(135deg, var(--theme-error-color), #cc3333);
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 25px rgba(255, 71, 87, 0.4);
    color: var(--theme-button-text-on-accent);
    animation: mcIncorrectShake 0.5s ease-out;
}

@keyframes mcIncorrectShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Номера вариантов ответов */
body.theme-modern-dark .mc-option-button .mr-2 {
    color: var(--theme-accent-primary);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* === INPUT РЕЖИМ: СТЕКЛЯННЫЕ КАРТОЧКИ И АНИМИРОВАННЫЕ ИНПУТЫ === */

/* ЗАКОММЕНТИРОВАНО - заменено на простую рамку ниже
body.theme-modern-dark #study-card-input-OLD {
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.06) 0%, 
        rgba(26, 26, 46, 0.92) 50%, 
        rgba(0, 212, 255, 0.08) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid transparent;
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 255, 136, 0.12),
        0 12px 40px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    animation: inputCardGlow 5s ease-in-out infinite alternate;
}

/* УДАЛЕНО - старый стиль для Input режима */

@keyframes inputCardGlow {
    0% {
        box-shadow:
            0 20px 60px rgba(0, 255, 136, 0.12),
            0 12px 40px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    100% {
        box-shadow:
            0 25px 80px rgba(0, 255, 136, 0.20),
            0 16px 48px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }
}

/* Плавающие частицы для Input карточки */
body.theme-modern-dark #study-card-input .particles-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 255, 136, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 20% 70%, rgba(255, 110, 199, 0.04) 0%, transparent 40%);
    animation: inputParticlesDrift 12s linear infinite;
    pointer-events: none;
}

@keyframes inputParticlesDrift {
    0% {
        background-position: 30% 20%, 70% 80%, 20% 70%;
        opacity: 0.5;
    }

    25% {
        background-position: 50% 10%, 90% 60%, 10% 90%;
        opacity: 0.7;
    }

    50% {
        background-position: 80% 30%, 60% 40%, 40% 60%;
        opacity: 0.6;
    }

    75% {
        background-position: 60% 70%, 40% 20%, 80% 40%;
        opacity: 0.8;
    }

    100% {
        background-position: 30% 20%, 70% 80%, 20% 70%;
        opacity: 0.5;
    }
}

/* Анимированный инпут для Input режима */
body.theme-modern-dark #answer-input-element {
    background: #0f3460 !important;
    /* Сплошной синий фон */
    background-image: none !important;
    /* Убираем градиент */
    border: 2px solid transparent !important;
    border-radius: 16px;
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-primary);
    font-size: 16px;
    font-weight: 500;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}

/* Анимированная граница при фокусе */
body.theme-modern-dark #answer-input-element::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--theme-success-color) 0%,
            var(--theme-accent-primary) 25%,
            var(--theme-accent-secondary) 50%,
            var(--theme-accent-alt1) 75%,
            var(--theme-success-color) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: inputBorderFlow 3s linear infinite;
}

@keyframes inputBorderFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body.theme-modern-dark #answer-input-element:focus {
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 30px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

body.theme-modern-dark #answer-input-element:focus::before {
    opacity: 1;
}

/* Анимированный placeholder */
body.theme-modern-dark #answer-input-element::placeholder {
    color: var(--theme-text-placeholder);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-modern-dark #answer-input-element:focus::placeholder {
    color: rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

/* Состояния правильного и неправильного ответа */
body.theme-modern-dark #answer-input-element.border-correct {
    border-color: var(--theme-success-color);
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 25px rgba(0, 255, 136, 0.5);
    animation: inputCorrectGlow 0.8s ease-out;
}

@keyframes inputCorrectGlow {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

body.theme-modern-dark #answer-input-element.border-incorrect {
    border-color: var(--theme-error-color);
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 25px rgba(255, 71, 87, 0.5);
    animation: inputIncorrectShake 0.6s ease-out;
}

@keyframes inputIncorrectShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* === АНИМИРОВАННЫЕ ИНДИКАТОРЫ ЖИЗНЕЙ === */

/* Контейнер жизней с неоновым свечением */
body.theme-modern-dark #input-lives-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Анимированный фон для контейнера жизней */
body.theme-modern-dark #input-lives-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 71, 87, 0.1) 0%,
            rgba(255, 165, 2, 0.08) 50%,
            rgba(0, 255, 136, 0.1) 100%);
    animation: livesBackgroundPulse 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes livesBackgroundPulse {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

/* Индивидуальные сердечки */
body.theme-modern-dark #input-lives-container span {
    font-size: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.5));
}

/* Живые сердечки */
body.theme-modern-dark #input-lives-container span.alive {
    animation: heartBeat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 71, 87, 0.8));
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 71, 87, 0.8));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 16px rgba(255, 71, 87, 1));
    }
}

/* Потерянные сердечки */
body.theme-modern-dark #input-lives-container span.lost {
    opacity: 0.3;
    transform: scale(0.8);
    filter: drop-shadow(0 0 4px rgba(100, 100, 100, 0.3));
    animation: heartFade 0.5s ease-out;
}

@keyframes heartFade {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 71, 87, 0.8));
    }

    100% {
        opacity: 0.3;
        transform: scale(0.8);
        filter: drop-shadow(0 0 4px rgba(100, 100, 100, 0.3));
    }
}

/* === РЕЖИМЫ АУДИРОВАНИЯ И ДИКТАНТА === */

/* ЗАКОММЕНТИРОВАНО - заменено на простую рамку ниже
body.theme-modern-dark #study-card-audition-OLD {
    background: linear-gradient(135deg, 
        rgba(126, 87, 194, 0.08) 0%, 
        rgba(26, 26, 46, 0.94) 50%, 
        rgba(255, 110, 199, 0.06) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid;
    border-image: linear-gradient(135deg, 
        #7e57c2, 
        transparent, 
        var(--theme-accent-secondary)) 1;
    border-radius: 24px;
    box-shadow: 
        0 16px 48px rgba(126, 87, 194, 0.15),
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    animation: auditionCardWave 6s ease-in-out infinite;
}

@keyframes auditionCardWave {
    0%, 100% { 
        box-shadow: 
            0 16px 48px rgba(126, 87, 194, 0.15),
            0 8px 32px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }
    50% { 
        box-shadow: 
            0 20px 60px rgba(126, 87, 194, 0.25),
            0 12px 40px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
}

/* Убираем анимацию звуковых волн для аудирования */
body.theme-modern-dark #study-card-audition::before {
    display: none !important;
}

/* Кнопка спикера для диктанта - в стиле аудирования но золотисто-оранжевая */
body.theme-modern-dark #dictation-speaker-button {
    background: linear-gradient(135deg, #feca57, #ff9500) !important;
    border: none !important;
    border-radius: 20px !important;
    width: 80px !important;
    height: 80px !important;
    
    /* Неоморфный эффект с золотисто-оранжевым свечением */
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 30px rgba(254, 202, 87, 0.6),
        0 0 60px rgba(255, 149, 0, 0.3) !important;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    color: white !important;
    font-size: 32px !important;
}

/* Внутреннее свечение для кнопки динамика диктанта */
body.theme-modern-dark #dictation-speaker-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark #dictation-speaker-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 40px rgba(254, 202, 87, 0.8),
        0 0 80px rgba(255, 149, 0, 0.4) !important;
    transform: translateY(-4px) scale(1.1) !important;
}

body.theme-modern-dark #dictation-speaker-button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark #dictation-speaker-button:active:not(:disabled) {
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 25px rgba(254, 202, 87, 0.6) !important;
    transform: translateY(-1px) scale(0.95) !important;
}

body.theme-modern-dark #dictation-speaker-button:active:not(:disabled)::before {
    opacity: 0.5;
}

/* Специальные стили для поля ввода в режиме письменного перевода фразы */
body.theme-modern-dark #phrase-translation-answer-input {
    background: var(--theme-bg-content) !important;
    color: var(--theme-text-primary) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    
    /* Неоморфный вдавленный эффект как у других полей */
    box-shadow: 
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    resize: vertical !important;
    min-height: 96px !important;
}

body.theme-modern-dark #phrase-translation-answer-input::placeholder {
    color: var(--theme-text-placeholder) !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
}

body.theme-modern-dark #phrase-translation-answer-input:focus {
    background: color-mix(in srgb, var(--theme-bg-content) 95%, var(--theme-accent-secondary) 5%) !important;
    color: var(--theme-text-primary) !important;
    
    /* Усиленный вдавленный эффект с розовым свечением */
    box-shadow: 
        inset 8px 8px 16px var(--neo-shadow-dark),
        inset -8px -8px 16px var(--neo-shadow-light),
        0 0 0 2px var(--theme-accent-secondary),
        0 0 20px rgba(255, 110, 199, 0.4),
        0 0 40px rgba(255, 110, 199, 0.2) !important;
    
    transform: scale(1.02) !important;
}

body.theme-modern-dark #phrase-translation-answer-input:focus::placeholder {
    opacity: 0.5 !important;
    transform: translateY(-2px) !important;
    color: var(--theme-accent-secondary) !important;
}

/* Кнопка спикера для письменного перевода фразы - розово-голубая */
body.theme-modern-dark #phrase-translation-speaker-button {
    background: linear-gradient(135deg, #cc4499, #0099cc) !important;
    border: none !important;
    border-radius: 20px !important;
    width: 80px !important;
    height: 80px !important;
    
    /* Неоморфный эффект с розово-голубым свечением */
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 30px rgba(255, 110, 199, 0.6),
        0 0 60px rgba(0, 212, 255, 0.3) !important;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    color: white !important;
    font-size: 32px !important;
}

/* Внутреннее свечение для кнопки динамика письменного перевода */
body.theme-modern-dark #phrase-translation-speaker-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark #phrase-translation-speaker-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 40px rgba(255, 110, 199, 0.8),
        0 0 80px rgba(0, 212, 255, 0.4) !important;
    transform: translateY(-4px) scale(1.1) !important;
}

body.theme-modern-dark #phrase-translation-speaker-button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark #phrase-translation-speaker-button:active:not(:disabled) {
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 25px rgba(255, 110, 199, 0.6) !important;
    transform: translateY(-1px) scale(0.95) !important;
}

body.theme-modern-dark #phrase-translation-speaker-button:active:not(:disabled)::before {
    opacity: 0.5;
}

/* Специальная кнопка проверить для режима письменного перевода фразы */
body.theme-modern-dark #phrase-translation-check-button {
    background: linear-gradient(135deg, #cc4499, #0099cc) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 32px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: white !important;
    
    /* Неоморфный эффект с розово-голубым свечением */
    box-shadow: 
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 20px rgba(255, 110, 199, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2) !important;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

body.theme-modern-dark #phrase-translation-check-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.theme-modern-dark #phrase-translation-check-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 30px rgba(255, 110, 199, 0.6),
        0 0 60px rgba(0, 212, 255, 0.3),
        0 0 100px rgba(255, 110, 199, 0.1) !important;
}

body.theme-modern-dark #phrase-translation-check-button:hover:not(:disabled)::before {
    opacity: 1;
}

body.theme-modern-dark #phrase-translation-check-button:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 15px rgba(255, 110, 199, 0.5) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern-dark #phrase-translation-check-button:disabled {
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: 
        4px 4px 8px var(--neo-shadow-dark),
        -4px -4px 8px var(--neo-shadow-light) !important;
}

/* Кнопка спикера для аудирования */
body.theme-modern-dark #audition-speaker-button {
    background: linear-gradient(135deg, #7e57c2, #9c27b0);
    border: none;
    border-radius: 20px;
    width: 80px;
    height: 80px;
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 25px rgba(126, 87, 194, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

body.theme-modern-dark #audition-speaker-button:hover:not(:disabled) {
    box-shadow:
        12px 12px 24px var(--neo-shadow-dark),
        -12px -12px 24px var(--neo-shadow-light),
        0 0 35px rgba(126, 87, 194, 0.6);
    transform: translateY(-3px) scale(1.05);
}

body.theme-modern-dark #audition-speaker-button:active:not(:disabled) {
    box-shadow:
        inset 4px 4px 8px var(--neo-shadow-dark),
        inset -4px -4px 8px var(--neo-shadow-light),
        0 0 20px rgba(126, 87, 194, 0.5);
    transform: translateY(-1px) scale(0.95);
}

/* Анимация воспроизведения звука */
body.theme-modern-dark #audition-speaker-button.playing {
    animation: speakerPulse 1s ease-in-out infinite;
}

@keyframes speakerPulse {

    0%,
    100% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 25px rgba(126, 87, 194, 0.4);
    }

    50% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 40px rgba(126, 87, 194, 0.8);
    }
}

/* ЗАКОММЕНТИРОВАНО - заменено на простую рамку ниже
body.theme-modern-dark #study-card-dictation-OLD {
    background: linear-gradient(135deg, 
        rgba(254, 202, 87, 0.08) 0%, 
        rgba(26, 26, 46, 0.94) 50%, 
        rgba(255, 165, 2, 0.06) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid;
    border-image: linear-gradient(135deg, 
        var(--theme-accent-alt1), 
        transparent, 
        var(--theme-warning-color)) 1;
    border-radius: 24px;
    box-shadow: 
        0 16px 48px rgba(254, 202, 87, 0.15),
        0 8px 32px var(--neo-glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    animation: dictationCardShimmer 4s ease-in-out infinite alternate;
}

@keyframes dictationCardShimmer {
    0% { 
        box-shadow: 
            0 16px 48px rgba(254, 202, 87, 0.15),
            0 8px 32px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }
    100% { 
        box-shadow: 
            0 20px 60px rgba(254, 202, 87, 0.25),
            0 12px 40px var(--neo-glass-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
}

/* Убираем анимацию пишущей машинки для диктанта */
body.theme-modern-dark #study-card-dictation::after {
    display: none !important;
}

/* Инпут для диктанта с эффектом печати */
body.theme-modern-dark #dictation-answer-input {
    background: var(--theme-bg-content);
    border: 2px solid transparent;
    border-radius: 16px;
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-primary);
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 500;
    padding: 16px 20px;
    position: relative;
}

body.theme-modern-dark #dictation-answer-input:focus {
    border-color: var(--theme-accent-alt1);
    box-shadow:
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 25px rgba(254, 202, 87, 0.4);
    animation: typingFocus 0.3s ease-out;
}

@keyframes typingFocus {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* === ОБЩИЕ УЛУЧШЕНИЯ ДЛЯ ВСЕХ РЕЖИМОВ === */

/* Плавные переходы между карточками */
body.theme-modern-dark .study-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

body.theme-modern-dark .study-card.entering {
    animation: cardEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardEnter {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9) rotateX(15deg);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

body.theme-modern-dark .study-card.leaving {
    animation: cardLeave 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardLeave {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9) rotateX(-15deg);
        filter: blur(10px);
    }
}

/* Улучшенные кнопки "Далее" для всех режимов */
body.theme-modern-dark .button-study-next-active {
    background: linear-gradient(135deg, var(--theme-accent-primary), var(--theme-accent-secondary));
    box-shadow:
        8px 8px 16px var(--neo-shadow-dark),
        -8px -8px 16px var(--neo-shadow-light),
        0 0 25px rgba(0, 212, 255, 0.4);
    animation: nextButtonPulse 2s ease-in-out infinite;
    color: white;
}

@keyframes nextButtonPulse {

    0%,
    100% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 25px rgba(0, 212, 255, 0.4);
    }

    50% {
        box-shadow:
            8px 8px 16px var(--neo-shadow-dark),
            -8px -8px 16px var(--neo-shadow-light),
            0 0 35px rgba(0, 212, 255, 0.6);
    }
}

/* Респонсивные улучшения для мобильных устройств */
@media (max-width: 768px) {
    body.theme-modern-dark .mc-option-button {
        padding: 14px 16px;
        font-size: 14px;
        margin: 6px 0;
    }

    body.theme-modern-dark #answer-input-element,
    body.theme-modern-dark #dictation-answer-input {
        padding: 14px 16px;
        font-size: 16px;
        /* Предотвращает зум на iOS */
    }

    body.theme-modern-dark #input-lives-container span {
        font-size: 24px;
    }

    body.theme-modern-dark #audition-speaker-button {
        width: 70px;
        height: 70px;
    }
}

/* Темная тема для системных элементов */
@media (prefers-color-scheme: dark) {
    body.theme-modern-dark {
        color-scheme: dark;
    }
}

/* === ГРАДИЕНТНЫЕ РАМКИ ДЛЯ РЕЖИМОВ ИЗУЧЕНИЯ === */
/* Добавлено для задачи 8: Реализовать специальные эффекты для режимов изучения */

/* MC Режим - Простая анимированная цветная рамка */
body.theme-modern-dark #study-card-mc {
    border: 3px solid;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
    animation: mcBorderGlow 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
}

@keyframes mcBorderGlow {
    0% {
        border-color: #00d4ff;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    }

    100% {
        border-color: #ff6ec7;
        box-shadow: 0 0 25px rgba(255, 110, 199, 0.4);
    }
}

@keyframes mcGradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes mcCardPulse {
    0% {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.5));
    }
}

/* Input Режим - ПРОСТАЯ АНИМИРОВАННАЯ РАМКА */
body.theme-modern-dark #study-card-input,
body.theme-modern-dark #study-card-input.content-card-bg,
body.theme-modern-dark div#study-card-input {
    border-width: 3px !important;
    border-style: solid !important;
    animation: inputSimpleBorder 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Убираем псевдоэлемент полностью */
body.theme-modern-dark #study-card-input::before {
    display: none !important;
}

@keyframes inputSimpleBorder {
    0% {
        border-color: #00ff88;
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    }

    100% {
        border-color: #00d4ff;
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
    }
}

@keyframes inputGradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes inputCardGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(0, 255, 136, 0.5));
    }
}

/* Audition Режим - Анимированная рамка от фиолетового к красному */
body.theme-modern-dark #study-card-audition {
    border-width: 3px !important;
    border-style: solid !important;
    animation: auditionBorderGlow 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
}

/* Специальные стили для поля ввода в режиме аудирования - в стиле MC/Input */
body.theme-modern-dark #audition-answer-input {
    background: var(--theme-bg-content) !important;
    color: var(--theme-text-primary) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    text-align: center !important;
    
    /* Неоморфный вдавленный эффект как у других полей */
    box-shadow: 
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-modern-dark #audition-answer-input::placeholder {
    color: var(--theme-text-placeholder) !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
}

body.theme-modern-dark #audition-answer-input:focus {
    background: color-mix(in srgb, var(--theme-bg-content) 95%, var(--theme-accent-primary) 5%) !important;
    color: var(--theme-text-primary) !important;
    
    /* Усиленный вдавленный эффект с неоновым свечением */
    box-shadow: 
        inset 8px 8px 16px var(--neo-shadow-dark),
        inset -8px -8px 16px var(--neo-shadow-light),
        0 0 0 2px var(--theme-accent-primary),
        0 0 20px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2) !important;
    
    transform: scale(1.02) !important;
}

body.theme-modern-dark #audition-answer-input:focus::placeholder {
    opacity: 0.5 !important;
    transform: translateY(-2px) !important;
    color: var(--theme-accent-primary) !important;
}

@keyframes auditionBorderGlow {
    0% {
        border-color: #9c27b0;
        box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
    }

    100% {
        border-color: #7e57c2;
        box-shadow: 0 0 25px rgba(126, 87, 194, 0.4);
    }
}

@keyframes auditionGradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes auditionCardGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(126, 87, 194, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(126, 87, 194, 0.5));
    }
}

/* Dictation Режим - Анимированная рамка золотисто-оранжевая */
body.theme-modern-dark #study-card-dictation {
    border-width: 3px !important;
    border-style: solid !important;
    animation: dictationBorderGlow 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
}

@keyframes dictationBorderGlow {
    0% {
        border-color: #feca57;
        box-shadow: 0 0 15px rgba(254, 202, 87, 0.3);
    }

    100% {
        border-color: #ff9500;
        box-shadow: 0 0 25px rgba(255, 149, 0, 0.4);
    }
}

@keyframes dictationGradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes dictationCardShimmer {
    0% {
        filter: drop-shadow(0 0 15px rgba(254, 202, 87, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(254, 202, 87, 0.5));
    }
}

/* Анимированные индикаторы жизней */
body.theme-modern-dark .life-indicator {
    display: inline-block;
    font-size: 24px;
    margin: 0 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 8px rgba(255, 0, 100, 0.6));
    animation: heartBeat 2s ease-in-out infinite;
}

body.theme-modern-dark .life-indicator.lost {
    opacity: 0.3;
    filter: none;
    animation: none;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Специальные эффекты для успеха/ошибки */
body.theme-modern-dark .success-effect {
    animation: successPulse 0.6s ease-out;
}

body.theme-modern-dark .error-effect {
    animation: errorShake 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Phrase Audition Режим - Анимированная рамка фиолетово-пурпурная */
body.theme-modern-dark #study-card-phrase-audition {
    border-width: 3px !important;
    border-style: solid !important;
    animation: phraseAuditionBorderGlow 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
}

@keyframes phraseAuditionBorderGlow {
    0% {
        border-color: #7e57c2;
        box-shadow: 0 0 15px rgba(126, 87, 194, 0.4);
    }

    100% {
        border-color: #9c27b0;
        box-shadow: 0 0 25px rgba(156, 39, 176, 0.5);
    }
}

/* Специальные стили для поля ввода в режиме понимания фразы на слух */
body.theme-modern-dark #phrase-audition-answer-input {
    background: var(--theme-bg-content) !important;
    color: var(--theme-text-primary) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    
    /* Неоморфный вдавленный эффект как у других полей */
    box-shadow: 
        inset 6px 6px 12px var(--neo-shadow-dark),
        inset -6px -6px 12px var(--neo-shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    resize: vertical !important;
    min-height: 96px !important;
}

body.theme-modern-dark #phrase-audition-answer-input::placeholder {
    color: var(--theme-text-placeholder) !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
}

body.theme-modern-dark #phrase-audition-answer-input:focus {
    background: color-mix(in srgb, var(--theme-bg-content) 95%, #7e57c2 5%) !important;
    color: var(--theme-text-primary) !important;
    
    /* Усиленный вдавленный эффект с фиолетовым свечением */
    box-shadow: 
        inset 8px 8px 16px var(--neo-shadow-dark),
        inset -8px -8px 16px var(--neo-shadow-light),
        0 0 0 2px #7e57c2,
        0 0 20px rgba(126, 87, 194, 0.4),
        0 0 40px rgba(126, 87, 194, 0.2) !important;
    
    transform: scale(1.02) !important;
}

body.theme-modern-dark #phrase-audition-answer-input:focus::placeholder {
    opacity: 0.5 !important;
    transform: translateY(-2px) !important;
    color: #7e57c2 !important;
}

/* Phrase Translation Режим - Анимированная рамка розово-голубая */
body.theme-modern-dark #study-card-phrase-translation {
    border-width: 3px !important;
    border-style: solid !important;
    animation: phraseTranslationBorderGlow 4s ease-in-out infinite alternate !important;
    background: var(--theme-bg-content) !important;
}

@keyframes phraseTranslationBorderGlow {
    0% {
        border-color: #ff6ec7;
        box-shadow: 0 0 15px rgba(255, 110, 199, 0.4);
    }

    100% {
        border-color: #00d4ff;
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
    }
}