﻿* {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }



        body {

            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

            background: #0B0E11;

            color: #EAECEF;

            min-height: 100vh;

            overflow-x: hidden;

            overflow-y: auto;

        }



        /* Карточка задания практики */

        .wallet-assignment-card {

            background: linear-gradient(135deg, rgba(30, 35, 41, 0.95), rgba(43, 49, 57, 0.95));

            border-radius: 20px;

            padding: 20px 22px;

            margin-bottom: 20px;

            border: 1px solid rgba(252, 213, 53, 0.25);

            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);

            display: flex;

            flex-direction: column;

            gap: 18px;

        }



        .wallet-assignment-header {

            display: flex;

            align-items: center;

            gap: 14px;

        }



        .wallet-assignment-icon {

            width: 44px;

            height: 44px;

            border-radius: 14px;

            background: rgba(252, 213, 53, 0.15);

            border: 1px solid rgba(252, 213, 53, 0.35);

            display: flex;

            align-items: center;

            justify-content: center;

            font-size: 24px;

        }



        .wallet-assignment-meta {

            display: flex;

            flex-direction: column;

            gap: 6px;

        }



        .wallet-assignment-meta span {

            font-size: 12px;

            letter-spacing: 0.08em;

            text-transform: uppercase;

            color: #848E9C;

        }



        .wallet-assignment-meta h3 {

            margin: 0;

            font-size: 18px;

            color: #FCD535;

            font-weight: 700;

        }



        .wallet-assignment-badge {

            display: inline-flex;

            align-items: center;

            gap: 6px;

            background: rgba(252, 213, 53, 0.12);

            color: #FCD535;

            font-size: 12px;

            padding: 6px 10px;

            border-radius: 999px;

            font-weight: 600;

        }



        .wallet-assignment-table {

            width: 100%;

            border-collapse: collapse;

            background: rgba(11, 14, 17, 0.35);

            border-radius: 16px;

            overflow: hidden;

        }



        .wallet-assignment-table th {

            text-align: left;

            padding: 14px 16px;

            font-size: 13px;

            letter-spacing: 0.05em;

            text-transform: uppercase;

            color: #848E9C;

            background: rgba(252, 213, 53, 0.08);

        }



        .wallet-assignment-table td {

            padding: 14px 16px;

            font-size: 14px;

            color: #EAECEF;

            border-top: 1px solid rgba(255, 255, 255, 0.06);

        }



        .wallet-assignment-table tr:first-child td {

            border-top: none;

        }



        .wallet-assignment-progress {

            margin-top: 16px;

            padding: 16px;

            border-radius: 12px;

            border: 1px solid rgba(252, 213, 53, 0.25);

            background: rgba(252, 213, 53, 0.04);

            display: flex;

            flex-direction: column;

            gap: 10px;

        }



        .wallet-assignment-progress-header {

            display: flex;

            justify-content: space-between;

            align-items: center;

            color: #FCD535;

            font-size: 13px;

            font-weight: 600;

            letter-spacing: 0.04em;

        }



        .wallet-assignment-progress-bar {

            position: relative;

            height: 8px;

            background: rgba(252, 213, 53, 0.12);

            border-radius: 999px;

            overflow: hidden;

        }



        .wallet-assignment-progress-fill {

            height: 100%;

            width: 0%;

            background: linear-gradient(90deg, #FCD535, #F0B90B);

            box-shadow: 0 0 12px rgba(252, 213, 53, 0.4);

            transition: width 0.4s ease;

        }



        @media (max-width: 520px) {

            .wallet-assignment-card {

                padding: 18px;

                gap: 14px;

            }



            .wallet-assignment-header {

                align-items: flex-start;

            }



            .wallet-assignment-table {

                display: block;

                background: transparent;

            }



            .wallet-assignment-table thead {

                display: none;

            }



            .wallet-assignment-table tbody,

            .wallet-assignment-table tr,

            .wallet-assignment-table td {

                display: block;

                width: 100%;

            }



            .wallet-assignment-table tr {

                margin-bottom: 12px;

                border-radius: 12px;

                background: rgba(11, 14, 17, 0.45);

                overflow: hidden;

                border: 1px solid rgba(255, 255, 255, 0.05);

            }



            .wallet-assignment-table td {

                border-top: none;

                padding: 12px 14px;

            }



            .wallet-assignment-table td::before {

                content: attr(data-label);

                display: block;

                font-size: 11px;

                text-transform: uppercase;

                letter-spacing: 0.08em;

                color: #848E9C;

                margin-bottom: 6px;

            }

        }

        #walletPracticeOverlay {

            display: none !important;

        }

        /* Верхняя панель */

                .top-bar {

            background: #181A20;

            padding: 15px 20px;

            box-shadow: 0 2px 10px rgba(0,0,0,0.3);

            display: flex;

            flex-direction: column;

            gap: 16px;

        }




                .level-info {

            display: flex;

            align-items: center;

            gap: 12px;

        }

        .top-bar-header {

            display: flex;

            align-items: center;

            justify-content: space-between;

            gap: 16px;

        }

        .top-bar-actions {

            display: flex;

            align-items: center;

            gap: 12px;

        }

        .top-bar-progress {

            display: flex;

            align-items: center;

            gap: 16px;

        }

        .top-bar-progress .xp-bar {

            flex: 1 1 auto;

        }

        .xp-text {

            display: inline-flex;

            justify-content: flex-end;

            align-items: center;

            font-weight: 600;

            color: #F1F4F8;

            white-space: nowrap;

            text-align: right;

            min-width: 100px;

        }




        .level-badge {

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            padding: 5px 12px;

            border-radius: 20px;

            font-weight: 600;

            font-size: 14px;

        }



        .xp-bar {

            height: 6px;

            background: #252930;

            border-radius: 3px;

            overflow: hidden;

        }



        .xp-progress {

            height: 100%;

            background: linear-gradient(90deg, #FCD535, #F0B90B);

            transition: width 0.5s;

        }



        /* Эффект занавеса */

        .curtain {

            position: fixed;

            top: -100%;

            left: 0;

            width: 100%;

            height: 100%;

            background: linear-gradient(135deg, #1a1d24 0%, #0B0E11 100%);

            z-index: 9999;

            display: flex;

            align-items: center;

            justify-content: center;

            transition: none;

            box-shadow: 0 10px 30px rgba(0,0,0,0.8);

        }



        .curtain::before {

            content: '';

            position: absolute;

            bottom: 0;

            left: 0;

            width: 100%;

            height: 50px;

            background: linear-gradient(to bottom, transparent, rgba(252, 213, 53, 0.3));

            filter: blur(20px);

        }



        .curtain.animating-down {

            animation: curtainDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;

        }



        .curtain.animating-up {

            animation: curtainUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;

        }



        @keyframes curtainDown {

            from {

                top: -100%;

            }

            to {

                top: 0;

            }

        }



        @keyframes curtainUp {

            from {

                top: 0;

            }

            to {

                top: 100%;

            }

        }



        .curtain-content {

            text-align: center;

            opacity: 0;

            animation: fadeIn 0.3s ease-in forwards;

            animation-delay: 0.2s;

        }



        @keyframes fadeIn {

            to {

                opacity: 1;

            }

        }



        .curtain-loader {

            width: 60px;

            height: 60px;

            border: 3px solid rgba(252, 213, 53, 0.1);

            border-top-color: #FCD535;

            border-radius: 50%;

            animation: spin 1s linear infinite;

            margin: 0 auto 20px;

        }



        @keyframes spin {

            to {

                transform: rotate(360deg);

            }

        }



        @keyframes pulse-glow {

            0%, 100% {

                box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);

                border-color: #FCD535;

            }

            50% {

                box-shadow: 0 0 20px rgba(255, 193, 7, 0.6);

                border-color: rgba(255, 193, 7, 0.8);

            }

        }



        @keyframes flash {

            0%, 100% { opacity: 1; }

            50% { opacity: 0.5; }

        }



        @keyframes pulse {

            0%, 100% {

                transform: scale(1);

                box-shadow: 0 0 0 0 rgba(240, 185, 11, 0.7);

            }

            50% {

                transform: scale(1.02);

                box-shadow: 0 0 0 10px rgba(240, 185, 11, 0);

            }

        }



        .curtain-text {

            color: #FCD535;

            font-size: 18px;

            font-weight: 600;

            letter-spacing: 1px;

        }



        /* Экраны */

        .screen {

            display: none;

            padding: 20px;

            height: calc(100vh - 160px);

            overflow-y: auto;

            opacity: 0;

            transition: opacity 0.3s ease;

        }



        .screen.active {

            display: block;

            opacity: 1;

        }



        /* Карточки этапов */

        #stagesContainer {

            display: flex;

            flex-direction: column;

            gap: 18px;

        }



        .premium-stage-group {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 18px;
            padding: 12px 0;
        }

        .premium-stage-group--locked .stage-card {
            opacity: 0.45;
            filter: saturate(0.65);
            transition: opacity 0.3s ease, filter 0.3s ease;
        }

        .premium-lock-overlay {
            position: absolute;
            inset: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 16px;
            padding: 36px 28px;
            border-radius: 26px;
            border: 1.5px solid rgba(255, 215, 0, 0.35);
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(118, 75, 162, 0.18));
            backdrop-filter: blur(10px);
            box-shadow: 0 28px 48px rgba(0, 0, 0, 0.45);
            cursor: pointer;
            z-index: 9;
            color: #EAECEF;
            text-align: center;
            font: inherit;
            transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        }

        .premium-lock-overlay:hover,
        .premium-lock-overlay:focus-visible {
            transform: translateY(-4px);
            border-color: rgba(255, 215, 0, 0.6);
            box-shadow: 0 36px 64px rgba(0, 0, 0, 0.55);
        }

        .premium-lock-overlay:focus-visible {
            outline: 2px solid rgba(255, 215, 0, 0.7);
            outline-offset: 6px;
        }

        .premium-lock-overlay__icon {
            width: clamp(120px, 22vw, 160px);
            aspect-ratio: 1 / 1;
            background: url('../assets/premium-lock.png') center/contain no-repeat;
            filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.4));
            transition: transform 0.25s ease, filter 0.25s ease;
        }

        .premium-lock-overlay:hover .premium-lock-overlay__icon,
        .premium-lock-overlay:focus-visible .premium-lock-overlay__icon {
            transform: scale(1.04);
            filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.48));
        }

        .premium-lock-overlay__title {
            font-size: 20px;
            font-weight: 700;
            color: #FFD700;
            text-shadow: 0 0 18px rgba(255, 215, 0, 0.32);
        }

        .premium-lock-overlay__subtitle {
            font-size: 15px;
            line-height: 1.6;
            max-width: 360px;
            color: rgba(234, 236, 239, 0.85);
        }

        .premium-lock-overlay__hint {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 999px;
            font-size: 14px;
            font-weight: 600;
            color: rgba(147, 197, 253, 0.92);
            background: rgba(37, 99, 235, 0.12);
            border: 1px solid rgba(147, 197, 253, 0.3);
        }

        .premium-lock-overlay__hint--ready {
            color: #0ECB81;
            background: rgba(14, 203, 129, 0.12);
            border-color: rgba(14, 203, 129, 0.35);
        }
        .stage-card {

            position: relative;

            background: linear-gradient(135deg, #1E2026, #14151B);

            border-radius: 20px;

            padding: 22px;

            cursor: pointer;

            transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;

            border: 1px solid rgba(255, 255, 255, 0.04);

            overflow: hidden;

        }



        .stage-card::after {

            content: '';

            position: absolute;

            inset: 0;

            background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 55%);

            opacity: 0;

            transition: opacity 0.3s;

        }



        .stage-card > * {

            position: relative;

            z-index: 1;

        }



        .stage-card:hover:not(.locked) {

            transform: translateY(-4px);

            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

        }



        .stage-card:hover:not(.locked)::after {

            opacity: 1;

        }



        .stage-card.locked {

            opacity: 0.6;

            cursor: not-allowed;

            filter: grayscale(0.2);

        }



        .stage-card.important-stage {

            border: 1px solid rgba(252, 213, 53, 0.55);

            box-shadow: 0 12px 32px rgba(252, 213, 53, 0.22);

        }



        .stage-card.locked .stage-icon {

            opacity: 0.35;

        }



        .stage-card {

            position: relative;

            background: linear-gradient(135deg, #1E2026, #14151B);

            border-radius: 20px;

            padding: 22px;

            margin-bottom: 18px;

            cursor: pointer;

            transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;

            border: 1px solid rgba(255, 255, 255, 0.04);

            overflow: hidden;

        }



        .stage-card::after {

            content: '';

            position: absolute;

            inset: 0;

            background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 55%);

            opacity: 0;

            transition: opacity 0.3s;

        }



        .stage-card > * {

            position: relative;

            z-index: 1;

        }



        .stage-card:hover:not(.locked) {

            transform: translateY(-4px);

            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

        }



        .stage-card:hover:not(.locked)::after {

            opacity: 1;

        }



        .stage-card.locked {

            opacity: 0.6;

            cursor: not-allowed;

            filter: grayscale(0.2);

        }



        .stage-card.important-stage {

            border: 1px solid rgba(252, 213, 53, 0.55);

            box-shadow: 0 12px 32px rgba(252, 213, 53, 0.22);

        }



        .stage-card.locked .stage-icon {

            opacity: 0.35;

        }

        .stage-number.important {



            background: linear-gradient(135deg, #FCD535, #F0B90B);



            color: #0B0E11;



            font-weight: 700;



        }

        @media (max-width: 768px) {
            #stagesContainer {

                gap: 16px;

            }

            .stage-card {

                padding: 18px;

                border-radius: 18px;

                box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);

            }



            .stage-card::after {

                opacity: 0.2;

            }

            .stage-card:hover:not(.locked),

            .stage-card:active:not(.locked) {

                transform: none !important;

                box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);

            }



            .stage-card:hover:not(.locked)::after,

            .stage-card:active:not(.locked)::after {

                opacity: 0.25;

            }

        }



        @media (hover: none) and (pointer: coarse) {

            .stage-card:hover:not(.locked),

            .stage-card:active:not(.locked) {

                transform: none;

                box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);

            }



            .stage-card:hover:not(.locked)::after,

            .stage-card:active:not(.locked)::after {

                opacity: 0.25;

            }

        }







        .stage-title .stage-important-badge {



            margin-left: 10px;



            display: inline-block;



            padding: 3px 10px;



            background: rgba(252, 213, 53, 0.18);



            color: #FCD535;



            font-size: 12px;



            font-weight: 600;



            border-radius: 999px;



            text-transform: uppercase;



            letter-spacing: 0.6px;



        }







        .stage-header {

            display: flex;

            align-items: center;

            gap: 15px;

            margin-bottom: 10px;

        }



        .stage-number {

            background: rgba(255, 255, 255, 0.08);

            width: 40px;

            height: 40px;

            border-radius: 14px;

            display: flex;

            align-items: center;

            justify-content: center;

            font-weight: 600;

            font-size: 15px;

            backdrop-filter: blur(6px);

            border: 1px solid rgba(255, 255, 255, 0.08);

        }



        .stage-title {

            flex: 1;

            font-size: 18px;

            font-weight: 600;

        }



        .stage-icon {

            font-size: 20px;

        }



        .stage-description {

            color: #848E9C;

            font-size: 14px;

            margin-bottom: 15px;

        }



        .stage-info {

            display: flex;

            justify-content: space-between;

            align-items: center;

            color: #848E9C;

            font-size: 13px;

        }



        .progress-bar {

            height: 4px;

            background: #252930;

            border-radius: 2px;

            overflow: hidden;

            margin-top: 10px;

        }



        .progress-fill {

            height: 100%;

            background: #0ECB81;

            transition: width 0.3s;

        }



        /* Карта уровней */

        

                        .levels-grid.base-stage {

            display: flex;

            flex-direction: column;

            gap: 34px;

            padding: 32px 0 40px;

            width: 100%;

            max-width: 420px;

            margin: 0 auto;

        }



        .lesson-row {

            display: flex;

            gap: 32px;

            justify-content: flex-start;

            align-items: flex-start;

            width: 100%;

        }



        .lesson-row.reverse {

            flex-direction: row-reverse;

            justify-content: flex-start;

        }



        /* Стили для змейки уроков */

        .levels-grid.snake-stage {

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 0;

            padding: 32px 20px 40px;

            width: 100%;

            max-width: 400px;

            margin: 0 auto;

            position: relative;

        }



        .snake-container {

            position: relative;

            width: 100%;

            display: flex;

            flex-direction: column;

            align-items: center;

        }



        .snake-path {

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            pointer-events: none;

            z-index: 1;

        }



        .snake-path svg {

            width: 100%;

            height: 100%;

        }



        .snake-curve {

            fill: none;

            stroke: #8B9DC3;

            stroke-width: 3;

            stroke-linecap: round;

            stroke-linejoin: round;

            opacity: 0.3;

            filter: blur(0.5px);

        }



        /* Стили для гладких линий змейки */

        :root {

            --snake-curve-radius: 15px;  /* Радиус закругления */

            --snake-line-width: 3px;     /* Толщина линии */

            --snake-line-color: #8B9DC3; /* Цвет линии */

        }



        /* Альтернативные линии - простые border-radius блоки */

        .snake-connection {

            position: absolute;

            background: var(--snake-line-color);

            border-radius: var(--snake-curve-radius);

            opacity: 0.25;

            z-index: 1;

            filter: blur(0.3px);

        }



        .snake-connection.vertical {

            width: var(--snake-line-width);

        }



        .snake-connection.horizontal {

            height: var(--snake-line-width);

        }



        .snake-connection.corner {

            border-radius: calc(var(--snake-curve-radius) * 1.5);

            box-shadow: 0 0 8px rgba(139, 157, 195, 0.1);

        }



        /* Панель настроек змейки */

        .snake-controls {

            position: fixed;

            top: 20px;

            right: 20px;

            background: rgba(24, 26, 32, 0.95);

            padding: 15px;

            border-radius: 12px;

            border: 1px solid #404040;

            z-index: 1000;

            min-width: 200px;

            backdrop-filter: blur(10px);

        }



        .snake-controls h4 {

            margin-bottom: 10px;

            color: #FCD535;

            font-size: 14px;

        }



        .control-group {

            margin-bottom: 12px;

        }



        .control-group label {

            display: block;

            font-size: 12px;

            color: #C6D4FF;

            margin-bottom: 5px;

        }



        .control-buttons {

            display: flex;

            gap: 5px;

            align-items: center;

        }



        .control-btn {

            background: #2D3748;

            border: none;

            color: white;

            padding: 4px 8px;

            border-radius: 4px;

            cursor: pointer;

            font-size: 12px;

            transition: background 0.2s;

        }



        .control-btn:hover {

            background: #4A5568;

        }



        .control-value {

            background: #1A1D24;

            border: 1px solid #404040;

            color: white;

            padding: 4px 8px;

            border-radius: 4px;

            font-size: 12px;

            min-width: 50px;

            text-align: center;

        }



        .toggle-controls {

            position: fixed;

            top: 20px;

            right: 20px;

            background: #FCD535;

            color: #0B0E11;

            border: none;

            padding: 8px 12px;

            border-radius: 8px;

            cursor: pointer;

            font-weight: 600;

            z-index: 1001;

        }



        /* Стили для перетаскивания */

        .snake-item.draggable {

            cursor: move;

            user-select: none;

        }



        .snake-item.dragging {

            opacity: 0.8;

            z-index: 1000;

            transform: scale(1.1);

            transition: none;

        }



        .snake-item.draggable:hover {

            transform: scale(1.05);

        }



        .drag-mode-toggle {

            position: fixed;

            bottom: 20px;

            right: 20px;

            background: #10B981;

            color: white;

            border: none;

            padding: 12px 16px;

            border-radius: 8px;

            cursor: pointer;

            font-weight: 600;

            z-index: 1001;

            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);

        }



        .drag-mode-toggle.active {

            background: #EF4444;

        }



        .snake-item {

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 8px;

            margin-bottom: 25px;

            position: relative;

            z-index: 3;

        }



        .snake-item:last-child {

            margin-bottom: 0;

        }



        /* Красивая дугообразная змейка */

        .snake-item:nth-child(1) { transform: translateX(0px); }

        .snake-item:nth-child(2) { transform: translateX(30px); }

        .snake-item:nth-child(3) { transform: translateX(55px); }

        .snake-item:nth-child(4) { transform: translateX(75px); }

        .snake-item:nth-child(5) { transform: translateX(85px); }

        .snake-item:nth-child(6) { transform: translateX(75px); }

        .snake-item:nth-child(7) { transform: translateX(55px); }

        .snake-item:nth-child(8) { transform: translateX(30px); }

        .snake-item:nth-child(9) { transform: translateX(0px); }

        .snake-item:nth-child(10) { transform: translateX(-30px); }

        .snake-item:nth-child(11) { transform: translateX(-55px); }

        .snake-item:nth-child(12) { transform: translateX(-75px); }

        .snake-item:nth-child(13) { transform: translateX(-85px); }

        .snake-item:nth-child(14) { transform: translateX(-75px); }

        .snake-item:nth-child(15) { transform: translateX(-55px); }

        .snake-item:nth-child(16) { transform: translateX(-30px); }

        .snake-item:nth-child(17) { transform: translateX(0px); }

        .snake-item:nth-child(18) { transform: translateX(30px); }

        .snake-item:nth-child(19) { transform: translateX(55px); }

        .snake-item:nth-child(20) { transform: translateX(75px); }

        .snake-item:nth-child(21) { transform: translateX(85px); }

        .snake-item:nth-child(22) { transform: translateX(75px); }

        .snake-item:nth-child(23) { transform: translateX(55px); }

        .snake-item:nth-child(24) { transform: translateX(30px); }

        .snake-item:nth-child(25) { transform: translateX(0px); }

        .snake-item:nth-child(26) { transform: translateX(-30px); }



        .snake-item .level-node {

            width: 60px;

            height: 60px;

            border-radius: 50%;

            display: flex;

            align-items: center;

            justify-content: center;

            font-weight: 600;

            font-size: 18px;

            transition: all 0.3s ease;

            border: 3px solid transparent;

            position: relative;

            background: #252930;

            color: #ADB9FF;

            cursor: pointer;

        }



        .snake-item .level-node.completed {

            background: linear-gradient(135deg, #10B981, #059669);

            color: white;

            border-color: #10B981;

            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);

        }



        .snake-item .level-node.current {

            background: linear-gradient(135deg, #4A90E2, #357ABD);

            color: white;

            border-color: #4A90E2;

            animation: pulse 2s infinite;

        }



        .snake-item .level-node.locked {

            background: #1A1D24;

            color: #4A5568;

            border-color: #2D3748;

            cursor: not-allowed;

            opacity: 0.6;

        }



        .snake-item .level-node:hover:not(.locked) {

            transform: scale(1.05);

            box-shadow: 0 6px 25px rgba(74, 144, 226, 0.3);

        }



        .snake-item .lesson-label {

            font-size: 12px;

            color: #C6D4FF;

            text-align: center;

            line-height: 1.3;

            width: 100px;

            max-width: 100px;

            word-break: break-word;

            pointer-events: none;

            font-weight: 500;

            overflow: hidden;

            display: -webkit-box;

            -webkit-line-clamp: 3;

            -webkit-box-orient: vertical;

            hyphens: auto;

        }



        .lesson-item {

            position: relative;

        }



        .lesson-stars {

            position: absolute;

            top: -8px;

            right: -8px;

            font-size: 14px;

            line-height: 1;

            pointer-events: none;

            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);

            z-index: 10;

        }



        .snake-item .lesson-stars {

            /* Унаследует общие стили */

        }



        @keyframes pulse {

            0%, 100% {

                box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);

            }

            50% {

                box-shadow: 0 6px 30px rgba(74, 144, 226, 0.8);

            }

        }



        .levels-grid.base-stage .lesson-item {

            position: relative;

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 12px;

            min-width: 92px;

        }



        .levels-grid.base-stage .lesson-label {

            font-size: 13px;

            color: #C6D4FF;

            text-align: center;

            line-height: 1.4;

            max-width: 140px;

            word-break: break-word;

            pointer-events: none;

        }



        

        .levels-grid.security-stage {

            display: flex;

            flex-wrap: wrap;

            justify-content: center;

            align-items: flex-start;

            gap: 28px 36px;

            padding: 36px 0;

            width: 100%;

            max-width: 560px;

            margin: 0 auto;

            transform: rotate(-2deg);

        }



        .levels-grid.security-stage .lesson-item {

            position: relative;

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 10px;

            min-width: 92px;

            transform: rotate(2deg);

            transition: transform 0.3s ease;

        }



        .levels-grid.security-stage .lesson-item:nth-child(4n+2) {

            transform: translateY(-14px) rotate(2deg);

        }



        .levels-grid.security-stage .lesson-item:nth-child(4n+3) {

            transform: translateY(12px) rotate(-1.5deg);

        }



        .levels-grid.security-stage .lesson-item:nth-child(4n) {

            transform: translateY(-8px) rotate(1deg);

        }



        .levels-grid.security-stage .lesson-item .level-node {

            transition: transform 0.3s ease;

        }



        .levels-grid.security-stage .lesson-item:hover .level-node:not(.locked) {

            transform: scale(1.05);

        }



        .levels-grid.security-stage .lesson-label {

            font-size: 12px;

            color: #ADB9FF;

            text-align: center;

            line-height: 1.4;

            max-width: 140px;

            word-break: break-word;

            pointer-events: none;

            transform: rotate(-2deg);

        }



        body.theme-light .levels-grid.security-stage .lesson-label {

            color: #0F1A37;

        }

body.theme-light .levels-grid.base-stage .lesson-label {

            color: #1F2937;

        }



        /* Стили для змейки в светлой теме */

        body.theme-light .snake-item .level-node {

            background: #F3F4F6;

            color: #374151;

        }



        body.theme-light .snake-item .level-node.locked {

            background: #E5E7EB;

            color: #9CA3AF;

        }



        body.theme-light .snake-item .lesson-label {

            color: #374151;

        }





        .level-node {

            width: 80px;

            height: 80px;

            border-radius: 50%;

            background: #181A20;

            display: flex;

            align-items: center;

            justify-content: center;

            font-size: 24px;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.3s;

            box-shadow: 0 4px 10px rgba(0,0,0,0.3);

        }



        .level-node.completed {

            background: linear-gradient(135deg, #10B981, #059669);

            color: white;

            border-color: #10B981;

            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);

        }



        .level-node.current {

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            animation: pulse 2s infinite;

        }



        .level-node.locked {

            opacity: 0.5;

            cursor: not-allowed;

        }



        @keyframes pulse {

            0%, 100% { transform: scale(1); }

            50% { transform: scale(1.1); }

        }



        /* Контент урока */

        .lesson-header {

            display: flex;

            align-items: center;

            gap: 15px;

            margin-bottom: 20px;

        }



        .back-btn {

            background: none;

            border: none;

            color: #FCD535;

            font-size: 24px;

            cursor: pointer;

        }



        .lesson-content {

            line-height: 1.6;

        }



        .lesson-content h2 {

            margin-bottom: 20px;

            color: #FCD535;

            flex-direction: column;

            gap: 2px;

        }



        .lesson-content h3 {

            margin: 20px 0 10px;

            color: #F0B90B;

        }



        .lesson-content p {

            margin-bottom: 15px;

            color: #848E9C;

        }



        .key-point {

            background: #181A20;

            border-left: 3px solid #FCD535;

            padding: 15px;

            margin: 20px 0;

            border-radius: 8px;

        }



        .key-point strong {

            color: #FCD535;

        }



        /* Квиз */

        .quiz-option {

            background: #181A20;

            padding: 15px;

            border-radius: 12px;

            margin-bottom: 12px;

            cursor: pointer;

            transition: all 0.3s;

            display: flex;

            align-items: center;

            gap: 12px;

        }



        .quiz-option:hover {

            transform: translateX(5px);

        }



        .quiz-option.correct {

            background: #0ECB81;

            color: white;

        }



        .quiz-option.wrong {

            background: #F6465D;

            color: white;

        }



        .quiz-option.disabled {

            cursor: not-allowed;

            opacity: 0.6;

        }



        /* Кнопки */

        .btn-primary {

            width: 100%;

            padding: 15px;

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            border: none;

            border-radius: 12px;

            font-size: 16px;

            font-weight: 600;

            cursor: pointer;

            margin-top: 20px;

        }



        .btn-primary:disabled {

            opacity: 0.5;

            cursor: not-allowed;

        }



        .btn-primary.completed {

            background: #0ECB81;

            cursor: default;

        }



        .btn-secondary {

            width: 100%;

            padding: 12px;

            background: transparent;

            border: 2px solid #F0B90B;

            color: #F0B90B;

            border-radius: 12px;

            font-size: 15px;

            font-weight: 600;

            cursor: pointer;

            margin-top: 12px;

            transition: all 0.2s ease;

        }



        .btn-secondary:hover {

            background: rgba(240, 185, 11, 0.12);

        }



        .btn-secondary:active {

            background: rgba(240, 185, 11, 0.2);

        }



        .hidden {

            display: none !important;

        }



        .btn-exit {

            width: 100%;

            padding: 15px;

            background: linear-gradient(135deg, #FF6B6B, #FF5252);

            color: #FFFFFF;

            border: none;

            border-radius: 16px;

            font-size: 16px;

            font-weight: 600;

            cursor: pointer;

            display: flex;

            align-items: center;

            justify-content: center;

            gap: 8px;

            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

            position: relative;

            overflow: hidden;

        }



        .btn-exit:hover {

            background: linear-gradient(135deg, #FF5252, #FF4444);

        }



        .btn-exit:active {

            background: linear-gradient(135deg, #FF4444, #FF3333);

        }



        .btn-exit::before {

            content: '';

            position: absolute;

            top: 0;

            left: -100%;

            width: 100%;

            height: 100%;

            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);

            transition: left 0.5s;

        }



        .btn-exit:hover::before {

            left: 100%;

        }



        .exit-icon {

            font-size: 18px;

            animation: pulse 2s infinite;

        }



        @keyframes pulse {

            0%, 100% {

                transform: scale(1);

            }

            50% {

                transform: scale(1.1);

            }

        }



        /* Story Mode стили */

        .story-menu {

            padding: 20px;

        }



        .episodes-grid {

            display: flex;

            flex-direction: column;

            gap: 15px;

        }



        .episode-card {

            background: #252930;

            border-radius: 16px;

            padding: 20px;

            display: flex;

            align-items: center;

            gap: 15px;

            cursor: pointer;

            transition: all 0.3s ease;

            border: 2px solid transparent;

        }



        .episode-card.available {

            border-color: #FCD535;

            box-shadow: 0 4px 20px rgba(252, 213, 53, 0.2);

        }



        .episode-card.available:hover {

            transform: translateY(-2px);

            box-shadow: 0 8px 30px rgba(252, 213, 53, 0.3);

        }



        .episode-card.locked {

            opacity: 0.6;

            cursor: not-allowed;

        }



        .episode-number {

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            width: 50px;

            height: 50px;

            border-radius: 25px;

            display: flex;

            align-items: center;

            justify-content: center;

            font-weight: bold;

            font-size: 18px;

        }



        .episode-card.locked .episode-number {

            background: #3A3F47;

            color: #6B7280;

        }



        .episode-card.completed {

            border: 2px solid #0ECB81;

            background: linear-gradient(135deg, rgba(14, 203, 129, 0.1), rgba(14, 203, 129, 0.05));

        }



        .episode-card.completed .episode-number {

            background: #0ECB81;

            color: #1E2329;

            font-weight: bold;

        }



        .episode-card.completed .episode-title {

            color: #0ECB81;

        }



        .episode-info {

            flex: 1;

        }



        .episode-title {

            font-size: 18px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 5px;

        }



        .episode-date {

            font-size: 14px;

            color: #FCD535;

            margin-bottom: 8px;

        }



        .episode-description {

            font-size: 14px;

            color: #9CA3AF;

            line-height: 1.4;

        }



        .episode-status {

            font-size: 24px;

        }



        /* Story Game */

        .story-game {

            padding: 20px;

        }



        .story-context {

            display: flex;

            justify-content: space-between;

            align-items: center;

            background: #252930;

            padding: 15px 20px;

            border-radius: 12px;

            margin-bottom: 20px;

        }



        .story-date {

            font-size: 14px;

            color: #9CA3AF;

        }



        .story-price {

            font-size: 16px;

            color: #FCD535;

            font-weight: 600;

        }



        .story-narrative {

            background: #1E2329;

            border-left: 4px solid #FCD535;

            padding: 20px;

            border-radius: 12px;

            margin-bottom: 20px;

        }



        .story-text {

            font-size: 16px;

            line-height: 1.6;

            color: #EAECEF;

        }



        .story-chart-container {

            background: #252930;

            border-radius: 12px;

            padding: 20px;

            margin-bottom: 20px;

            text-align: center;

        }



        .story-choices {

            display: flex;

            flex-direction: column;

            gap: 12px;

        }



        .choice-btn {

            background: #252930;

            color: #EAECEF;

            border: 2px solid #3A3F47;

            border-radius: 12px;

            padding: 15px 20px;

            font-size: 16px;

            cursor: pointer;

            transition: all 0.3s ease;

            text-align: left;

        }



        .choice-btn:hover {

            border-color: #FCD535;

            background: #2A2F36;

            transform: translateX(5px);

        }



        .choice-btn:active {

            transform: scale(0.98);

        }



        .choice-btn.primary {

            background: linear-gradient(135deg, #FCD535, #FFD700);

            color: #1A1A1A;

            border-color: #FFD700;

            font-weight: bold;

        }



        .choice-btn.primary:hover {

            background: linear-gradient(135deg, #FFD700, #FCD535);

            transform: translateX(5px) scale(1.05);

        }



        .choice-btn.secondary {

            background: #3A3F47;

            color: #AAAAAA;

            border-color: #555555;

        }



        .choice-btn.secondary:hover {

            background: #4A4F57;

            color: #CCCCCC;

        }



        .choice-btn.disabled {

            background: #2A2A2A;

            color: #666666;

            border-color: #333333;

            cursor: not-allowed;

        }



        /* Slider Choice Styles */

        .slider-choice {

            background: linear-gradient(135deg, #2A2F36, #1E2329);

            border: 2px solid #3A3F47;

            border-radius: 15px;

            padding: 20px;

            margin: 10px 0;

            transition: all 0.3s ease;

        }



        .slider-choice:hover {

            border-color: #FCD535;

            box-shadow: 0 5px 15px rgba(252, 213, 53, 0.2);

        }



        .choice-header {

            text-align: center;

            margin-bottom: 20px;

        }



        .choice-header h4 {

            color: #FCD535;

            margin: 0 0 10px 0;

            font-size: 18px;

        }



        .current-price {

            color: #87CEEB;

            font-size: 14px;

            margin: 5px 0;

        }



        .balance-info {

            color: #98FB98;

            font-size: 14px;

            font-weight: bold;

        }



        .investment-calculator {

            background: rgba(255, 255, 255, 0.05);

            border-radius: 10px;

            padding: 15px;

        }



        .slider-container {

            margin: 15px 0;

        }



        .slider-container label {

            display: block;

            color: #EAECEF;

            font-size: 16px;

            margin-bottom: 10px;

            font-weight: bold;

        }



        .slider-container input[type="range"] {

            width: 100%;

            height: 8px;

            border-radius: 5px;

            background: #3A3F47;

            outline: none;

            -webkit-appearance: none;

            margin: 10px 0;

        }



        .slider-container input[type="range"]::-webkit-slider-thumb {

            -webkit-appearance: none;

            appearance: none;

            width: 20px;

            height: 20px;

            border-radius: 50%;

            background: #FCD535;

            cursor: pointer;

            box-shadow: 0 2px 5px rgba(0,0,0,0.3);

        }



        .slider-container input[type="range"]::-moz-range-thumb {

            width: 20px;

            height: 20px;

            border-radius: 50%;

            background: #FCD535;

            cursor: pointer;

            border: none;

            box-shadow: 0 2px 5px rgba(0,0,0,0.3);

        }



        .investment-preview {

            background: rgba(0, 255, 0, 0.1);

            border-left: 4px solid #98FB98;

            padding: 15px;

            margin: 15px 0;

            border-radius: 8px;

        }



        .preview-info {

            color: #98FB98;

            font-size: 16px;

            margin-bottom: 8px;

        }



        .remaining-balance {

            color: #87CEEB;

            font-size: 14px;

        }



        .choice-buttons {

            display: flex;

            gap: 10px;

            margin-top: 20px;

        }



        .choice-buttons .choice-btn {

            flex: 1;

            text-align: center;

        }



        /* Story Result */

        .story-result {

            padding: 20px;

        }



        .story-result .result-header h3 {

            color: #0ECB81;

            margin-bottom: 15px;

        }



        .story-result .result-explanation {

            background: #1E2329;

            border-left: 4px solid #0ECB81;

            padding: 20px;

            border-radius: 12px;

            margin-bottom: 20px;

            font-size: 16px;

            line-height: 1.6;

            color: #EAECEF;

        }



        /* Story Review */

        .story-review {

            padding: 20px;

            max-height: calc(100vh - 140px);

            overflow-y: auto;

        }



        .review-header {

            text-align: center;

            margin-bottom: 30px;

        }



        .review-header h2 {

            color: #FCD535;

            margin-bottom: 10px;

            font-size: 24px;

        }



        .review-header p {

            color: #9CA3AF;

            font-size: 16px;

        }



        .review-content {

            margin-bottom: 30px;

        }



        .biography-section, .strategy-section, .recommendation-section {

            background: #1E2329;

            border-radius: 12px;

            padding: 20px;

            margin-bottom: 20px;

        }



        .biography-timeline {

            margin: 20px 0;

        }



        .timeline-event {

            border-left: 3px solid #FCD535;

            padding-left: 20px;

            margin-bottom: 20px;

            position: relative;

        }



        .timeline-event::before {

            content: '•';

            position: absolute;

            left: -8px;

            top: 0;

            background: #252930;

            color: #FCD535;

            font-size: 20px;

            font-weight: bold;

        }



        .event-date {

            color: #FCD535;

            font-weight: bold;

            font-size: 14px;

            margin-bottom: 5px;

        }



        .event-title {

            color: #0ECB81;

            font-weight: bold;

            margin-bottom: 5px;

        }



        .event-choice {

            color: #EAECEF;

            margin-bottom: 5px;

            font-style: italic;

        }



        .event-impact {

            color: #9CA3AF;

            font-size: 14px;

            background: #252930;

            padding: 5px 10px;

            border-radius: 6px;

            display: inline-block;

        }



        .final-state {

            background: #252930;

            border: 2px solid #FCD535;

            border-radius: 10px;

            padding: 15px;

            margin-top: 20px;

        }



        .final-state h3 {

            color: #FCD535;

            margin-bottom: 10px;

        }



        .final-state p {

            color: #EAECEF;

            margin: 5px 0;

        }



        .strategy-stats {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));

            gap: 10px;

            margin: 20px 0;

        }



        .stat {

            background: #252930;

            padding: 15px;

            border-radius: 8px;

            text-align: center;

            color: #EAECEF;

            font-weight: bold;

        }



        .strategy-type {

            background: linear-gradient(135deg, #FCD535, #FFA726);

            color: #1E2329;

            padding: 20px;

            border-radius: 12px;

            margin-top: 20px;

            font-size: 18px;

            text-align: center;

            font-weight: bold;

        }



        .recommendation {

            background: #252930;

            border-left: 4px solid #0ECB81;

            padding: 15px;

            border-radius: 8px;

            margin-bottom: 15px;

            color: #EAECEF;

        }



        .recommendation strong {

            color: #0ECB81;

        }



        .review-controls {

            display: flex;

            gap: 15px;

            justify-content: center;

            margin-top: 30px;

        }



        .review-controls .btn-primary,

        .review-controls .btn-exit {

            flex: 1;

            max-width: 200px;

        }



        /* Нижняя навигация */

        .bottom-nav {

            position: fixed !important;

            bottom: 0 !important;

            left: 0 !important;

            right: 0 !important;

            width: auto !important;

            background: #181A20 !important;

            padding: 10px !important;

            display: flex !important;

            flex-direction: row !important;

            justify-content: space-around !important;

            gap: 0 !important;

            box-shadow: 0 -2px 10px rgba(0,0,0,0.3) !important;

            z-index: 1000 !important;

            transition: padding 0.3s ease !important;

            overflow: visible !important;

        }



        .bottom-nav.compact {

            padding: 8px 10px !important;

        }



        .nav-toggle {

            position: absolute;

            top: 5px;

            right: 10px;

            width: 32px;

            height: 32px;

            background: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%);

            border: 2px solid #F0B90B;

            border-radius: 50%;

            cursor: pointer;

            color: #0B0E11;

            font-size: 18px;

            transition: all 0.3s ease;

            z-index: 1001;

            display: flex;

            align-items: center;

            justify-content: center;

            box-shadow: 0 4px 15px rgba(252, 213, 53, 0.4);

            font-weight: bold;

        }



        .nav-toggle:hover {

            transform: rotateY(180deg) scale(1.1);

            box-shadow: 0 6px 20px rgba(252, 213, 53, 0.6);

        }



        .nav-toggle:active {

            transform: rotateY(180deg) scale(0.95);

        }



        /* Всплывающее меню монетки */

        .coin-menu {

            position: fixed;

            bottom: 70px;

            right: 10px;

            background: #181A20;

            border-radius: 16px;

            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

            padding: 10px;

            display: none;

            flex-direction: column;

            gap: 5px;

            z-index: 1002;

            min-width: 160px;

            border: 1px solid #484B59;

        }



        .coin-menu.active {

            display: flex;

        }



        .coin-menu-item {

            background: none;

            border: none;

            color: #EAECEF;

            padding: 12px 16px;

            cursor: pointer;

            display: flex;

            align-items: center;

            gap: 10px;

            border-radius: 12px;

            transition: all 0.2s;

            font-size: 14px;

            text-align: left;

        }



        .coin-menu-item:hover {

            background: #0B0E11;

            color: #FCD535;

        }



        .coin-menu-item span:first-child {

            font-size: 18px;

        }



        .nav-btn {

            background: none;

            border: none;

            color: #848E9C;

            padding: 10px;

            cursor: pointer;

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 5px;

            transition: all 0.2s ease;

            position: relative;

        }



        /* Индикатор уведомлений на кнопке */

        .nav-notification-dot {

            position: absolute;

            top: 5px;

            right: 5px;

            width: 12px;

            height: 12px;

            background: #000;

            border-radius: 50%;

            display: none;

            border: 2px solid #181A20;

        }



        .nav-notification-dot.active {

            display: block;

        }



        .nav-btn span:first-child {

            font-size: 24px;

            transition: transform 0.2s ease;

        }



        .nav-btn span:last-child {

            font-size: 12px;

            transition: opacity 0.3s ease, max-height 0.3s ease;

            max-height: 20px;

            opacity: 1;

        }



        .bottom-nav.compact .nav-btn span:last-child {

            opacity: 0;

            max-height: 0;

            overflow: hidden;

        }



        .nav-btn:hover {

            color: #FCD535;

        }



        .nav-btn:hover span:first-child {

            transform: translateY(-2px);

        }



        .nav-btn.active {

            color: #FCD535;

        }



        /* Достижения */

        .achievements-grid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

            gap: 15px;

            padding: 20px 0;

        }



        .achievement-badge {

            background: #181A20;

            border-radius: 16px;

            padding: 20px;

            transition: all 0.3s;

            position: relative;

            overflow: hidden;

        }



        .achievement-badge.unlocked {

            border: 2px solid #FCD535;

            box-shadow: 0 5px 20px rgba(252, 213, 53, 0.2);

        }



        .achievement-badge.locked {

            opacity: 0.5;

            border: 2px solid #252930;

        }



        .achievement-badge.unlocked::before {

            content: '';

            position: absolute;

            top: -2px;

            left: -2px;

            right: -2px;

            height: 4px;

            background: linear-gradient(90deg, #FCD535, #F0B90B, #FCD535);

            border-radius: 16px 16px 0 0;

        }



        .achievement-header {

            display: flex;

            align-items: flex-start;

            gap: 15px;

            margin-bottom: 12px;

            padding-right: 30px; /* Отступ для стикера статуса */

        }



        .achievement-icon {

            font-size: 32px;

            width: 50px;

            height: 50px;

            flex-shrink: 0; /* Иконка не сжимается */

            display: flex;

            align-items: center;

            justify-content: center;

            border-radius: 50%;

            background: rgba(252, 213, 53, 0.1);

        }



        .achievement-badge.unlocked .achievement-icon {

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            animation: achievementGlow 2s ease-in-out infinite alternate;

        }

        .achievement-badge.with-background-icon .achievement-header {

            display: block;

            position: relative;

            padding-right: 0;

            min-height: 72px;

        }



        .achievement-badge.with-background-icon .achievement-info {

            padding-right: 12px;

        }



        .achievement-badge.with-background-icon .achievement-icon {

            position: absolute;

            right: 18px;

            bottom: 16px;

            width: auto;

            height: auto;

            font-size: 86px;

            opacity: 0.16;

            background: none;

            pointer-events: none;

            z-index: 0;

            filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));

        }



        .achievement-badge.with-background-icon.unlocked .achievement-icon {

            animation: none;

            opacity: 0.22;

        }



        .achievement-badge.with-background-icon.locked .achievement-icon {

            opacity: 0.12;

            filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));

        }



        @keyframes achievementGlow {

            from {

                box-shadow: 0 0 10px rgba(252, 213, 53, 0.5);

            }

            to {

                box-shadow: 0 0 20px rgba(252, 213, 53, 0.8);

            }

        }



        .achievement-info {

            flex: 1;

            min-width: 0; /* Позволяет тексту корректно переноситься */

            overflow: hidden; /* Скрывает выходящий текст */

            position: relative;

            z-index: 2; /* Текст выше стикера */

        }



        .achievement-title {

            font-size: 15px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 5px;

            word-wrap: break-word; /* Переносит длинные слова */

            overflow-wrap: break-word;

            line-height: 1.4;

            padding-right: 5px;

            position: relative;

            z-index: 2; /* Текст выше стикера */

        }



        .achievement-badge.unlocked .achievement-title {

            color: #FCD535;

        }



        .achievement-description {

            font-size: 13px;

            color: #848E9C;

            line-height: 1.4;

            word-wrap: break-word; /* Переносит длинные слова */

            overflow-wrap: break-word;

            position: relative;

            z-index: 2; /* Текст выше стикера */

        }



        .achievement-status {

            position: absolute;

            top: 6px;

            right: 6px;

            font-size: 12px;

            z-index: 1; /* Ниже текста */

            width: 16px;

            height: 16px;

            display: flex;

            align-items: center;

            justify-content: center;

            flex-shrink: 0;

            line-height: 1;

            opacity: 0.25; /* Прозрачность чтобы не мешать тексту */

        }



        .achievement-badge.unlocked .achievement-status {

            color: #0ECB81;

        }



        .achievement-badge.locked .achievement-status {

            color: #848E9C;

        }



        /* Стили для концовок игры */

        .game-ending {

            margin: 20px 0;

            padding: 0;

        }



        .ending-hero {

            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);

            border: 3px solid #ffd700;

            border-radius: 20px;

            padding: 40px 30px;

            text-align: center;

            margin-bottom: 30px;

            box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);

        }



        .ending-icon {

            font-size: 80px;

            margin-bottom: 20px;

            display: block;

        }



        .ending-description {

            margin-top: 20px;

        }



        .ending-description p {

            margin: 10px 0;

            font-size: 16px;

            line-height: 1.6;

        }



        /* Стили для системы достижений в концовке */

        .achievements-container {

            background: rgba(255,255,255,0.05);

            border-radius: 15px;

            padding: 25px;

            margin-top: 30px;

        }



        .achievements-container h3 {

            color: #ffd700;

            text-align: center;

            margin-bottom: 20px;

            font-size: 24px;

        }



        .achievements-container .achievements-grid .achievement {

            background: rgba(255,255,255,0.08);

            border-radius: 12px;

            padding: 15px;

            margin-bottom: 10px;

            display: flex;

            align-items: center;

            border-left: 4px solid #ffd700;

        }



        .achievements-container .achievement-icon {

            font-size: 28px;

            margin-right: 15px;

            min-width: 40px;

        }



        .achievements-container .achievement-text strong {

            display: block;

            color: #ffd700;

            margin-bottom: 5px;

            font-size: 14px;

        }



        .achievements-container .achievement-desc {

            color: #87ceeb;

            font-size: 12px;

            line-height: 1.4;

        }



        .no-achievements {

            text-align: center;

            color: #87ceeb;

            font-style: italic;

            padding: 20px;

            font-size: 16px;

        }



        /* Мини игры */

        .mini-games-grid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            gap: 15px;

            padding: 20px 0;

        }



        .mini-game-card {

            background: #181A20;

            border-radius: 16px;

            padding: 20px;

            cursor: pointer;

            transition: all 0.3s;

            text-align: center;

        }



        .mini-game-card:hover {

            transform: translateY(-3px);

            box-shadow: 0 8px 25px rgba(252, 213, 53, 0.3);

        }



        .mini-game-icon {

            font-size: 48px;

            margin-bottom: 15px;

        }



        .mini-game-title {

            font-size: 18px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 8px;

        }



        .mini-game-description {

            font-size: 14px;

            color: #848E9C;

            line-height: 1.4;

        }



        /* Спидран-Анализ */

        .speed-analysis-menu {

            padding: 20px 0;

        }



        .player-stats {

            display: grid;

            grid-template-columns: repeat(3, 1fr);

            gap: 15px;

            margin-bottom: 30px;

        }



        .stat-item {

            background: #181A20;

            padding: 15px;

            border-radius: 12px;

            text-align: center;

        }



        .stat-label {

            font-size: 12px;

            color: #848E9C;

            display: block;

            margin-bottom: 5px;

        }



        .stat-value {

            font-size: 18px;

            font-weight: 600;

            color: #FCD535;

        }



        .game-modes {

            display: grid;

            gap: 15px;

        }



        .game-mode-btn {

            background: #181A20;

            border: none;

            border-radius: 16px;

            padding: 20px;

            cursor: pointer;

            transition: all 0.3s;

            text-align: left;

            color: inherit;

        }



        .game-mode-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 8px 25px rgba(252, 213, 53, 0.2);

        }



        .mode-icon {

            font-size: 32px;

            margin-bottom: 10px;

        }



        .mode-title {

            font-size: 18px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 5px;

        }



        .mode-desc {

            font-size: 14px;

            color: #848E9C;

            line-height: 1.4;

        }



        .speed-analysis-game {

            padding: 20px 0;

        }



        .game-header {

            display: grid;

            grid-template-columns: 1fr auto 1fr;

            gap: 20px;

            align-items: center;

            margin-bottom: 20px;

        }



        .game-task {

            text-align: left;

        }



        .pattern-name {

            font-weight: 600;

            color: #FCD535;

        }



        .game-timer {

            background: #F0B90B;

            color: #0B0E11;

            padding: 10px 20px;

            border-radius: 20px;

            font-size: 18px;

            font-weight: 600;

            text-align: center;

            min-width: 60px;

        }



        .game-score {

            text-align: right;

            font-weight: 600;

        }



        .chart-container {

            background: #181A20;

            border-radius: 16px;

            padding: 20px;

            margin-bottom: 20px;

            text-align: center;

            height: 300px;

            display: flex;

            align-items: center;

            justify-content: center;

        }



        .chart-container canvas {

            max-width: 100%;

            height: auto;

        }



        /* Улучшенные стили для canvas графиков */

        canvas {

            background: linear-gradient(135deg, #0B0E11 0%, #1a1d26 50%, #0B0E11 100%) !important;

            box-shadow: inset 0 0 30px rgba(252, 213, 53, 0.05), 0 4px 15px rgba(0, 0, 0, 0.3);

            border: 1px solid rgba(252, 213, 53, 0.1);

        }



        .game-controls {

            display: grid;

            grid-template-columns: repeat(3, 1fr);

            gap: 10px;

        }



        .answer-btn {

            padding: 15px;

            border: none;

            border-radius: 12px;

            font-size: 16px;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.3s;

        }



        .answer-btn.correct {

            background: #16C784;

            color: white;

        }



        .answer-btn.incorrect {

            background: #EA3943;

            color: white;

        }



        .answer-btn.skip {

            background: #848E9C;

            color: white;

        }



        .answer-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 4px 12px rgba(0,0,0,0.3);

        }



        .speed-analysis-result {

            text-align: center;

            padding: 40px 20px;

        }



        .result-header h2 {

            margin-bottom: 10px;

            font-size: 24px;

        }



        .result-score {

            font-size: 20px;

            font-weight: 600;

            color: #16C784;

            margin-bottom: 20px;

        }



        .result-explanation {

            background: #181A20;

            padding: 20px;

            border-radius: 12px;

            margin-bottom: 30px;

        }



        .result-controls {

            display: grid;

            grid-template-columns: 1fr 1fr;

            gap: 15px;

        }



        .result-controls .btn-primary {

            margin-top: 0;

            border-radius: 16px;

        }



        .difficulty-selection {

            margin-bottom: 30px;

        }



        .difficulty-selection h4, .game-modes h4 {

            text-align: center;

            color: #EAECEF;

            margin-bottom: 20px;

            font-size: 18px;

        }



        .difficulty-grid {

            display: grid;

            grid-template-columns: repeat(2, 1fr);

            gap: 15px;

            margin-bottom: 20px;

        }



        .difficulty-btn {

            background: #181A20;

            border: none;

            border-radius: 16px;

            padding: 20px;

            cursor: pointer;

            transition: all 0.3s;

            text-align: center;

            color: inherit;

        }



        .difficulty-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 8px 25px rgba(252, 213, 53, 0.2);

        }



        .difficulty-icon {

            font-size: 28px;

            margin-bottom: 10px;

        }



        .difficulty-title {

            font-size: 16px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 5px;

        }



        .difficulty-desc {

            font-size: 12px;

            color: #848E9C;

            line-height: 1.3;

        }



        .back-difficulty-btn {

            background: #848E9C;

            color: white;

            border: none;

            border-radius: 12px;

            padding: 10px 20px;

            cursor: pointer;

            transition: all 0.3s;

            margin-top: 15px;

            width: 100%;

        }



        .back-difficulty-btn:hover {

            background: #666;

        }



        /* Викторина-спидран */

        .quiz-stats {

            display: flex;

            justify-content: space-between;

            background: #181A20;

            padding: 15px 20px;

            border-radius: 12px;

            margin-bottom: 20px;

            font-weight: 600;

        }



        .quiz-timer {

            color: #F6465D;

        }



        .quiz-score {

            color: #0ECB81;

        }



        .quiz-question-count {

            color: #FCD535;

        }



        .quiz-question-box {

            background: #181A20;

            padding: 20px;

            border-radius: 12px;

            margin-bottom: 20px;

        }



        .quiz-question-box h3 {

            color: #EAECEF;

            margin-bottom: 20px;

            font-size: 16px;

            line-height: 1.4;

        }



        .speed-quiz-option {

            background: #252930;

            padding: 12px 15px;

            border-radius: 8px;

            margin-bottom: 8px;

            cursor: pointer;

            transition: all 0.2s;

            font-size: 14px;

        }



        .speed-quiz-option:hover {

            background: #2D3139;

            transform: translateX(3px);

        }



        .speed-quiz-option.correct {

            background: #0ECB81;

            color: white;

        }



        .speed-quiz-option.wrong {

            background: #F6465D;

            color: white;

        }



        .quiz-result {

            text-align: center;

            background: #181A20;

            padding: 30px;

            border-radius: 12px;

        }



        .quiz-result h3 {

            color: #FCD535;

            margin-bottom: 15px;

        }



        .quiz-result p {

            color: #848E9C;

            margin-bottom: 10px;

        }



        /* Вики */

        .wiki-search {

            margin-bottom: 20px;

        }



        .wiki-search input {

            width: 100%;

            padding: 12px 16px;

            background: #181A20;

            border: 2px solid #252930;

            border-radius: 12px;

            color: #EAECEF;

            font-size: 16px;

            transition: border-color 0.3s;

        }



        .wiki-search input:focus {

            outline: none;

            border-color: #FCD535;

        }



        .wiki-search input::placeholder {

            color: #848E9C;

        }



        .wiki-grid {

            display: flex;

            flex-direction: column;

            gap: 12px;

        }



        .wiki-item {

            background: #181A20;

            border-radius: 12px;

            padding: 16px;

            transition: all 0.3s;

            cursor: pointer;

        }



        .wiki-item:hover {

            transform: translateX(3px);

            box-shadow: 0 4px 15px rgba(252, 213, 53, 0.15);

        }



        .wiki-term {

            font-size: 16px;

            font-weight: 600;

            color: #FCD535;

            margin-bottom: 8px;

            display: flex;

            align-items: center;

            gap: 10px;

        }



        .wiki-definition {

            color: #848E9C;

            line-height: 1.4;

            font-size: 14px;

        }



        .wiki-category {

            display: inline-block;

            background: rgba(252, 213, 53, 0.1);

            color: #FCD535;

            padding: 4px 8px;

            border-radius: 6px;

            font-size: 12px;

            font-weight: 500;

        }



        .wiki-item.expanded .wiki-definition {

            display: block;

        }



        .wiki-item:not(.expanded) .wiki-definition {

            display: -webkit-box;

            -webkit-line-clamp: 2;

            -webkit-box-orient: vertical;

            overflow: hidden;

        }



        /* Котировки */

        .prices-container {

            padding: 0 20px 20px 20px;

        }



        .prices-header {

            margin-bottom: 20px;

            display: flex;

            justify-content: space-between;

            align-items: center;

        }



        .price-settings {

            display: flex;

            align-items: center;

            gap: 15px;

        }



        .price-setting-btn {

            background: #252930;

            border: none;

            padding: 8px 12px;

            border-radius: 8px;

            color: #848E9C;

            font-size: 14px;

            cursor: pointer;

            transition: all 0.3s;

        }



        .price-setting-btn.active {

            background: #FCD535;

            color: #0B0E11;

        }



        .last-update {

            font-size: 12px;

            color: #848E9C;

        }



        .prices-grid {

            display: flex;

            flex-direction: column;

            gap: 12px;

        }



        .price-card {

            background: #181A20;

            border-radius: 12px;

            padding: 16px;

            display: flex;

            justify-content: space-between;

            align-items: center;

            transition: all 0.3s;

        }



        .price-card:hover {

            transform: translateY(-2px);

            box-shadow: 0 4px 15px rgba(252, 213, 53, 0.1);

        }



        /* Стили для образовательных карточек */

        .cards-grid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

            gap: 20px;

            margin: 20px 0;

        }



        .edu-card {

            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

            border-radius: 15px;

            padding: 20px;

            color: white;

            box-shadow: 0 8px 32px rgba(0,0,0,0.1);

            transition: all 0.3s ease;

            backdrop-filter: blur(10px);

        }



        .edu-card:hover {

            transform: translateY(-5px);

            box-shadow: 0 12px 40px rgba(0,0,0,0.2);

        }



        .edu-card .card-icon {

            font-size: 2.5rem;

            margin-bottom: 10px;

            display: block;

        }



        .edu-card h4 {

            margin: 10px 0;

            font-size: 1.2rem;

            font-weight: 600;

        }



        .edu-card p {

            font-size: 0.95rem;

            line-height: 1.4;

            margin: 0;

        }



        .simple-card {

            background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);

            border-radius: 15px;

            padding: 20px;

            margin: 20px 0;

            color: #333;

            box-shadow: 0 8px 32px rgba(0,0,0,0.1);

        }



        .simple-card h3 {

            color: #2c5aa0;

            margin-top: 0;

        }



        .simple-card p {

            font-size: 1.1rem;

            line-height: 1.5;

            margin-bottom: 0;

        }



        /* Кнопки выбора сложности */

        .difficulty-selector {

            display: flex;

            gap: 15px;

            margin: 20px 0;

            justify-content: center;

        }



        .difficulty-btn {

            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

            border: none;

            border-radius: 25px;

            padding: 12px 24px;

            color: white;

            font-size: 1rem;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.3s ease;

            box-shadow: 0 4px 15px rgba(0,0,0,0.2);

        }



        .difficulty-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 6px 20px rgba(0,0,0,0.3);

        }



        .difficulty-btn.active {

            background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);

            transform: translateY(-2px);

            box-shadow: 0 6px 20px rgba(0,0,0,0.3);

        }



        .difficulty-btn.simple {

            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

        }



        .difficulty-btn.complex {

            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

        }



        .coin-info {

            display: flex;

            align-items: center;

            gap: 12px;

        }



        .coin-icon {

            font-size: 24px;

        }



        .coin-details h3 {

            font-size: 16px;

            font-weight: 600;

            color: #EAECEF;

            margin: 0 0 4px 0;

        }



        .coin-details p {

            font-size: 12px;

            color: #848E9C;

            margin: 0;

        }



        .price-info {

            text-align: right;

        }



        .price-current {

            font-size: 18px;

            font-weight: 600;

            color: #EAECEF;

            margin: 0 0 4px 0;

        }



        .price-change {

            font-size: 14px;

            font-weight: 500;

            display: flex;

            align-items: center;

            gap: 4px;

        }



        .price-change.positive {

            color: #26A17B;

        }



        .price-change.negative {

            color: #F6465D;

        }

            .floating-symbols {

            position: fixed;

            inset: 0;

            pointer-events: none;

            overflow: hidden;

            z-index: 0;

        }



        .floating-symbols .symbol {

            position: absolute;

            bottom: -18%;

            font-size: clamp(22px, 3.6vw, 46px);

            opacity: 0;

            animation: rise 18s linear infinite;

            color: rgba(252, 213, 83, 0.4);

            filter: drop-shadow(0 0 25px rgba(252, 213, 83, 0.35));

            mix-blend-mode: screen;

        }



        .floating-symbols .symbol.usd {

            color: rgba(14, 203, 129, 0.36);

            filter: drop-shadow(0 0 22px rgba(14, 203, 129, 0.3));

        }



        .floating-symbols .symbol .glyph {

            display: inline-block;

        }



        .floating-symbols .symbol.btc .glyph {

            animation: slowSpin 16s linear infinite;

        }



        .floating-symbols .symbol.usd .glyph {

            animation: slowSpinReverse 24s linear infinite;

        }



        @keyframes rise {

            0% {

                bottom: -18%;

                opacity: 0;

                transform: translateX(0) scale(0.9);

            }

            15% {

                opacity: 0.7;

            }

            70% {

                opacity: 0.35;

            }

            100% {

                bottom: 120%;

                opacity: 0;

                transform: translateX(18px) scale(1.12);

            }

        }



        @keyframes slowSpin {

            from { transform: rotate(0deg); }

            to { transform: rotate(360deg); }

        }



        @keyframes slowSpinReverse {

            from { transform: rotate(0deg); }

            to { transform: rotate(-360deg); }

        }



        .floating-symbols .symbol:nth-child(1) { left: 4%; animation-duration: 19s; animation-delay: -2s; }

        .floating-symbols .symbol:nth-child(2) { left: 12%; animation-duration: 16s; animation-delay: -7s; }

        .floating-symbols .symbol:nth-child(3) { left: 20%; animation-duration: 21s; animation-delay: -11s; }

        .floating-symbols .symbol:nth-child(4) { left: 29%; animation-duration: 17s; animation-delay: -4s; }

        .floating-symbols .symbol:nth-child(5) { left: 38%; animation-duration: 23s; animation-delay: -10s; }

        .floating-symbols .symbol:nth-child(6) { left: 47%; animation-duration: 18s; animation-delay: -15s; }

        .floating-symbols .symbol:nth-child(7) { left: 56%; animation-duration: 20s; animation-delay: -6s; }

        .floating-symbols .symbol:nth-child(8) { left: 65%; animation-duration: 17s; animation-delay: -17s; }

        .floating-symbols .symbol:nth-child(9) { left: 74%; animation-duration: 22s; animation-delay: -8s; }

        .floating-symbols .symbol:nth-child(10) { left: 83%; animation-duration: 18s; animation-delay: -3s; }

        .floating-symbols .symbol:nth-child(11) { left: 9%; animation-duration: 24s; animation-delay: -12s; }

        .floating-symbols .symbol:nth-child(12) { left: 91%; animation-duration: 19s; animation-delay: -1s; }



        .top-bar, .screen, .bottom-nav {

            position: relative;

            z-index: 1;

        }

    

        /* Lesson content visual refresh */

        #lessonContent {

            max-height: calc(100vh - 230px);

            overflow-y: auto;

            padding-right: 10px;

            scroll-behavior: smooth;

        }



        #lessonContent::-webkit-scrollbar {

            width: 6px;

        }



        #lessonContent::-webkit-scrollbar-thumb {

            background: rgba(255, 255, 255, 0.18);

            border-radius: 8px;

        }



        #lessonContent::-webkit-scrollbar-track {

            background: transparent;

        }



        #lessonContent .lesson-article {

            background: rgba(24, 26, 32, 0.96);

            border: 1px solid rgba(255, 255, 255, 0.04);

            border-radius: 24px;

            padding: 28px 32px;

            box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3);

            line-height: 1.7;

            letter-spacing: 0.01em;

            color: inherit;

            transition: transform 0.3s ease, box-shadow 0.3s ease;

        }



        /* Lesson theme variants */

        #lessonContent .lesson-article.lesson-theme-basics {

            background: linear-gradient(135deg, rgba(38, 72, 150, 0.92), rgba(17, 24, 39, 0.94));

            border-color: rgba(96, 165, 250, 0.35);

            box-shadow: 0 34px 68px rgba(15, 23, 42, 0.45);

        }



        body.theme-light #lessonContent .lesson-article.lesson-theme-basics {

            background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.92));

            border-color: rgba(37, 99, 235, 0.28);

            color: #0f172a;

            box-shadow: 0 28px 52px rgba(148, 163, 184, 0.26);

        }



        #lessonContent .lesson-article.lesson-theme-security {

            background: linear-gradient(135deg, rgba(22, 101, 52, 0.92), rgba(10, 56, 26, 0.94));

            border-color: rgba(16, 185, 129, 0.32);

            box-shadow: 0 34px 68px rgba(6, 95, 70, 0.45);

        }



        body.theme-light #lessonContent .lesson-article.lesson-theme-security {

            background: linear-gradient(135deg, rgba(209, 250, 229, 0.95), rgba(187, 247, 208, 0.9));

            border-color: rgba(16, 185, 129, 0.28);

            color: #0b3d2b;

            box-shadow: 0 28px 52px rgba(134, 239, 172, 0.22);

        }



        #lessonContent .lesson-article.lesson-theme-defi {

            background: linear-gradient(135deg, rgba(76, 29, 149, 0.92), rgba(49, 1, 99, 0.94));

            border-color: rgba(192, 132, 252, 0.35);

            box-shadow: 0 34px 68px rgba(76, 29, 149, 0.42);

        }



        body.theme-light #lessonContent .lesson-article.lesson-theme-defi {

            background: linear-gradient(135deg, rgba(237, 233, 254, 0.95), rgba(221, 214, 254, 0.9));

            border-color: rgba(168, 85, 247, 0.28);

            color: #31135e;

            box-shadow: 0 28px 52px rgba(196, 181, 253, 0.26);

        }



        #lessonContent .lesson-article.lesson-theme-analytics {

            background: linear-gradient(135deg, rgba(30, 64, 70, 0.92), rgba(6, 33, 35, 0.94));

            border-color: rgba(45, 212, 191, 0.32);

            box-shadow: 0 34px 68px rgba(13, 148, 136, 0.45);

        }



        body.theme-light #lessonContent .lesson-article.lesson-theme-analytics {

            background: linear-gradient(135deg, rgba(204, 251, 241, 0.95), rgba(167, 243, 208, 0.9));

            border-color: rgba(20, 184, 166, 0.26);

            color: #064e3b;

            box-shadow: 0 28px 52px rgba(110, 231, 183, 0.24);

        }

        #lessonContent .lesson-article:hover {

            transform: translateY(-2px);

            box-shadow: 0 36px 72px rgba(0, 0, 0, 0.32);

        }



        #lessonContent .lesson-article h2 {

            font-size: 26px;

            margin-bottom: 18px;

            letter-spacing: 0.3px;

            color: #FCD535;

        }



        #lessonContent .lesson-article h3 {

            font-size: 20px;

            margin: 22px 0 12px;

            color: #FCD535;

        }



        body.theme-light #lessonContent .lesson-article h2 {

            color: #1E3A8A;

        }



        body.theme-light #lessonContent .lesson-article h3 {

            color: #2563EB;

        }



        #lessonContent .lesson-article p {

            margin-bottom: 16px;

            color: rgba(234, 236, 239, 0.78);

        }



        #lessonContent .lesson-article ul,

        #lessonContent .lesson-article ol {

            margin: 16px 0 18px 24px;

            color: rgba(234, 236, 239, 0.78);

        }



        #lessonContent .lesson-article li {

            margin-bottom: 10px;

            padding-left: 4px;

        }



        #lessonContent .lesson-article strong {

            color: #FCD535;

        }



        #lessonContent .lesson-article blockquote {

            border-left: 4px solid rgba(252, 213, 53, 0.5);

            background: rgba(37, 41, 48, 0.6);

            border-radius: 16px;

            padding: 16px 20px;

            margin: 20px 0;

            font-style: italic;

        }



        #lessonContent .lesson-article code {

            background: rgba(37, 41, 48, 0.85);

            padding: 3px 8px;

            border-radius: 6px;

            font-family: 'JetBrains Mono', 'Fira Code', monospace;

            font-size: 14px;

            color: #FCD535;

        }



        #lessonContent .lesson-article figure {

            margin: 24px 0;

            text-align: center;

        }



        #lessonContent .lesson-article figure img {

            max-width: 100%;

            border-radius: 16px;

            box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);

        }



        #lessonContent .lesson-article figure figcaption {

            margin-top: 10px;

            color: rgba(234, 236, 239, 0.65);

            font-size: 13px;

        }



        #lessonContent .lesson-article .info-block,

        #lessonContent .lesson-article .warning-block,

        #lessonContent .lesson-article .tip-block,

        #lessonContent .lesson-article .success-block,

        #lessonContent .lesson-article .chart-container,

        #lessonContent .lesson-article .event-types-grid,

        #lessonContent .lesson-article .geopolitical-events {

            border-radius: 20px;

            padding: 20px 22px;

            margin: 20px 0;

            background: rgba(37, 41, 48, 0.58);

            border: 1px solid rgba(255, 255, 255, 0.04);

        }



        #lessonContent .lesson-article .warning-block {

            border-left: 4px solid #F97316;

        }



        #lessonContent .lesson-article .success-block {

            border-left: 4px solid #10B981;

        }



        #lessonContent .lesson-article .tip-block {

            border-left: 4px solid #38BDF8;

        }



        #lessonContent .lesson-article .key-point {

            background: rgba(28, 31, 40, 0.9);

            border-left: 4px solid #FCD535;

            border-radius: 16px;

            padding: 18px 22px;

            margin: 24px 0;

            box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);

        }



        #lessonContent .lesson-article table {

            width: 100%;

            border-collapse: collapse;

            margin: 20px 0;

            background: rgba(24, 26, 32, 0.9);

            border-radius: 16px;

            overflow: hidden;

        }



        #lessonContent .lesson-article table th,

        #lessonContent .lesson-article table td {

            padding: 12px 16px;

            border: 1px solid rgba(255, 255, 255, 0.05);

            text-align: left;

        }



        #lessonContent .lesson-article table thead {

            background: rgba(252, 213, 53, 0.12);

            color: #FCD535;

        }



        .lesson-header {

            display: flex;

            align-items: center;

            justify-content: space-between;

            gap: 12px;

        }



        .lesson-header h3,

        .lesson-header h2 {

            flex: 1;

        }



        /* Buttons & nav micro-interactions */

        .btn-primary,

        .btn-secondary,

        .difficulty-btn,

        .nav-btn {

            transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease;

        }



        .btn-primary:hover:not(:disabled) {

            transform: translateY(-2px);

            box-shadow: 0 18px 36px rgba(240, 185, 11, 0.25);

        }



        .btn-primary:active {

            transform: translateY(0);

        }



        .btn-secondary:hover {

            transform: translateY(-2px);

            box-shadow: 0 16px 30px rgba(240, 185, 11, 0.18);

        }



        .nav-btn {

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 4px;

        }



        .nav-btn span:first-child {

            font-size: 21px;

            transition: transform 0.25s ease;

        }



        .nav-btn:hover span:first-child {

            transform: translateY(-3px);

        }



        .nav-btn:hover {

            color: #FCD535;

            transform: translateY(-4px);

        }



        .bottom-nav {

            box-shadow: 0 -14px 32px rgba(0, 0, 0, 0.35);

        }



        .difficulty-btn {

            transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;

        }



        .difficulty-btn:hover {

            transform: translateY(-4px);

            box-shadow: 0 18px 36px rgba(14, 203, 129, 0.25);

        }



        .difficulty-btn.active {

            transform: translateY(-4px);

            box-shadow: 0 22px 42px rgba(17, 153, 142, 0.3);

        }



        /* Theme toggle */

        .top-bar-main {

            display: flex;

            flex-direction: column;

            gap: 12px;

            flex: 0 0 auto;

        }



        .top-bar-main .gm-streak {
            align-self: center;

            width: 44px;

            height: 44px;

            flex: 0 0 44px;

            justify-content: center;

            padding: 0;

            gap: 0;

        }



        .top-bar-main .gm-streak .gm-streak-count,

        .top-bar-main .gm-streak .gm-day-chip {

            display: none;

        }



        .theme-toggle {

            width: 44px;

            height: 44px;

            border-radius: 14px;

            border: 1px solid rgba(255, 255, 255, 0.08);

            background: rgba(24, 26, 32, 0.95);

            color: #FCD535;

            font-size: 20px;

            display: inline-flex;

            align-items: center;

            justify-content: center;

            cursor: pointer;

            transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;

        }



        .theme-toggle:hover {

            transform: translateY(-2px);

            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);

        }



        .theme-toggle:active {

            transform: scale(0.96);

        }



        /* Light theme overrides */

        body.theme-light {

            background: #F5F7FB;

            color: #15213B;

        }



        body.theme-light .top-bar {

            background: #FFFFFF;

            color: #1E293B;

            box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);

        }



        body.theme-light .top-bar-main .gm-streak {

            background: linear-gradient(140deg, #FFF4BE 0%, #FFE27E 55%, #F9CF4E 100%);

            color: #1F2933;

            box-shadow: 0 12px 30px rgba(240, 185, 11, 0.35);

        }



        body.theme-light .top-bar-main .gm-streak .gm-fire::after {

            color: #1F2933;

        }



        body.theme-light .xp-bar {

            background: #E2E8F0;

        }



        body.theme-light .level-badge {

            background: linear-gradient(135deg, #FFE08A, #F59E0B);

            color: #1E293B;

        }



        body.theme-light .theme-toggle {

            background: #FFFFFF;

            border-color: rgba(15, 23, 42, 0.08);

            color: #1E293B;

            box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);

        }



        body.theme-light .curtain {

            background: linear-gradient(135deg, #E8ECFF 0%, #F5F7FB 100%);

            box-shadow: 0 10px 30px rgba(148, 163, 184, 0.35);

        }



        body.theme-light .curtain-text {

            color: #1E293B;

        }



        body.theme-light .curtain-loader {

            border: 3px solid rgba(37, 99, 235, 0.12);

            border-top-color: #2563EB;

        }



        body.theme-light .stage-card {

            background: linear-gradient(135deg, #FFFFFF, #EEF2FF);

            border: 1px solid rgba(15, 23, 42, 0.08);

            box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);

        }



        body.theme-light .stage-card::after {

            background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 60%);

        }



        body.theme-light .stage-card.locked {

            filter: grayscale(0.1);

            opacity: 0.7;

        }



        body.theme-light .stage-card.important-stage {

            border-color: rgba(245, 158, 11, 0.45);

            box-shadow: 0 22px 52px rgba(245, 158, 11, 0.18);

        }



        body.theme-light .stage-number {

            background: rgba(15, 23, 42, 0.06);

            color: #15213B;

            border-color: rgba(15, 23, 42, 0.12);

        }



        body.theme-light .stage-title {

            color: #15213B;

        }



        body.theme-light .stage-description {

            color: rgba(21, 33, 59, 0.7);

        }



        body.theme-light .stage-info {

            color: rgba(21, 33, 59, 0.58);

        }



        body.theme-light .stage-icon {

            background: rgba(15, 23, 42, 0.06);

            border-color: rgba(15, 23, 42, 0.08);

            color: #1E293B;

        }



        body.theme-light .bottom-nav {

            background: rgba(255, 255, 255, 0.98) !important;

            box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.12) !important;

        }



        body.theme-light .nav-btn {

            color: rgba(21, 33, 59, 0.55);

        }



        body.theme-light .nav-btn:hover {

            color: #F59E0B;

        }



        body.theme-light .nav-btn.active {

            color: #F59E0B;

        }



        body.theme-light .nav-toggle {

            background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);

            border-color: #F97316;

            color: #FFF;

            box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);

        }



        body.theme-light .nav-toggle:hover {

            box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);

        }



        body.theme-light #lessonContent::-webkit-scrollbar-thumb {

            background: rgba(99, 102, 241, 0.35);

        }



        body.theme-light #lessonContent .lesson-article {

            background: #FFFFFF;

            border: 1px solid rgba(15, 23, 42, 0.1);

            box-shadow: 0 32px 64px rgba(148, 163, 184, 0.24);

            color: #1E293B;

        }



        body.theme-light #lessonContent .lesson-article p,

        body.theme-light #lessonContent .lesson-article ul,

        body.theme-light #lessonContent .lesson-article ol {

            color: rgba(21, 33, 59, 0.78);

        }



        body.theme-light #lessonContent .lesson-article h3 {

            color: #2563EB;

        }



        body.theme-light #lessonContent .lesson-article .info-block,

        body.theme-light #lessonContent .lesson-article .warning-block,

        body.theme-light #lessonContent .lesson-article .tip-block,

        body.theme-light #lessonContent .lesson-article .success-block,

        body.theme-light #lessonContent .lesson-article .chart-container,

        body.theme-light #lessonContent .lesson-article .event-types-grid,

        body.theme-light #lessonContent .lesson-article .geopolitical-events {

            background: rgba(244, 247, 254, 0.92);

            border: 1px solid rgba(15, 23, 42, 0.08);

        }



        body.theme-light #lessonContent .lesson-article .key-point {

            background: #FFF8E1;

            border-left-color: #F59E0B;

            color: #1F2937;

        }



        body.theme-light #lessonContent .lesson-article blockquote {

            background: rgba(226, 232, 240, 0.9);

            border-left-color: rgba(37, 99, 235, 0.6);

            color: #1F2937;

        }



        body.theme-light #lessonContent .lesson-article code {

            background: rgba(226, 232, 240, 0.8);

            color: #1F2937;

        }



        body.theme-light #lessonContent .lesson-article figure figcaption {

            color: rgba(71, 85, 105, 0.8);

        }



        body.theme-light .btn-primary {

            background: linear-gradient(135deg, #FACC15, #F59E0B);

            color: #1E293B;

            box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);

        }



        body.theme-light .btn-primary.completed {

            background: linear-gradient(135deg, #34D399, #10B981);

            color: #0B0E11;

        }



        body.theme-light .btn-secondary {

            border-color: rgba(15, 23, 42, 0.15);

            color: #1E293B;

        }



        body.theme-light .btn-secondary:hover {

            background: rgba(37, 99, 235, 0.08);

            color: #1E293B;

        }



        body.theme-light .difficulty-btn {

            background: linear-gradient(135deg, #F8FAFC, #E6F6FF);

            color: #1E293B;

            box-shadow: 0 16px 32px rgba(148, 163, 184, 0.18);

        }



        body.theme-light .difficulty-btn.active {

            background: linear-gradient(135deg, #CFFAFE, #A5F3FC);

            color: #0F172A;

            box-shadow: 0 20px 40px rgba(56, 189, 248, 0.25);

        }



        body.theme-light .quiz-option {

            background: #FFFFFF;

            color: #1F2937;

            box-shadow: 0 12px 28px rgba(148, 163, 184, 0.18);

        }



        body.theme-light .quiz-option.correct {

            background: #DCFCE7;

            color: #166534;

        }



        body.theme-light .quiz-option.wrong {

            background: #FEE2E2;

            color: #991B1B;

        }



        body.theme-light .back-btn {

            color: #1E293B;

        }



        body.theme-light .lesson-header h3,

        body.theme-light .lesson-header h2 {

            color: #15213B;

        }



        body.theme-light .screen {

            background: transparent;

            color: inherit;

        }



        body.theme-light .wiki-search input {

            background: #FFFFFF;

            color: #1E293B;

            border: 1px solid rgba(148, 163, 184, 0.4);

        }



        body.theme-light .wiki-card {

            background: #FFFFFF;

            border: 1px solid rgba(148, 163, 184, 0.45);

            box-shadow: 0 16px 32px rgba(148, 163, 184, 0.18);

        }



        body.theme-light .mini-game-card {

            background: #FFFFFF;

            border: 1px solid rgba(148, 163, 184, 0.45);

            box-shadow: 0 16px 32px rgba(148, 163, 184, 0.18);

        }



        /* Демо-трейдинг стили */

        .trading-header {

            display: flex;

            justify-content: space-between;

            align-items: center;

            padding: 15px;

            background: #1E2329;

            border-radius: 12px;

            margin-bottom: 20px;

        }



        .balance-info {

            display: flex;

            gap: 20px;

        }



        .balance-item {

            display: flex;

            flex-direction: column;

            align-items: flex-start;

        }



        .balance-label {

            font-size: 12px;

            color: #848E9C;

            margin-bottom: 4px;

        }



        .balance-value {

            font-size: 18px;

            font-weight: bold;

            color: #EAECEF;

        }



        .pnl-value {

            font-size: 18px;

            font-weight: bold;

        }



        .pnl-value.positive {

            color: #0ECB81;

        }



        .pnl-value.negative {

            color: #F6465D;

        }



        .crypto-selector select {

            background: #252930;

            border: 1px solid #383A45;

            border-radius: 8px;

            color: #EAECEF;

            padding: 8px 12px;

            font-size: 14px;

        }



        .trading-chart-container {

            background: #1E2329;

            border-radius: 12px;

            padding: 15px;

            margin-bottom: 20px;

        }



        .chart-header {

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin-bottom: 15px;

        }



        .current-price {

            display: flex;

            align-items: center;

            gap: 10px;

        }



        .price-label {

            font-size: 16px;

            color: #EAECEF;

            font-weight: bold;

        }



        .price-value {

            font-size: 20px;

            color: #FCD535;

            font-weight: bold;

        }



        .price-change {

            font-size: 14px;

            padding: 4px 8px;

            border-radius: 6px;

            font-weight: bold;

        }



        .price-change.positive {

            background: rgba(14, 203, 129, 0.1);

            color: #0ECB81;

        }



        .price-change.negative {

            background: rgba(246, 70, 93, 0.1);

            color: #F6465D;

        }



        .chart-controls {

            display: flex;

            align-items: flex-start;

            justify-content: space-between;

            gap: 15px;

            flex-wrap: wrap;

        }



        .timeframe-controls {

            display: flex;

            align-items: center;

            gap: 8px;

            flex-wrap: nowrap;

            flex: 0 0 auto;

            overflow-x: auto;

            padding: 2px 0;

            scrollbar-width: none;

        }



        .timeframe-controls::-webkit-scrollbar {

            display: none;

        }



        .zoom-controls {

            display: flex;

            align-items: center;

            gap: 8px;

            flex: 0 0 auto;

        }



        .chart-controls .zoom-controls {

            order: 2;

        }



        .zoom-btn {

            background: #252930;

            border: 1px solid #383A45;

            color: #848E9C;

            padding: 6px 8px;

            border-radius: 6px;

            font-size: 12px;

            cursor: pointer;

            transition: all 0.2s;

            min-width: 32px;

        }



        .zoom-btn:hover {

            background: #FCD535;

            color: #0B0E11;

            border-color: #FCD535;

        }



        .zoom-level {

            color: #EAECEF;

            font-size: 12px;

            font-weight: 600;

            min-width: 48px;

            padding: 4px 8px;

            background: rgba(36, 40, 48, 0.8);

            border: 1px solid rgba(132, 142, 156, 0.35);

            border-radius: 6px;

            text-align: center;

        }



        .timeframe-btn {

            background: #252930;

            border: 1px solid #383A45;

            color: #AEB4C2;

            padding: 6px 10px;

            border-radius: 8px;

            font-size: 11px;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.2s ease;

            flex: 0 0 auto;

            min-width: 60px;

        }



        .timeframe-btn.active,

        .timeframe-btn:hover {

            background: #FCD535;

            color: #0B0E11;

            border-color: #FCD535;

        }



        #tradingChart {

            width: 100%;

            height: 250px;

            border-radius: 8px;

            background: #181A20;

            border: 1px solid #383A45;

            image-rendering: pixelated;

            image-rendering: -moz-crisp-edges;

            image-rendering: crisp-edges;

            display: block;

        }



        .trading-panel {

            background: #1E2329;

            border-radius: 12px;

            padding: 20px;

            margin-bottom: 20px;

        }



        .trading-tabs {

            display: flex;

            margin-bottom: 20px;

            border-bottom: 1px solid #383A45;

        }



        .tab-btn {

            background: none;

            border: none;

            color: #848E9C;

            padding: 12px 20px;

            cursor: pointer;

            font-size: 16px;

            transition: all 0.2s;

            border-bottom: 2px solid transparent;

        }



        .tab-btn.active {

            color: #EAECEF;

            border-bottom-color: #FCD535;

        }



        .trading-form {

            display: grid;

            gap: 15px;

        }



        .form-group {

            display: flex;

            flex-direction: column;

        }



        .form-group label {

            font-size: 14px;

            color: #EAECEF;

            margin-bottom: 8px;

        }



        .form-group input,

        .form-group select {

            background: #252930;

            border: 1px solid #383A45;

            border-radius: 8px;

            color: #EAECEF;

            padding: 12px;

            font-size: 14px;

        }



        .form-group input:focus,

        .form-group select:focus {

            outline: none;

            border-color: #FCD535;

        }



        .leverage-warning {

            background: rgba(246, 70, 93, 0.1);

            border: 1px solid #F6465D;

            border-radius: 8px;

            padding: 12px;

            color: #F6465D;

            font-size: 14px;

            text-align: center;

        }



        .trading-btn {

            padding: 15px;

            border: none;

            border-radius: 8px;

            font-size: 16px;

            font-weight: bold;

            cursor: pointer;

            transition: all 0.2s;

        }



        .buy-btn {

            background: #0ECB81;

            color: #0B0E11;

        }



        .buy-btn:hover {

            background: #0FB774;

            transform: translateY(-1px);

        }



        .sell-btn {

            background: #F6465D;

            color: #FFFFFF;

        }



        .sell-btn:hover {

            background: #E53E3E;

            transform: translateY(-1px);

        }



        .positions-section,

        .trading-history {

            background: #1E2329;

            border-radius: 12px;

            padding: 20px;

            margin-bottom: 20px;

        }



        .history-header {

            display: flex;

            align-items: center;

            justify-content: space-between;

            gap: 12px;

            margin-bottom: 12px;

        }



        .history-header h3 {

            margin: 0;

        }



        .history-toggle {

            background: #252930;

            border: 1px solid #2f3640;

            border-radius: 8px;

            color: #EAECEF;

            width: 32px;

            height: 32px;

            display: flex;

            align-items: center;

            justify-content: center;

            cursor: pointer;

            transition: background 0.2s ease, border-color 0.2s ease;

        }



        .history-toggle:hover {

            background: #2f3640;

            border-color: #3c4250;

        }



        .history-toggle .toggle-icon {

            display: block;

            transition: transform 0.2s ease;

        }



            background: #1E2329;

            border-radius: 12px;

            padding: 20px;

            margin-bottom: 20px;

            border: 1px solid #2F3640;

        }



            margin: 0 0 4px;

        }



            margin: 0 0 16px;

            font-size: 13px;

            color: #848E9C;

        }



            display: grid;

            grid-template-columns: repeat(2, minmax(0, 1fr));

            gap: 10px;

            margin-bottom: 16px;

        }



            background: rgba(255, 255, 255, 0.08);

            border: none;

            border-radius: 8px;

            color: #FCD535;

            font-weight: 600;

            padding: 10px 12px;

            cursor: pointer;

            transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;

        }



            transform: translateY(-1px);

            background: rgba(252, 213, 53, 0.2);

        }



            display: flex;

            flex-direction: column;

            gap: 8px;

            max-height: 240px;

            overflow-y: auto;

            padding-right: 4px;

        }



            width: 4px;

        }



            background: rgba(255, 255, 255, 0.1);

            border-radius: 8px;

        }



            text-align: center;

            color: #848E9C;

            font-size: 13px;

            padding: 12px 0;

        }



            border-top: 1px solid #2F3640;

            margin-top: 16px;

            padding-top: 12px;

        }



            display: flex;

            align-items: center;

            gap: 12px;

            background: rgba(252, 213, 53, 0.1);

            border-radius: 8px;

            padding: 10px 12px;

            font-size: 14px;

        }



            font-weight: 700;

            color: #FCD535;

            min-width: 48px;

        }



            flex: 1;

            text-align: center;

            color: #EAECEF;

            font-weight: 500;

        }



            font-weight: 600;

            color: #FCD535;

        }



            display: block;

            transition: transform 0.2s ease;

        }



        .history-toggle.collapsed .toggle-icon {

            transform: rotate(-90deg);

        }



        .history-filters {

            display: flex;

            gap: 8px;

            margin-bottom: 15px;

        }



        .history-filters.collapsed {

            display: none;

        }



        .history-filter-btn {

            background: #252930;

            border: 1px solid transparent;

            border-radius: 16px;

            color: #9CA3AF;

            padding: 6px 14px;

            font-size: 12px;

            cursor: pointer;

            transition: all 0.2s ease;

        }



        .history-filter-btn:hover {

            border-color: rgba(252, 213, 53, 0.6);

            color: #EAECEF;

        }



        .history-filter-btn.active {

            background: rgba(252, 213, 53, 0.12);

            border-color: #FCD535;

            color: #FCD535;

        }



        .history-list {

            display: flex;

            flex-direction: column;

            gap: 12px;

        }



        .history-list.collapsed {

            display: none;

        }



        .history-info {

            display: flex;

            flex-direction: column;

            gap: 4px;

        }



        .history-row {

            display: flex;

            align-items: center;

            gap: 8px;

        }



        .history-pair {

            font-weight: 600;

            color: #EAECEF;

        }



        .history-action {

            font-size: 12px;

            padding: 2px 8px;

            border-radius: 12px;

            background: rgba(148, 163, 184, 0.2);

            color: #9CA3AF;

        }



        .history-action.action-open {

            background: rgba(148, 163, 184, 0.25);

            color: #9CA3AF;

        }



        .history-action.action-close {

            background: rgba(14, 203, 129, 0.15);

            color: #0ECB81;

        }



        .history-direction {

            font-size: 11px;

            font-weight: 600;

            color: #9CA3AF;

            margin-left: 6px;

        }



        body.theme-light .history-direction {

            color: #4B5563;

        }



        .history-action.action-auto_close {

            background: rgba(246, 70, 93, 0.18);

            color: #F6465D;

        }



        .position-direction {

            display: inline-block;

            margin-left: 8px;

            padding: 2px 8px;

            border-radius: 12px;

            font-size: 11px;

            font-weight: 600;

        }



        .position-direction.long {

            background: rgba(14, 203, 129, 0.15);

            color: #0ECB81;

        }



        .position-direction.short {

            background: rgba(246, 70, 93, 0.18);

            color: #F6465D;

        }



        .position-direction.spot-hold {

            background: rgba(252, 213, 53, 0.15);

            color: #FCD535;

        }



        .history-meta {

            font-size: 12px;

            color: #848E9C;

        }



        body.theme-light .position-direction.long {

            background: rgba(14, 203, 129, 0.22);

            color: #047857;

        }



        body.theme-light .position-direction.short {

            background: rgba(246, 70, 93, 0.25);

            color: #B91C1C;

        }



        body.theme-light .history-toggle {

            background: #F3F4F6;

            border-color: #E5E7EB;

            color: #1F2937;

        }



        body.theme-light .history-toggle:hover {

            background: #E5E7EB;

            border-color: #D1D5DB;

        }



        body.theme-light .history-filter-btn {

            background: #F3F4F6;

            color: #4B5563;

        }



        body.theme-light .history-filter-btn:hover {

            color: #1F2937;

        }



        body.theme-light .history-filter-btn.active {

            background: rgba(240, 185, 11, 0.18);

            border-color: #F0B90B;

            color: #B45309;

        }



        .positions-section h3 {

            color: #EAECEF;

            margin-bottom: 15px;

            font-size: 16px;

        }



        .trading-history h3 {

            color: #EAECEF;

            font-size: 16px;

        }



        .position-item,

        .history-item {

            display: flex;

            justify-content: space-between;

            align-items: center;

            padding: 12px;

            background: #252930;

            border-radius: 8px;

            margin-bottom: 10px;

        }



        .position-info {

            display: flex;

            flex-direction: column;

        }



        .position-pair {

            font-weight: bold;

            color: #EAECEF;

        }



        .position-details {

            font-size: 12px;

            color: #848E9C;

        }



        .position-pnl {

            text-align: right;

        }



        .position-pnl.positive {

            color: #0ECB81;

        }



        .position-pnl.negative {

            color: #F6465D;

        }



        .position-pnl.neutral {

            color: #9CA3AF;

        }



        body.theme-light .position-pnl.neutral {

            color: #4B5563;

        }



        .close-position-btn {

            background: #F6465D;

            color: white;

            border: none;

            padding: 6px 12px;

            border-radius: 6px;

            font-size: 12px;

            cursor: pointer;

            margin-left: 10px;

        }



        .no-positions,

        .no-history {

            text-align: center;

            color: #848E9C;

            padding: 20px;

        }



        body.theme-light .lesson-article .timeline-item {

            background: rgba(255, 255, 255, 0.88);

            border: 1px solid rgba(148, 163, 184, 0.25);

        }



        body.theme-light .lesson-article .timeline-result.positive {

            color: #15803D;

        }



        body.theme-light .lesson-article .timeline-result.mixed {

            color: #B45309;

        }



        body.theme-light .lesson-article .timeline-result.negative {

            color: #B91C1C;

        }



        body.theme-light .lesson-article .geopolitical-events {

            background: rgba(239, 246, 255, 0.92);

        }



        body.theme-light .lesson-article .event-types-grid {

            background: rgba(240, 249, 255, 0.92);

        }



        body.theme-light .lesson-article .event-type {

            background: rgba(255, 255, 255, 0.88);

            border: 1px solid rgba(148, 163, 184, 0.25);

        }



        body.theme-light .lesson-article .event-impact {

            color: rgba(30, 41, 59, 0.78);

        }



        body.theme-light .lesson-article .warning-block,

        body.theme-light .lesson-article .tip-block,

        body.theme-light .lesson-article .success-block {

            color: #1E293B;

        }



        body.theme-light .lesson-article .success-block {

            border-left-color: #22C55E;

        }



        body.theme-light .lesson-article .tip-block {

            border-left-color: #38BDF8;

        }



                body.theme-light #lessonContent .lesson-article table {

            background: #FFFFFF;

        }



        body.theme-light #lessonContent .lesson-article table th,

        body.theme-light #lessonContent .lesson-article table td {

            border-color: rgba(148, 163, 184, 0.25);

            color: #1E293B;

        }



        body.theme-light #lessonContent .lesson-article table thead {

            background: rgba(59, 130, 246, 0.12);

            color: #1D4ED8;

        }



        body.theme-light .quiz-option.disabled {

            background: #E2E8F0;

            color: rgba(71, 85, 105, 0.7);

        }



        body.theme-light .btn-primary:hover:not(:disabled) {

            box-shadow: 0 22px 42px rgba(245, 158, 11, 0.26);

        }



        body.theme-light .btn-secondary:hover {

            box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);

        }



        /* Адаптивные стили для змейки */

        @media (max-width: 768px) {

            .levels-grid.snake-stage {

                max-width: 100%;

                padding: 20px 10px 30px;

            }



            .snake-item {

                margin-bottom: 20px;

                gap: 6px;

            }



            .snake-item .level-node {

                width: 50px;

                height: 50px;

                font-size: 16px;

            }



            .snake-item .lesson-label {

                font-size: 11px;

                width: 90px;

                max-width: 90px;

                -webkit-line-clamp: 2;

            }



            .snake-line {

                width: 2px;

                opacity: 0.25;

                border-radius: 10px;

            }



            /* Красивая дугообразная змейка для планшетов */

            .snake-item:nth-child(1) { transform: translateX(0px); }

            .snake-item:nth-child(2) { transform: translateX(25px); }

            .snake-item:nth-child(3) { transform: translateX(45px); }

            .snake-item:nth-child(4) { transform: translateX(60px); }

            .snake-item:nth-child(5) { transform: translateX(70px); }

            .snake-item:nth-child(6) { transform: translateX(60px); }

            .snake-item:nth-child(7) { transform: translateX(45px); }

            .snake-item:nth-child(8) { transform: translateX(25px); }

            .snake-item:nth-child(9) { transform: translateX(0px); }

            .snake-item:nth-child(10) { transform: translateX(-25px); }

            .snake-item:nth-child(11) { transform: translateX(-45px); }

            .snake-item:nth-child(12) { transform: translateX(-60px); }

            .snake-item:nth-child(13) { transform: translateX(-70px); }

            .snake-item:nth-child(14) { transform: translateX(-60px); }

            .snake-item:nth-child(15) { transform: translateX(-45px); }

            .snake-item:nth-child(16) { transform: translateX(-25px); }

            .snake-item:nth-child(17) { transform: translateX(0px); }

            .snake-item:nth-child(18) { transform: translateX(25px); }

            .snake-item:nth-child(19) { transform: translateX(45px); }

            .snake-item:nth-child(20) { transform: translateX(60px); }

            .snake-item:nth-child(21) { transform: translateX(70px); }

            .snake-item:nth-child(22) { transform: translateX(60px); }

        }



        @media (max-width: 480px) {
            .premium-lock-overlay {
                inset: 2px;
                padding: 24px 16px;
                gap: 12px;
            }

            .premium-lock-overlay__icon {
                width: 96px;
            }

            .premium-lock-overlay__title {
                font-size: 17px;
            }

            .premium-lock-overlay__subtitle {
                font-size: 13px;
            }

            .premium-lock-overlay__hint {
                font-size: 12px;
                padding: 5px 12px;
            }

            .levels-grid.snake-stage {

                padding: 15px 5px 25px;

            }



            .snake-item {

                margin-bottom: 15px;

                gap: 4px;

            }



            .snake-item .level-node {

                width: 45px;

                height: 45px;

                font-size: 14px;

            }



            .snake-item .lesson-label {

                font-size: 10px;

                width: 70px;

                max-width: 70px;

                line-height: 1.2;

                -webkit-line-clamp: 2;

            }



            .snake-line {

                width: 1.5px;

                opacity: 0.2;

                border-radius: 8px;

            }



            /* Красивая дугообразная змейка для мобильных */

            .snake-item:nth-child(1) { transform: translateX(0px); }

            .snake-item:nth-child(2) { transform: translateX(20px); }

            .snake-item:nth-child(3) { transform: translateX(35px); }

            .snake-item:nth-child(4) { transform: translateX(45px); }

            .snake-item:nth-child(5) { transform: translateX(50px); }

            .snake-item:nth-child(6) { transform: translateX(45px); }

            .snake-item:nth-child(7) { transform: translateX(35px); }

            .snake-item:nth-child(8) { transform: translateX(20px); }

            .snake-item:nth-child(9) { transform: translateX(0px); }

            .snake-item:nth-child(10) { transform: translateX(-20px); }

            .snake-item:nth-child(11) { transform: translateX(-35px); }

            .snake-item:nth-child(12) { transform: translateX(-45px); }

            .snake-item:nth-child(13) { transform: translateX(-50px); }

            .snake-item:nth-child(14) { transform: translateX(-45px); }

            .snake-item:nth-child(15) { transform: translateX(-35px); }

            .snake-item:nth-child(16) { transform: translateX(-20px); }

            .snake-item:nth-child(17) { transform: translateX(0px); }

            .snake-item:nth-child(18) { transform: translateX(20px); }

            .snake-item:nth-child(19) { transform: translateX(35px); }

            .snake-item:nth-child(20) { transform: translateX(45px); }

            .snake-item:nth-child(21) { transform: translateX(50px); }

            .snake-item:nth-child(22) { transform: translateX(45px); }

        }



        /* Стили для кнопок зума и навигации */

        .zoom-controls button,

        .navigation-controls button {

            background: #2A2E39;

            border: 1px solid #484B59;

            color: #FFF;

            padding: 6px 10px;

            border-radius: 6px;

            font-size: 14px;

            cursor: pointer;

            transition: all 0.2s ease;

            min-width: 32px;

            height: 32px;

        }



        .zoom-controls button:hover,

        .navigation-controls button:hover {

            background: #3A3E49;

            border-color: #FCD535;

            transform: scale(1.05);

        }



        .zoom-controls button:active,

        .navigation-controls button:active {

            transform: scale(0.95);

        }



        .navigation-controls button {

            border-color: #26A69A;

        }



        .navigation-controls button:hover {

            border-color: #26A69A;

            background: #26A69A;

        }



        .chart-info {

            font-size: 12px;

            color: #848E9C;

            flex: 1 1 100%;

            order: 3;

            display: flex;

            justify-content: center;

            text-align: center;

        }



        /* Стили для переключателя типов рынка */

        .market-type-selector {

            display: flex;

            gap: 10px;

            margin-bottom: 15px;

        }



        .market-type-btn {

            flex: 1;

            background: #2A2E39;

            border: 2px solid #484B59;

            color: #9CA3AF;

            padding: 12px 20px;

            border-radius: 8px;

            font-size: 14px;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.3s ease;

            text-align: center;

        }



        .market-type-btn.active {

            background: linear-gradient(135deg, #FCD535, #F59E0B);

            border-color: #FCD535;

            color: #1E2329;

            transform: translateY(-2px);

            box-shadow: 0 8px 25px rgba(252, 213, 53, 0.3);

        }



        .market-type-btn:hover:not(.active) {

            background: #3A3E49;

            border-color: #FCD535;

            color: #FFF;

            transform: translateY(-1px);

        }



        .market-type-btn:active {

            transform: translateY(0);

        }



        /* Стили для переключателя типа маржи */

        .margin-mode-btn {

            flex: 1;

            background: #2A2E39;

            border: 1px solid #484B59;

            color: #9CA3AF;

            padding: 8px 12px;

            border-radius: 6px;

            font-size: 12px;

            font-weight: 500;

            cursor: pointer;

            transition: all 0.2s ease;

            text-align: center;

        }



        .margin-mode-btn.active {

            background: #26A69A;

            border-color: #26A69A;

            color: #FFF;

            transform: translateY(-1px);

            box-shadow: 0 4px 12px rgba(38, 166, 154, 0.3);

        }



        .margin-mode-btn:hover:not(.active) {

            background: #3A3E49;

            border-color: #26A69A;

            color: #FFF;

        }



        .margin-mode-btn:active {

            transform: translateY(0);

        }



        /* Achievement Modal with Fireworks */

        .achievement-modal {

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(0, 0, 0, 0.85);

            display: none;

            align-items: center;

            justify-content: center;

            z-index: 10000;

            backdrop-filter: blur(5px);

        }



        .achievement-modal.active {

            display: flex;

            animation: fadeIn 0.3s ease;

        }



        .achievement-content {

            background: linear-gradient(135deg, #1E2026, #14151B);

            border-radius: 24px;

            padding: 40px;

            text-align: center;

            position: relative;

            border: 2px solid rgba(252, 213, 53, 0.3);

            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);

            max-width: 400px;

            animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

        }



        @keyframes scaleIn {

            from {

                transform: scale(0.5);

                opacity: 0;

            }

            to {

                transform: scale(1);

                opacity: 1;

            }

        }



        .achievement-icon {

            font-size: 72px;

            margin-bottom: 20px;

            animation: bounceIn 0.8s ease;

        }



        @keyframes bounceIn {

            0%, 20%, 50%, 80%, 100% {

                transform: translateY(0);

            }

            40% {

                transform: translateY(-30px);

            }

            60% {

                transform: translateY(-15px);

            }

        }



        .achievement-title {

            font-size: 28px;

            font-weight: 700;

            color: #FCD535;

            margin-bottom: 10px;

        }



        .achievement-description {

            font-size: 16px;

            color: #EAECEF;

            margin-bottom: 30px;

        }



        .achievement-close {

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            border: none;

            padding: 12px 32px;

            border-radius: 12px;

            font-weight: 600;

            font-size: 16px;

            cursor: pointer;

            transition: all 0.3s;

        }



        .achievement-close:hover {

            transform: translateY(-2px);

            box-shadow: 0 8px 20px rgba(252, 213, 53, 0.4);

        }



        /* Fireworks Animation */

        .firework {

            position: fixed;

            width: 4px;

            height: 4px;

            border-radius: 50%;

            z-index: 10001;

            pointer-events: none;

        }



        @keyframes fireworkExplode {

            0% {

                transform: translate(0, 0) scale(1);

                opacity: 1;

            }

            100% {

                transform: translate(var(--tx), var(--ty)) scale(0);

                opacity: 0;

            }

        }



        /* Enhanced Transitions for Interactive Elements */

        button,

        .quiz-option,

        .stage-card,

        .episode-card,

        .level-node,

        .answer-btn,

        input,

        select {

            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

        }



        button:hover:not(:disabled),

        .quiz-option:hover:not(.disabled),

        .stage-card:hover:not(.locked),

        .episode-card:hover,

        .level-node:hover:not(.locked) {

            transform: translateY(-4px) scale(1.02);

            box-shadow: 0 10px 25px rgba(252, 213, 53, 0.3);

        }



        button:active:not(:disabled),

        .quiz-option:active:not(.disabled) {

            transform: translateY(-2px) scale(0.98);

            transition: all 0.15s;

        }



        .btn-primary:hover:not(:disabled) {

            transform: translateY(-8px) scale(1.05);

            box-shadow: 0 15px 40px rgba(252, 213, 53, 0.5);

            filter: brightness(1.2);

        }



        .btn-secondary:hover {

            transform: translateY(-6px) scale(1.03);

            box-shadow: 0 12px 30px rgba(240, 185, 11, 0.35);

        }



        .back-btn {

            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

        }



        .back-btn:hover {

            transform: translateX(-8px) scale(1.15);

            text-shadow: 0 0 15px rgba(252, 213, 53, 0.8);

        }



        input:focus,

        select:focus {

            outline: none;

            border-color: #FCD535;

            box-shadow: 0 0 0 4px rgba(252, 213, 53, 0.3), 0 8px 20px rgba(252, 213, 53, 0.2);

            transform: scale(1.05);

        }



        /* Ripple Effect */

        .ripple {

            position: relative;

            overflow: hidden;

        }



        .ripple::after {

            content: '';

            position: absolute;

            top: 50%;

            left: 50%;

            width: 0;

            height: 0;

            border-radius: 50%;

            background: radial-gradient(circle, rgba(252, 213, 53, 0.8) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(252, 213, 53, 0.3) 100%);

            transform: translate(-50%, -50%);

            transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s;

            opacity: 1;

            box-shadow: 0 0 20px rgba(252, 213, 53, 0.6);

        }



        .ripple:active::after {

            width: 500px;

            height: 500px;

            opacity: 0;

        }



        button {

            position: relative;

            overflow: hidden;

        }



        /* Icon Animations */

        .stage-icon,

        .achievement-icon,

        .mode-icon,

        .episode-icon {

            display: inline-block;

            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

        }



        .stage-card:hover .stage-icon,

        .episode-card:hover .episode-icon {

            animation: iconBounce 0.6s ease;

        }



        @keyframes iconBounce {

            0%, 100% {

                transform: translateY(0) rotate(0deg);

            }

            25% {

                transform: translateY(-10px) rotate(-5deg);

            }

            50% {

                transform: translateY(0) rotate(0deg);

            }

            75% {

                transform: translateY(-5px) rotate(5deg);

            }

        }



        /* Icon Scale Pulse */

        @keyframes iconPulse {

            0%, 100% {

                transform: scale(1);

            }

            50% {

                transform: scale(1.15);

            }

        }



        /* Icon Float */

        @keyframes iconFloat {

            0%, 100% {

                transform: translateY(0);

            }

            50% {

                transform: translateY(-8px);

            }

        }



        /* Icon Rotation on Hover */

        .level-node:hover {

            animation: iconRotate 0.5s ease;

        }



        @keyframes iconRotate {

            0% {

                transform: rotate(0deg);

            }

            25% {

                transform: rotate(-10deg);

            }

            75% {

                transform: rotate(10deg);

            }

            100% {

                transform: rotate(0deg);

            }

        }



        /* Icon Color Shift with Glow */

        .stage-icon:hover {

            filter: drop-shadow(0 0 10px rgba(252, 213, 53, 0.8));

            transform: scale(1.2);

        }



        /* Floating Animation for Special Icons */

        .achievement-icon {

            animation: iconFloat 2s ease-in-out infinite;

        }



        /* Confetti Particle */

        .confetti-particle {

            position: fixed;

            width: 10px;

            height: 10px;

            z-index: 10000;

            pointer-events: none;

        }



        @keyframes confettiFall {

            0% {

                transform: translateY(0) rotate(0deg);

                opacity: 1;

            }

            100% {

                transform: translateY(100vh) rotate(720deg);

                opacity: 0;

            }

        }



        /* Shake Animation */

        @keyframes shake {

            0%, 100% {

                transform: translateX(0);

            }

            10%, 30%, 50%, 70%, 90% {

                transform: translateX(-4px);

            }

            20%, 40%, 60%, 80% {

                transform: translateX(4px);

            }

        }



        .shake {

            animation: shake 0.6s ease-in-out;

        }



        /* Star Particle for XP */

        .star-particle {

            position: fixed;

            font-size: 20px;

            z-index: 9999;

            pointer-events: none;

            animation: starFloat 1.5s ease-out forwards;

        }



        @keyframes starFloat {

            0% {

                transform: translateY(0) scale(0);

                opacity: 1;

            }

            50% {

                transform: translateY(-50px) scale(1);

            }

            100% {

                transform: translateY(-100px) scale(0.5);

                opacity: 0;

            }

        }



        /* GM Streak Counter */

        .gm-streak {

            display: none;

            align-items: center;

            justify-content: center;

            width: 46px;

            height: 46px;

            padding: 0;

            border-radius: 16px;

            background: linear-gradient(135deg, #FCD535 0%, #F0B90B 45%, #F8DC6E 100%);

            border: none;

            box-shadow: 0 10px 26px rgba(252, 213, 53, 0.45);

            cursor: pointer;

            transition: transform 0.18s ease, box-shadow 0.18s ease;

            flex: 0 0 auto;

            min-width: 0;

            color: #0B0E11;

            font: inherit;

            outline: none;

            appearance: none;

            -webkit-appearance: none;

            line-height: 1;

        }



        .gm-streak:hover {

            transform: translateY(-1px) scale(1.02);

            box-shadow: 0 14px 32px rgba(252, 213, 53, 0.55);

        }



        .gm-streak:focus-visible {

            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 14px 32px rgba(252, 213, 53, 0.55);

        }



        .gm-fire {

            position: relative;

            display: inline-flex;

            align-items: center;

            justify-content: center;

            width: 100%;

            height: 100%;

            font-size: 24px;

            filter: drop-shadow(0 0 10px rgba(252, 213, 53, 0.55));

        }



        .gm-fire::after {

            content: 'GM';

            position: absolute;

            bottom: 6px;

            left: 50%;

            transform: translateX(-50%);

            font-size: 10px;

            font-weight: 700;

            letter-spacing: 0.12em;

            color: #0B0E11;

            text-shadow: 0 0 10px rgba(255, 255, 255, 0.75);

        }

        .gm-streak .gm-streak-count,

        .gm-streak .gm-day-chip {

            display: none;

        }


        .gm-streak-count {

            font-size: 13px;

            font-weight: 600;

            color: #F6F7F8;

        }



        .gm-day-chip {

            font-size: 12px;

            font-weight: 600;

            padding: 6px 12px;

            border-radius: 999px;

            background: rgba(252, 213, 53, 0.18);

            color: #FCD535;

        }



        .gm-term-overlay {

            position: fixed;

            inset: 0;

            display: none;

            align-items: center;

            justify-content: center;

            padding: 24px;

            background: rgba(6, 8, 12, 0.82);

            backdrop-filter: blur(14px);

            z-index: 2000;

        }



        .gm-term-overlay.visible {

            display: flex;

        }



        .gm-term-modal {

            position: relative;

            width: min(520px, 100%);

            background: linear-gradient(135deg, rgba(24, 26, 32, 0.95), rgba(11, 14, 17, 0.95));

            border-radius: 28px;

            padding: 36px;

            border: 1px solid rgba(252, 213, 53, 0.28);

            box-shadow: 0 28px 88px rgba(0, 0, 0, 0.65);

            color: #F4F5F6;

        }



        .gm-term-close {

            position: absolute;

            top: 18px;

            right: 18px;

            background: rgba(24, 26, 32, 0.85);

            color: #F6F8FA;

            border: 1px solid rgba(255, 255, 255, 0.08);

            border-radius: 12px;

            width: 36px;

            height: 36px;

            font-size: 16px;

            cursor: pointer;

            display: inline-flex;

            align-items: center;

            justify-content: center;

            transition: background 0.2s ease, transform 0.2s ease;

        }



        .gm-term-close:hover {

            background: rgba(252, 213, 53, 0.18);

            color: #FCD535;

            transform: scale(1.05);

        }



        .gm-term-header {

            display: flex;

            align-items: center;

            justify-content: space-between;

            gap: 18px;

        }



        .gm-term-flame {

            font-size: 48px;

            filter: drop-shadow(0 0 12px rgba(252, 213, 53, 0.55));

            animation: fireFlicker 1.8s infinite;

        }



        .gm-term-meta {

            display: flex;

            flex-direction: column;

            gap: 6px;

        }



        .gm-term-eyebrow {

            text-transform: uppercase;

            letter-spacing: 0.32em;

            font-size: 12px;

            color: rgba(252, 213, 53, 0.65);

        }



        .gm-term-title {

            margin: 0;

            font-size: 32px;

            letter-spacing: -0.01em;

            color: #FFFFFF;

        }



        .gm-term-day {

            display: flex;

            flex-direction: column;

            align-items: flex-end;

            gap: 6px;

        }



        .gm-term-day-label {

            font-size: 14px;

            font-weight: 600;

            letter-spacing: 0.12em;

            text-transform: uppercase;

            color: rgba(252, 213, 53, 0.8);

        }



        .gm-term-streak {

            font-size: 12px;

            color: rgba(248, 249, 250, 0.8);

            letter-spacing: 0.12em;

            text-transform: uppercase;

        }



        .gm-term-definition {

            margin: 24px 0 28px;

            font-size: 18px;

            line-height: 1.6;

            color: #C3CBD8;

        }



        .gm-term-progress {

            position: relative;

            height: 6px;

            border-radius: 999px;

            background: rgba(37, 41, 48, 0.85);

            overflow: hidden;

        }



        .gm-term-progress-fill {

            height: 100%;

            width: 0%;

            border-radius: inherit;

            background: linear-gradient(90deg, rgba(252, 213, 53, 1), rgba(240, 185, 11, 1));

            box-shadow: 0 0 22px rgba(252, 213, 53, 0.4);

            transition: width 0.3s ease;

        }



        .gm-term-actions {

            display: flex;

            flex-wrap: wrap;

            gap: 12px;

            margin-top: 28px;

        }



        .gm-term-primary,

        .gm-term-secondary {

            font-family: inherit;

            font-size: 16px;

            font-weight: 600;

            padding: 14px 18px;

            border-radius: 18px;

            border: none;

            cursor: pointer;

            transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;

        }



        .gm-term-primary {

            flex: 1;

            min-width: 160px;

            background: linear-gradient(135deg, #FCD535, #F0B90B);

            color: #0B0E11;

            box-shadow: 0 16px 40px rgba(252, 213, 53, 0.4);

        }



        .gm-term-primary:disabled {

            opacity: 0.6;

            cursor: not-allowed;

            box-shadow: none;

        }



        .gm-term-secondary {

            background: rgba(24, 27, 33, 0.9);

            border: 1px solid rgba(252, 213, 53, 0.28);

            color: #FCD535;

        }

        .gm-term-secondary:disabled {

            opacity: 0.6;

            cursor: not-allowed;

        }



        .gm-term-actions button:hover:not(:disabled) {

            transform: translateY(-2px);

        }



        .gm-term-status {

            margin-top: 22px;

            font-size: 13px;

            letter-spacing: 0.16em;

            text-transform: uppercase;

        }



        .gm-term-practice {

            margin-top: 24px;

            padding: 18px 20px;

            border-radius: 18px;

            background: rgba(20, 23, 29, 0.85);

            border: 1px solid rgba(252, 213, 53, 0.22);

            display: flex;

            flex-direction: column;

            gap: 12px;

        }



        .gm-term-practice[hidden] {

            display: none !important;

        }



        .gm-practice-question {

            margin: 0;

            font-size: 16px;

            font-weight: 600;

            color: #F7F9FB;

        }



        .gm-practice-options {

            display: flex;

            flex-direction: column;

            gap: 10px;

        }



        .gm-practice-option {

            padding: 12px 14px;

            border-radius: 14px;

            border: 1px solid rgba(252, 213, 53, 0.18);

            background: rgba(17, 20, 25, 0.85);

            color: #E3E6EB;

            font-weight: 500;

            text-align: left;

            cursor: pointer;

            transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;

        }



        .gm-practice-option:hover:not(.disabled) {

            transform: translateY(-2px);

            border-color: rgba(252, 213, 53, 0.32);

        }



        .gm-practice-option.correct {

            border-color: #0ECB81;

            background: rgba(14, 203, 129, 0.14);

            color: #D4FFF1;

        }



        .gm-practice-option.wrong {

            border-color: #F6465D;

            background: rgba(246, 70, 93, 0.12);

        }



        .gm-practice-option.disabled {

            cursor: default;

            pointer-events: none;

            opacity: 0.82;

        }



        .gm-practice-feedback {

            font-size: 14px;

            color: #C1CAD5;

            line-height: 1.45;

        }



        .gm-practice-feedback.success {

            color: #0ECB81;

        }



        .gm-practice-feedback.error {

            color: #F4B740;

        }



        .gm-practice-followup {

            margin: 0;

            font-size: 14px;

            color: rgba(255, 255, 255, 0.72);

        }



        .gm-practice-reset {

            align-self: flex-start;

            padding: 10px 16px;

            border-radius: 12px;

            border: 1px solid rgba(252, 213, 53, 0.32);

            background: transparent;

            color: #FCD535;

            font-weight: 600;

            cursor: pointer;

            transition: background 0.18s ease, color 0.18s ease;

        }



        .gm-practice-reset:hover {

            background: rgba(252, 213, 53, 0.16);

            color: #FFFFFF;

        }



        .gm-practice-reset[hidden] {

            display: none;

        }



        .gm-status-info {

            color: rgba(154, 164, 178, 0.9);

        }



        .gm-status-success {

            color: #0ECB81;

        }



        .gm-status-warning {

            color: #F4B740;

        }



        @media (max-width: 600px) {

    .top-bar {

        flex-direction: column;

        align-items: stretch;

        gap: 12px;

    }



    .top-bar-main {

        flex: 0 0 auto;

        width: 100%;

        gap: 12px;

    }



    .top-bar-header {

        gap: 12px;

    }

    .top-bar-progress {

        flex-direction: column;

        align-items: flex-start;

        gap: 10px;

    }

    .top-bar-progress .xp-bar {

        width: 100%;

    }

    .top-bar-actions {

        flex-wrap: nowrap;

        gap: 10px;

    }



    .top-bar-actions .xp-text {

        flex: 0 0 auto;

        white-space: nowrap;

        justify-content: flex-end;

        text-align: right;

        min-width: 0;

        margin-right: 4px;

        font-size: 13px;

    }



    .top-bar-header .theme-toggle {

        flex: 0 0 44px;

    }



    .top-bar-main .gm-streak {

        flex: 1 1 auto;

        width: auto;

        min-width: 0;

        justify-content: space-between;

        padding: 10px 14px;

        gap: 10px;

    }



            .top-bar-main .gm-streak {

                width: 42px;

                height: 42px;

            }



            .top-bar-main .gm-streak .gm-fire {

                font-size: 22px;

            }



            .top-bar-main .gm-streak .gm-fire::after {

                font-size: 9px;

                bottom: 4px;

            }



            .gm-term-modal {

                padding: 28px 22px 26px;

            }



            .gm-term-title {

                font-size: 26px;

            }



            .gm-term-definition {

                font-size: 16px;

            }



            .gm-term-actions {

                flex-direction: column;

            }



            .gm-term-primary,

            .gm-term-secondary {

                width: 100%;

            }

        

            .gm-term-practice {



                padding: 16px;



                gap: 10px;



            }







            .gm-practice-question {



                font-size: 15px;



            }







            .gm-practice-options {



                gap: 8px;



            }







            .gm-practice-option {



                font-size: 14px;



                padding: 12px;



            }







            .gm-practice-reset {



                width: 100%;



                text-align: center;



            }

}



        /* Holographic Effect for Achievements */

        .holographic {

            position: relative;

            background: linear-gradient(

                45deg,

                #ff0080 0%,

                #ff8c00 20%,

                #40e0d0 40%,

                #00ff00 60%,

                #ff00ff 80%,

                #ff0080 100%

            );

            background-size: 300% 300%;

            animation: holographicShift 3s ease infinite;

            -webkit-background-clip: text;

            -webkit-text-fill-color: transparent;

            background-clip: text;

        }



        @keyframes holographicShift {

            0%, 100% {

                background-position: 0% 50%;

            }

            50% {

                background-position: 100% 50%;

            }

        }



        .achievement-icon.holographic {

            background: linear-gradient(

                45deg,

                #ff0080,

                #ff8c00,

                #40e0d0,

                #ff00ff,

                #00ff00,

                #ff0080

            );

            background-size: 400% 400%;

            animation: holographicShift 3s ease infinite;

            -webkit-background-clip: text;

            -webkit-text-fill-color: transparent;

            background-clip: text;

            filter: drop-shadow(0 0 20px rgba(255, 0, 128, 0.6));

        }



        /* Twinkling Stars Background */

        .twinkle-star {

            position: fixed;

            width: 2px;

            height: 2px;

            background: white;

            border-radius: 50%;

            pointer-events: none;

            z-index: 1;

            animation: twinkle linear infinite;

        }



        @keyframes twinkle {

            0%, 100% {

                opacity: 0;

                transform: scale(0);

            }

            50% {

                opacity: 1;

                transform: scale(1);

            }

        }



        /* Parallax Scroll Effect */

        .parallax-layer {

            transition: transform 0.1s ease-out;

        }



        /* True/False Quiz Styles */

        .true-false-container {

            text-align: center;

            padding: 30px 20px;

        }



        .true-false-question {

            font-size: 20px;

            font-weight: 600;

            color: #EAECEF;

            margin-bottom: 30px;

            line-height: 1.6;

            padding: 0 10px;

        }



        .true-false-timer {

            font-size: 48px;

            font-weight: 700;

            color: #FCD535;

            margin-bottom: 30px;

            text-shadow: 0 0 20px rgba(252, 213, 53, 0.5);

            font-family: 'Courier New', monospace;

        }



        .true-false-timer.warning {

            color: #EF5350;

            animation: pulse-timer 1s infinite;

        }



        @keyframes pulse-timer {

            0%, 100% {

                transform: scale(1);

                text-shadow: 0 0 20px rgba(239, 83, 80, 0.5);

            }

            50% {

                transform: scale(1.1);

                text-shadow: 0 0 30px rgba(239, 83, 80, 0.8);

            }

        }



        .true-false-buttons {

            display: flex;

            gap: 15px;

            justify-content: center;

            flex-wrap: wrap;

        }



        .true-false-btn {

            flex: 1;

            min-width: 140px;

            max-width: 200px;

            padding: 18px 25px;

            font-size: 18px;

            font-weight: 600;

            border: none;

            border-radius: 12px;

            cursor: pointer;

            transition: all 0.3s;

            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

        }



        .true-btn {

            background: linear-gradient(135deg, #4CAF50, #45a049);

            color: white;

        }



        .true-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);

        }



        .false-btn {

            background: linear-gradient(135deg, #EF5350, #e53935);

            color: white;

        }



        .false-btn:hover {

            transform: translateY(-2px);

            box-shadow: 0 6px 20px rgba(239, 83, 80, 0.4);

        }



        .true-false-btn.correct {

            background: linear-gradient(135deg, #4CAF50, #66BB6A);

            animation: pulse-correct 0.6s;

        }



        .true-false-btn.incorrect {

            background: linear-gradient(135deg, #EF5350, #EF5350);

            animation: shake 0.5s;

        }



        @keyframes pulse-correct {

            0%, 100% { transform: scale(1); }

            50% { transform: scale(1.05); }

        }



        @keyframes shake {

            0%, 100% { transform: translateX(0); }

            25% { transform: translateX(-10px); }

            75% { transform: translateX(10px); }

        }



        @media (max-width: 768px) {

            .true-false-question {

                font-size: 18px;

            }



            .true-false-timer {

                font-size: 36px;

            }



            .true-false-btn {

                min-width: 120px;

                padding: 15px 20px;

                font-size: 16px;

            }

        }



/* ========================================

   НОВЫЕ ТИПЫ ИГР - CSS СТИЛИ

   ======================================== */



/* ==================== БЛИЦ-ВИКТОРИНА ==================== */

.blitz-quiz-container {

    text-align: center;

    padding: 20px;

    position: relative;

}



.blitz-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 30px;

    padding: 15px 20px;

    background: #181A20;

    border-radius: 12px;

}



.blitz-streak {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 18px;

    font-weight: 600;

    color: #FCD535;

}



.blitz-streak-icon {

    font-size: 24px;

    animation: flame-flicker 1s infinite;

}



@keyframes flame-flicker {

    0%, 100% { transform: scale(1) rotate(-5deg); }

    50% { transform: scale(1.1) rotate(5deg); }

}



.blitz-timer-ring {

    position: relative;

    width: 80px;

    height: 80px;

}



.blitz-timer-svg {

    transform: rotate(-90deg);

}



.blitz-timer-circle-bg {

    fill: none;

    stroke: #252930;

    stroke-width: 6;

}



.blitz-timer-circle {

    fill: none;

    stroke: #FCD535;

    stroke-width: 6;

    stroke-linecap: round;

    transition: stroke-dashoffset 0.1s linear, stroke 0.3s;

}



.blitz-timer-circle.warning {

    stroke: #EF5350;

    animation: pulse-ring 0.5s infinite;

}



@keyframes pulse-ring {

    0%, 100% { opacity: 1; }

    50% { opacity: 0.7; }

}



.blitz-timer-text {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    font-size: 24px;

    font-weight: 700;

    color: #FCD535;

}



.blitz-timer-text.warning {

    color: #EF5350;

}



.blitz-question-counter {

    font-size: 14px;

    color: #848E9C;

    margin-bottom: 20px;

}



.blitz-question-text {

    font-size: 22px;

    font-weight: 600;

    color: #EAECEF;

    margin-bottom: 30px;

    line-height: 1.5;

    min-height: 66px;

    display: flex;

    align-items: center;

    justify-content: center;

}



.blitz-options {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 12px;

    margin-bottom: 20px;

}



.blitz-option {

    background: #181A20;

    padding: 18px 20px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    font-size: 16px;

    font-weight: 500;

    text-align: center;

}



.blitz-option:hover {

    transform: translateY(-2px);

    border-color: #FCD535;

    box-shadow: 0 4px 15px rgba(252, 213, 53, 0.2);

}



.blitz-option.correct {

    background: #0ECB81;

    color: white;

    border-color: #0ECB81;

    animation: pulse-correct 0.5s;

}



.blitz-option.wrong {

    background: #F6465D;

    color: white;

    border-color: #F6465D;

    animation: shake 0.5s;

}



.blitz-option.disabled {

    cursor: not-allowed;

    opacity: 0.5;

}



.blitz-results {

    text-align: center;

    padding: 30px 20px;

}



.blitz-results-title {

    font-size: 32px;

    font-weight: 700;

    color: #FCD535;

    margin-bottom: 20px;

}



.blitz-results-score {

    font-size: 48px;

    font-weight: 700;

    color: #0ECB81;

    margin-bottom: 10px;

}



.blitz-results-subtitle {

    font-size: 18px;

    color: #848E9C;

    margin-bottom: 30px;

}



.blitz-results-stats {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));

    gap: 15px;

    margin-bottom: 30px;

}



.blitz-stat {

    background: #181A20;

    padding: 20px;

    border-radius: 12px;

    text-align: center;

}



.blitz-stat-value {

    font-size: 28px;

    font-weight: 700;

    color: #FCD535;

    margin-bottom: 5px;

}



.blitz-stat-label {

    font-size: 14px;

    color: #848E9C;

}



/* ==================== СОПОСТАВЛЕНИЕ ТЕРМИНОВ ==================== */

.term-matching-container {

    padding: 20px;

}



.term-matching-instructions {

    background: #181A20;

    padding: 15px 20px;

    border-radius: 12px;

    margin-bottom: 20px;

    text-align: center;

    color: #848E9C;

    font-size: 14px;

}



.term-matching-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 30px;

    margin-bottom: 30px;

    position: relative;

}



.term-column {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.term-column-title {

    font-size: 16px;

    font-weight: 600;

    color: #FCD535;

    margin-bottom: 8px;

    text-align: center;

}



.term-item {

    background: #181A20;

    padding: 18px 20px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    font-size: 15px;

    line-height: 1.4;

    position: relative;

    user-select: none;

}



.term-item:hover {

    border-color: #FCD535;

    transform: translateX(5px);

}



.term-item.selected {

    border-color: #FCD535;

    background: rgba(252, 213, 53, 0.1);

    box-shadow: 0 0 20px rgba(252, 213, 53, 0.3);

}



.term-item.matched {

    border-color: #0ECB81;

    background: rgba(14, 203, 129, 0.1);

    cursor: default;

    opacity: 0.7;

}



.term-item.wrong-match {

    border-color: #F6465D;

    background: rgba(246, 70, 93, 0.1);

    animation: shake 0.5s;

}



.term-item.correct-match {

    border-color: #0ECB81;

    background: rgba(14, 203, 129, 0.2);

    animation: pulse-correct 0.5s;

}



.term-item-number {

    display: inline-block;

    width: 24px;

    height: 24px;

    background: #FCD535;

    color: #0B0E11;

    border-radius: 50%;

    text-align: center;

    line-height: 24px;

    font-weight: 600;

    font-size: 12px;

    margin-right: 10px;

}



.term-item.matched .term-item-number {

    background: #0ECB81;

}



.matching-svg-container {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    pointer-events: none;

    z-index: 1;

}



.matching-line {

    stroke: #FCD535;

    stroke-width: 2;

    fill: none;

    opacity: 0.6;

}



.matching-line.correct {

    stroke: #0ECB81;

    opacity: 1;

    stroke-width: 3;

}



.matching-line.wrong {

    stroke: #F6465D;

    opacity: 1;

    stroke-width: 3;

}



.term-matching-check-btn {

    width: 100%;

    padding: 15px;

    background: linear-gradient(135deg, #FCD535, #F0B90B);

    color: #0B0E11;

    border: none;

    border-radius: 12px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.3s;

}



.term-matching-check-btn:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



.term-matching-check-btn:hover:not(:disabled) {

    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.4);

}



/* ==================== ВСТАВКА ТЕРМИНА ==================== */

.fill-term-container {

    padding: 20px;

}



.fill-term-progress {

    text-align: center;

    font-size: 14px;

    color: #848E9C;

    margin-bottom: 10px;

}



.fill-term-score {

    text-align: center;

    font-size: 16px;

    color: #FCD535;

    font-weight: 600;

    margin-bottom: 20px;

}



.fill-term-sentence {

    background: #181A20;

    padding: 25px;

    border-radius: 12px;

    font-size: 18px;

    line-height: 1.8;

    margin-bottom: 30px;

    text-align: center;

}



.fill-term-blank {

    display: inline-block;

    min-width: 150px;

    padding: 8px 20px;

    margin: 0 5px;

    background: #252930;

    border: 2px dashed #FCD535;

    border-radius: 8px;

    color: #FCD535;

    font-weight: 600;

    vertical-align: middle;

    transition: all 0.3s;

    cursor: pointer;

}



.fill-term-blank.filled {

    background: rgba(252, 213, 53, 0.1);

    border-style: solid;

}



.fill-term-blank.correct {

    background: rgba(14, 203, 129, 0.2);

    border-color: #0ECB81;

    color: #0ECB81;

    animation: pulse-correct 0.5s;

}



.fill-term-blank.wrong {

    background: rgba(246, 70, 93, 0.2);

    border-color: #F6465D;

    color: #F6465D;

    animation: shake 0.5s;

}



.fill-term-options-title {

    font-size: 16px;

    color: #848E9C;

    text-align: center;

    margin-bottom: 15px;

}



.fill-term-options {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 12px;

    margin-bottom: 20px;

}



.fill-term-option {

    background: #181A20;

    padding: 15px 20px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    text-align: center;

    font-size: 16px;

    font-weight: 500;

}



.fill-term-option:hover {

    border-color: #FCD535;

    transform: translateY(-2px);

    box-shadow: 0 4px 15px rgba(252, 213, 53, 0.2);

}



.fill-term-option.used {

    opacity: 0.3;

    cursor: not-allowed;

}



.fill-term-option.selected {

    border-color: #FCD535;

    background: rgba(252, 213, 53, 0.1);

}



.fill-term-feedback {

    text-align: center;

    padding: 15px;

    border-radius: 12px;

    margin-top: 20px;

    font-size: 16px;

    font-weight: 600;

}



.fill-term-feedback.correct {

    background: rgba(14, 203, 129, 0.1);

    color: #0ECB81;

    border: 2px solid #0ECB81;

}



.fill-term-feedback.wrong {

    background: rgba(246, 70, 93, 0.1);

    color: #F6465D;

    border: 2px solid #F6465D;

}



/* Term Matching Styles */

.term-matching-container {

    padding: 20px;

    max-width: 800px;

    margin: 0 auto;

}



.term-matching-progress {

    text-align: center;

    font-size: 14px;

    color: #848E9C;

    margin-bottom: 20px;

}



.term-matching-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-bottom: 30px;

}



.term-matching-column {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.term-matching-item {

    background: #181A20;

    padding: 20px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    height: 100%;

    min-height: 100px;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    font-size: 15px;

    line-height: 1.5;

}



.term-matching-item:hover {

    border-color: #FCD535;

    transform: translateY(-2px);

    box-shadow: 0 4px 15px rgba(252, 213, 53, 0.2);

}



.term-matching-item.selected {

    border-color: #FCD535;

    background: rgba(252, 213, 53, 0.1);

}



.term-matching-item.matched {

    border-color: #0ECB81;

    background: rgba(14, 203, 129, 0.1);

    cursor: default;

    opacity: 0.6;

}



.term-matching-item.wrong {

    border-color: #F6465D;

    background: rgba(246, 70, 93, 0.1);

    animation: shake 0.5s;

}



.term-matching-item.disabled {

    opacity: 0.3;

    cursor: not-allowed;

    pointer-events: none;

}



/* ==================== ПАМЯТЬ-ПАРЫ ==================== */

.memory-pairs-container {

    padding: 20px;

}



.memory-stats {

    display: flex;

    justify-content: space-around;

    background: #181A20;

    padding: 15px;

    border-radius: 12px;

    margin-bottom: 20px;

}



.memory-stat {

    text-align: center;

}



.memory-stat-value {

    font-size: 24px;

    font-weight: 700;

    color: #FCD535;

}



.memory-stat-label {

    font-size: 12px;

    color: #848E9C;

    margin-top: 4px;

}



.memory-grid {

    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 8px;

    margin-bottom: 20px;

    max-width: 500px;

    margin-left: auto;

    margin-right: auto;

}



@media (max-width: 600px) {

    .memory-grid {

        gap: 6px;

                    }

}



.memory-card {

    aspect-ratio: 0.8;

    background: #181A20;

    border-radius: 8px;

    cursor: pointer;

    position: relative;

    transition: transform 0.3s;

    transform-style: preserve-3d;

    min-height: 100px;

}



.memory-card:hover:not(.flipped):not(.matched) {

    transform: scale(1.05);

}



.memory-card.flipped {

    transform: rotateY(180deg);

}



.memory-card.matched {

    opacity: 0.6;

    cursor: default;

}



.memory-card.matched::after {

    content: '✓';

    position: absolute;

    top: 5px;

    right: 5px;

    background: #0ECB81;

    color: white;

    width: 24px;

    height: 24px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 16px;

    font-weight: bold;

    z-index: 10;

    box-shadow: 0 2px 8px rgba(14, 203, 129, 0.4);

}



.memory-card-front,

.memory-card-back {

    position: absolute;

    width: 100%;

    height: 100%;

    backface-visibility: hidden;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    padding: 8px;

    text-align: center;

    font-size: 11px;

    line-height: 1.2;

}



.memory-card-front {

    background: linear-gradient(135deg, #FCD535, #F0B90B);

    color: #0B0E11;

    font-weight: 600;

    font-size: 24px;

}



.memory-card-back {

    background: #252930;

    color: #EAECEF;

    transform: rotateY(180deg);

    font-size: 10px;

    overflow: hidden;

}



.memory-card-back svg {

    width: 100%;

    height: 60%;

    margin-bottom: 4px;

}



.memory-card-back .card-text {

    font-size: 10px;

    font-weight: 600;

    margin-top: auto;

}



.term-card {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    font-size: 11px;

    font-weight: 600;

    color: #FCD535;

    line-height: 1.4;

}



.memory-card.matched .memory-card-back {

    background: linear-gradient(135deg, rgba(14, 203, 129, 0.3), rgba(14, 203, 129, 0.1));

    border: 2px solid #0ECB81;

}



.memory-results {

    text-align: center;

    padding: 20px;

}



.memory-results-title {

    font-size: 28px;

    font-weight: 700;

    color: #FCD535;

    margin-bottom: 20px;

}



.memory-results-stats {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;

    margin-bottom: 20px;

}



.memory-result-stat {

    background: #181A20;

    padding: 15px;

    border-radius: 12px;

}



.memory-result-stat-value {

    font-size: 24px;

    font-weight: 700;

    color: #0ECB81;

}



.memory-result-stat-label {

    font-size: 14px;

    color: #848E9C;

    margin-top: 5px;

}



/* ==================== ПРИЧИНА-СЛЕДСТВИЕ ==================== */

.cause-effect-container {

    padding: 20px;

}



.cause-effect-instructions {

    background: #181A20;

    padding: 15px 20px;

    border-radius: 12px;

    margin-bottom: 20px;

    text-align: center;

    color: #848E9C;

    font-size: 14px;

}



.cause-effect-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 30px;

    margin-bottom: 30px;

    position: relative;

}



.cause-effect-column {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.cause-effect-column-title {

    font-size: 16px;

    font-weight: 600;

    color: #FCD535;

    margin-bottom: 8px;

    text-align: center;

}



.cause-item,

.effect-item {

    background: #181A20;

    padding: 18px 20px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    font-size: 15px;

    line-height: 1.4;

    position: relative;

    user-select: none;

}



.cause-item:hover,

.effect-item:hover {

    border-color: #FCD535;

}



.cause-item.selected {

    border-color: #FCD535;

    background: rgba(252, 213, 53, 0.1);

    box-shadow: 0 0 20px rgba(252, 213, 53, 0.3);

}



.effect-item.selected {

    border-color: #FCD535;

    background: rgba(252, 213, 53, 0.1);

}



.cause-item.connected,

.effect-item.connected {

    border-color: #0ECB81;

    background: rgba(14, 203, 129, 0.1);

}



.cause-effect-svg-container {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    pointer-events: none;

    z-index: 1;

}



.cause-effect-line {

    stroke: #FCD535;

    stroke-width: 2;

    fill: none;

    opacity: 0.6;

    marker-end: url(#arrowhead);

}



.cause-effect-line.correct {

    stroke: #0ECB81;

    opacity: 1;

    stroke-width: 3;

    marker-end: url(#arrowhead-correct);

}



.cause-effect-line.wrong {

    stroke: #F6465D;

    opacity: 1;

    stroke-width: 3;

    marker-end: url(#arrowhead-wrong);

}



.cause-effect-item-number {

    display: inline-block;

    width: 24px;

    height: 24px;

    background: #FCD535;

    color: #0B0E11;

    border-radius: 50%;

    text-align: center;

    line-height: 24px;

    font-weight: 600;

    font-size: 12px;

    margin-right: 10px;

}



.cause-item.connected .cause-effect-item-number,

.effect-item.connected .cause-effect-item-number {

    background: #0ECB81;

}



.cause-effect-check-btn {

    width: 100%;

    padding: 15px;

    background: linear-gradient(135deg, #FCD535, #F0B90B);

    color: #0B0E11;

    border: none;

    border-radius: 12px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.3s;

}



.cause-effect-check-btn:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



.cause-effect-check-btn:hover:not(:disabled) {

    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.4);

}



/* ==================== ЧТО ЗА ПАТТЕРН? (PATTERN RECOGNITION) ==================== */

.pattern-recognition-container {

    padding: 20px;

    text-align: center;

}



.pattern-chart-container {

    background: #181A20;

    border-radius: 16px;

    padding: 30px;

    margin: 30px auto;

    max-width: 600px;

    position: relative;

}



.pattern-chart-title {

    font-size: 16px;

    color: #848E9C;

    margin-bottom: 20px;

}



.pattern-canvas {

    width: 100%;

    height: 300px;

    background: #0B0E11;

    border-radius: 12px;

    border: 2px solid #252930;

}



.pattern-question {

    font-size: 20px;

    font-weight: 600;

    color: #EAECEF;

    margin: 30px 0 20px;

}



.pattern-options {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 12px;

    margin-bottom: 20px;

}



.pattern-option {

    background: #181A20;

    padding: 20px 25px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    font-size: 16px;

    font-weight: 500;

    text-align: center;

}



.pattern-option:hover {

    border-color: #FCD535;

    transform: translateY(-3px);

    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.25);

}



.pattern-option.correct {

    background: linear-gradient(135deg, rgba(14, 203, 129, 0.2), rgba(14, 203, 129, 0.1));

    border-color: #0ECB81;

    color: #0ECB81;

    animation: pulse-correct 0.6s;

}



.pattern-option.wrong {

    background: linear-gradient(135deg, rgba(246, 70, 93, 0.2), rgba(246, 70, 93, 0.1));

    border-color: #F6465D;

    color: #F6465D;

    animation: shake 0.5s;

}



.pattern-option.disabled {

    cursor: not-allowed;

    opacity: 0.5;

}



.pattern-explanation {

    background: #181A20;

    padding: 20px;

    border-radius: 12px;

    margin-top: 20px;

    text-align: left;

    border-left: 4px solid #FCD535;

    display: none;

}



.pattern-explanation.show {

    display: block;

    animation: slideDown 0.3s ease-out;

}



@keyframes slideDown {

    from {

        opacity: 0;

        transform: translateY(-10px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.pattern-explanation-title {

    font-size: 16px;

    font-weight: 600;

    color: #FCD535;

    margin-bottom: 10px;

}



.pattern-explanation-text {

    font-size: 14px;

    color: #EAECEF;

    line-height: 1.6;

}



.pattern-score {

    background: #181A20;

    padding: 15px;

    border-radius: 12px;

    margin-bottom: 20px;

    display: flex;

    justify-content: space-around;

}



.pattern-score-item {

    text-align: center;

}



.pattern-score-value {

    font-size: 24px;

    font-weight: 700;

    color: #FCD535;

}



.pattern-score-label {

    font-size: 12px;

    color: #848E9C;

    margin-top: 4px;

}



/* ==================== ЧТО ЗА СВЕЧА? (CANDLE RECOGNITION) ==================== */

.candle-recognition-container {

    padding: 20px;

    text-align: center;

}



.candle-display-container {

    background: #181A20;

    border-radius: 16px;

    padding: 40px;

    margin: 30px auto;

    max-width: 400px;

    min-height: 350px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

}



.candle-display-title {

    font-size: 16px;

    color: #848E9C;

    margin-bottom: 30px;

}



.candle-svg-container {

    width: 150px;

    height: 250px;

    margin: 20px auto;

    position: relative;

}



.candle-svg {

    filter: drop-shadow(0 4px 15px rgba(252, 213, 53, 0.2));

}



.candle-question {

    font-size: 20px;

    font-weight: 600;

    color: #EAECEF;

    margin: 30px 0 20px;

}



.candle-options {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 12px;

    margin-bottom: 20px;

}



.candle-option {

    background: #181A20;

    padding: 18px 22px;

    border-radius: 12px;

    cursor: pointer;

    transition: all 0.3s;

    border: 2px solid transparent;

    font-size: 16px;

    font-weight: 500;

    text-align: center;

}



.candle-option:hover {

    border-color: #FCD535;

    transform: translateY(-3px);

    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.25);

}



.candle-option.correct {

    background: linear-gradient(135deg, rgba(14, 203, 129, 0.2), rgba(14, 203, 129, 0.1));

    border-color: #0ECB81;

    color: #0ECB81;

    animation: pulse-correct 0.6s;

}



.candle-option.wrong {

    background: linear-gradient(135deg, rgba(246, 70, 93, 0.2), rgba(246, 70, 93, 0.1));

    border-color: #F6465D;

    color: #F6465D;

    animation: shake 0.5s;

}



.candle-option.disabled {

    cursor: not-allowed;

    opacity: 0.5;

}



.candle-hint {

    background: rgba(252, 213, 53, 0.1);

    padding: 12px 20px;

    border-radius: 8px;

    margin-top: 15px;

    font-size: 14px;

    color: #FCD535;

    border: 1px solid rgba(252, 213, 53, 0.3);

}



.candle-explanation {

    background: #181A20;

    padding: 20px;

    border-radius: 12px;

    margin-top: 20px;

    text-align: left;

    border-left: 4px solid #0ECB81;

    display: none;

}



.candle-explanation.show {

    display: block;

    animation: slideDown 0.3s ease-out;

}



.candle-explanation-title {

    font-size: 16px;

    font-weight: 600;

    color: #0ECB81;

    margin-bottom: 10px;

}



.candle-explanation-text {

    font-size: 14px;

    color: #EAECEF;

    line-height: 1.6;

}



.candle-score {

    background: #181A20;

    padding: 15px;

    border-radius: 12px;

    margin-bottom: 20px;

    display: flex;

    justify-content: space-around;

}



.candle-score-item {

    text-align: center;

}



.candle-score-value {

    font-size: 24px;

    font-weight: 700;

    color: #FCD535;

}



.candle-score-label {

    font-size: 12px;

    color: #848E9C;

    margin-top: 4px;

}



.candle-progress {

    font-size: 14px;

    color: #848E9C;

    margin-bottom: 15px;

}



/* Адаптивность для всех игр */

@media (max-width: 768px) {

    .term-matching-grid,

    .cause-effect-grid {

        grid-template-columns: 1fr;

        gap: 20px;

    }



    .blitz-options {

        grid-template-columns: 1fr;

    }



    .memory-grid {

        grid-template-columns: repeat(4, 1fr);

        gap: 8px;

    }



    .memory-card-back {

        font-size: 10px;

    }



    .pattern-options,

    .candle-options {

        grid-template-columns: 1fr;

    }



    .pattern-canvas {

        height: 250px;

    }



    .candle-svg-container {

        width: 120px;

        height: 200px;

    }

}



.term-info-inline {

    display: inline-flex;

    align-items: center;

    gap: 6px;

}



.term-info-trigger {

    width: 20px;

    height: 20px;

    border-radius: 50%;

    background: rgba(252, 213, 53, 0.12);

    border: 1px solid rgba(252, 213, 53, 0.4);

    color: #FCD535;

    font-size: 12px;

    font-weight: 700;

    line-height: 1;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;

    padding: 0;

}



.term-info-trigger:hover,

.term-info-trigger:focus-visible {

    background: rgba(252, 213, 53, 0.25);

    box-shadow: 0 0 12px rgba(252, 213, 53, 0.35);

}



.term-info-trigger:active {

    transform: translateY(1px) scale(0.96);

}



.term-info-trigger:focus-visible {

    outline: 2px solid #FCD535;

    outline-offset: 2px;

}



.term-info-overlay {

    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 10050;

}



.term-info-overlay.visible {

    display: flex;

}



.term-info-backdrop {

    position: absolute;

    inset: 0;

    background: rgba(11, 14, 17, 0.78);

    backdrop-filter: blur(6px);

}



.term-info-card {

    position: relative;

    background: linear-gradient(135deg, rgba(30, 35, 41, 0.95), rgba(18, 22, 27, 0.95));

    border: 1px solid rgba(252, 213, 53, 0.35);

    border-radius: 20px;

    padding: 28px;

    width: min(420px, 92vw);

    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);

    display: flex;

    flex-direction: column;

    gap: 16px;

    z-index: 1;

}



.term-info-header {

    display: flex;

    align-items: center;

    gap: 12px;

}



.term-info-icon {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    background: rgba(252, 213, 53, 0.18);

    border: 1px solid rgba(252, 213, 53, 0.45);

    display: inline-flex;

    align-items: center;

    justify-content: center;

    font-weight: 700;

    color: #FCD535;

    font-size: 16px;

}



.term-info-title {

    margin: 0;

    font-size: 20px;

    color: #FCD535;

    font-weight: 700;

}



.term-info-body {

    margin: 0;

    font-size: 15px;

    line-height: 1.65;

    color: #EAECEF;

}



.term-info-close {

    position: absolute;

    top: 14px;

    right: 14px;

    background: rgba(132, 142, 156, 0.12);

    color: #848E9C;

    border: 1px solid rgba(132, 142, 156, 0.25);

    width: 28px;

    height: 28px;

    border-radius: 50%;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    font-size: 16px;

    cursor: pointer;

    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;

    padding: 0;

}



.term-info-close:hover,

.term-info-close:focus-visible {

    background: rgba(252, 213, 53, 0.2);

    color: #FCD535;

}



.term-info-close:focus-visible {

    outline: 2px solid rgba(252, 213, 53, 0.5);

    outline-offset: 2px;

}



body.term-info-open {

    overflow: hidden;

}

/* === Telegram WebApp adjustments === */
body.tg-web-app {

    min-height: 100vh;

    padding-top: env(safe-area-inset-top);

    padding-bottom: env(safe-area-inset-bottom);

}

body.tg-web-app.tg-theme-light {

    background-color: #F5F7FB;

    color: #15213B;

}

body.tg-web-app.tg-theme-dark {

    background-color: #0B0E11;

    color: #EAECEF;

}



.orderbook-visual {

    margin: 28px auto;

    padding: 24px;

    background: rgba(21, 26, 33, 0.85);

    border: 1px solid rgba(252, 213, 53, 0.2);

    border-radius: 18px;

    max-width: 520px;

    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);

}



.orderbook-visual-grid {

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    gap: 20px;

    align-items: stretch;

}



.orderbook-side {

    display: flex;

    flex-direction: column;

    gap: 10px;

}



.orderbook-entry {

    display: flex;

    flex-direction: column;

}



.orderbook-side-title {

    font-size: 13px;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    color: #848E9C;

}



.orderbook-row {

    display: grid;

    grid-template-columns: auto 1fr;

    gap: 10px;

    align-items: center;

    font-size: 14px;

}



.orderbook-price {

    color: #EAECEF;

    font-family: "Roboto Mono", "Fira Code", monospace;

    letter-spacing: 0.02em;

}



.orderbook-bar {

    position: relative;

    height: 10px;

    border-radius: 999px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.05);

}



.orderbook-bar::after {

    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    transform-origin: left center;

    transform: scaleX(var(--bar-size, 0.5));

}



.orderbook-row.bids .orderbook-bar::after {

    background: linear-gradient(90deg, rgba(14, 203, 129, 0.8), rgba(14, 203, 129, 0.4));

}



.orderbook-row.asks .orderbook-bar::after {

    background: linear-gradient(90deg, rgba(246, 70, 93, 0.8), rgba(246, 70, 93, 0.4));

}



.orderbook-volume {

    display: block;

    font-size: 12px;

    color: #A6ADB9;

    margin-top: 4px;

}



.orderbook-mid {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

    justify-content: center;

    min-width: 80px;

}



.orderbook-mid-line {

    width: 2px;

    flex: 1;

    background: linear-gradient(180deg, rgba(252, 213, 53, 0), rgba(252, 213, 53, 0.75), rgba(252, 213, 53, 0));

    border-radius: 999px;

}



.orderbook-mid-label {

    font-size: 13px;

    color: #FCD535;

    font-weight: 600;

    text-align: center;

    line-height: 1.4;

}



.orderbook-visual figcaption {

    margin-top: 18px;

    font-size: 13px;

    color: #848E9C;

}



@media (max-width: 640px) {

    .orderbook-visual {

        padding: 20px;

    }



    .orderbook-visual-grid {

        grid-template-columns: 1fr;

    }



    .orderbook-mid {

        flex-direction: row;

        gap: 12px;

    }



    .orderbook-mid-line {

        width: 100%;

        height: 2px;

        background: linear-gradient(90deg, rgba(252, 213, 53, 0), rgba(252, 213, 53, 0.75), rgba(252, 213, 53, 0));

    }



    .orderbook-mid-label {

        text-align: left;

    }

}

@media (max-width: 768px) {

    body {

        height: auto;

        min-height: 100vh;

        overflow-y: auto;

        -webkit-overflow-scrolling: touch;

        padding: 0 12px 96px;

    }



    .top-bar-main {

        flex: 0 0 auto;

        width: 100%;

        gap: 12px;

    }



    .screen {

        height: auto;

        min-height: calc(100vh - 220px);

        padding: 16px 12px 96px;

    }



    .trading-header {

        flex-direction: column;

        align-items: stretch;

        gap: 16px;

    }



    .balance-info {

        flex-wrap: wrap;

        gap: 12px;

    }



    .balance-item {

        min-width: calc(50% - 6px);

    }



    .crypto-selector,

    .crypto-selector select {

        width: 100%;

    }



    .trading-chart-container {

        padding: 12px;

    }



    .chart-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 12px;

    }



    .chart-controls {

        flex-direction: column;

        align-items: stretch;

        gap: 12px;

    }



    .timeframe-controls {

        width: 100%;

        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        padding-bottom: 4px;

    }



    .timeframe-btn {

        flex: 0 0 auto;

        min-width: 56px;

        text-align: center;

    }



    .chart-info {

        width: 100%;

        font-size: 12px;

        line-height: 1.4;

        display: flex;

        justify-content: center;

        text-align: center;

    }



    .chart-controls .zoom-controls {

        position: static !important;

        flex-direction: row;

        justify-content: space-between;

        width: 100%;

        order: 2;

        flex-wrap: wrap;

        gap: 8px;

    }



    .premium-stage-group {
        gap: 14px;
        padding: 10px 0;
    }

    .premium-lock-overlay {
        inset: 4px;
        padding: 28px 20px;
        gap: 14px;
    }

    .premium-lock-overlay__icon {
        width: clamp(104px, 40vw, 132px);
    }

    .premium-lock-overlay__title {
        font-size: 18px;
    }

    .premium-lock-overlay__subtitle {
        font-size: 14px;
        max-width: 300px;
    }

    .premium-lock-overlay__hint {
        font-size: 13px;
        padding: 6px 14px;
    }
    .chart-controls .zoom-controls button {

        width: 100%;

        max-width: 54px;

        height: 40px;

    }



    #tradingChart {

        height: 220px;

    }



    #lessonContent {

        max-height: none;

    }



    .top-bar {

        padding: 12px 16px;

        gap: 12px;

    }



    .lesson-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 12px;

    }



    .lesson-header .back-btn {

        padding: 0;

        font-size: 22px;

    }



    .bottom-nav {

        padding: 10px 16px !important;

    }

}

@media (max-width: 768px) {
    #stagesContainer {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .stage-card {
        margin: 0 !important;
        transform: none !important;
    }

    .stage-card:hover:not(.locked),
    .stage-card:active:not(.locked) {
        transform: none !important;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32) !important;
    }

    .stage-card:hover:not(.locked)::after,
    .stage-card:active:not(.locked)::after {
        opacity: 0.2 !important;
    }
}



