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

        body {
            background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #ffffff;
            min-height: 100vh;
            overflow: hidden;
        }

        /* Начальный экран */
        .start-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, rgba(15,12,41,0.98) 0%, rgba(36,36,62,0.95) 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            gap: 30px;
        }

        .start-screen h2 {
            font-size: 2.5rem;
            color: #00e5ff;
            margin-bottom: 10px;
            text-shadow: 0 0 20px rgba(0, 229, 255, 0.8);
            text-align: center;
        }

        .start-btn {
            padding: 15px 40px;
            font-size: 1.2rem;
            background: #0066cc;
            border: none;
            border-radius: 10px;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            margin-top: 20px;
            box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
        }

        .start-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 102, 204, 0.5);
            background: #0077e6;
        }

        /* Карта уровней */
        .level-map-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, rgba(15,12,41,0.98) 0%, rgba(36,36,62,0.95) 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            gap: 20px;
            padding: 20px;
        }

        .levels-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 15px;
            max-width: 1000px;
            width: 90%;
            margin: 20px 0;
            max-height: 70vh;
            overflow-y: auto;
        }

        .level-card {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid #0099cc;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            min-height: 90px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .level-card:hover {
            background: rgba(0, 153, 204, 0.15);
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 153, 204, 0.3);
        }

        .level-card.completed {
            border-color: #2e7d32;
            background: rgba(46, 125, 50, 0.1);
        }

        .level-card.current {
            border-color: #f57c00;
            background: rgba(245, 124, 0, 0.1);
        }

        .level-number {
            font-size: 1.8rem;
            font-weight: bold;
            color: #00e5ff;
            margin-bottom: 8px;
        }

        /* Основной игровой интерфейс */
        .game-layout {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            z-index: 900;
        }

        /* Верхняя панель с управлением и прогрессом */
        .top-panel {
            background: rgba(0, 0, 0, 0.6);
            padding: 10px 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            border-bottom: 2px solid #0099cc;
            z-index: 100;
        }

        .control-row {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
        }

        .control-btn {
            background: #333333;
            border: 1px solid #0099cc;
            color: #ffffff;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }

        .control-btn:hover {
            background: #444444;
            transform: translateY(-1px);
        }

        .progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 3px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #00e5ff, #0066cc);
            border-radius: 3px;
            transition: width 0.3s;
            width: 0%;
        }

        .stats-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .time-indicator {
            color: #ffcc00;
            font-weight: bold;
            font-size: 1rem;
        }

        .speed-indicator {
            color: #00ff88;
            font-weight: bold;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .speed-icon {
            font-size: 1.2rem;
        }

        /* Область падающих букв */
        .game-container {
            flex: 1;
            position: relative;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.3);
        }

        .falling-letter {
            position: absolute;
            font-size: 40px;
            font-weight: bold;
            text-shadow: 0 0 4px currentColor;
            z-index: 10;
            transition: transform 0.1s;
            color: #ffcc00;
        }

        /* Клавиатура */
        .keyboard-section {
            background: rgba(0, 0, 0, 0.6);
            border-top: 2px solid #0099cc;
            padding: 15px;
        }

        .keyboard {
            width: 100%;
            max-width: 1000px;
            margin: 0 auto;
        }

        .row {
            padding: 0;
            list-style-type: none;
            display: flex;
            justify-content: center;
            gap: 4px;
            margin-bottom: 4px;
        }

        .key {
            width: 50px;
            height: 50px;
            background: #333333;
            border-radius: 8px;
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            user-select: none;
            position: relative;
            transition: all 0.2s;
            border: 1px solid #555555;
            color: #ffffff;
        }

        .key:hover {
            background: #444444;
        }

        .key.target {
            background: rgba(255, 204, 0, 0.3) !important;
            border: 2px solid #ffcc00 !important;
            box-shadow: 0 0 20px #ffcc00;
            transform: scale(1.1);
            z-index: 20;
        }

        .key.pressed {
            transform: scale(0.95);
            box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
            background: #555555;
        }

        /* Специальные клавиши */
        #space { 
            width: 300px; 
            background: #444444;
        }

        /* Базовые буквы */
        .key.base-letter {
            background: rgba(0, 229, 255, 0.15);
            border: 2px solid #00e5ff;
        }

        /* Экран результатов */
        .results-screen {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(25, 25, 35, 0.95);
            padding: 40px;
            border-radius: 15px;
            text-align: center;
            display: none;
            z-index: 1001;
            border: 2px solid #0099cc;
            box-shadow: 0 0 40px rgba(0, 153, 204, 0.2);
            width: 90%;
            max-width: 500px;
        }

        .results-screen.active {
            display: block;
        }

        .stars-container {
            font-size: 3rem;
            color: #ffcc00;
            margin: 20px 0;
            text-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
        }

        .results-title {
            color: #00e5ff;
            font-size: 1.8rem;
            margin-bottom: 25px;
            font-weight: 600;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin: 25px 0;
        }

        .stat-item {
            background: rgba(255, 255, 255, 0.08);
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #555555;
        }

        .stat-label {
            font-size: 0.9rem;
            color: #cccccc;
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 1.4rem;
            font-weight: bold;
        }

        .correct-value {
            color: #4caf50;
        }

        .error-value {
            color: #f44336;
        }

        .accuracy-value {
            color: #00e5ff;
        }

        .speed-value {
            color: #ff9800;
        }

        .results-buttons {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 30px;
        }

        .result-btn {
            padding: 14px 25px;
            font-size: 1rem;
            background: #0066cc;
            border: none;
            border-radius: 8px;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
        }

        .result-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
            background: #0077e6;
        }

        .restart-btn {
            background: #f57c00;
        }

        .restart-btn:hover {
            background: #ff9800;
            box-shadow: 0 5px 15px rgba(245, 124, 0, 0.4);
        }

        .exit-btn {
            background: #555555;
        }

        .exit-btn:hover {
            background: #666666;
            box-shadow: 0 5px 15px rgba(85, 85, 85, 0.4);
        }

        /* Инструкция */
        .instructions {
            max-width: 600px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 1px solid #555555;
            margin-bottom: 20px;
            color: #cccccc;
        }

        .instruction-item {
            margin: 8px 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .instruction-item::before {
            content: "•";
            color: #00e5ff;
            font-size: 1.2rem;
        }

        /* Цвета по пальцам для клавиш и букв */
        /* Мизинец левой руки */
        .key.little-finger-left,
        .falling-letter.little-finger-left {
            color: #ff6b6b;
            border-color: #ff6b6b !important;
            
        }

        /* Безымянный левой руки */
        .key.ring-finger-left,
        .falling-letter.ring-finger-left {
            color: #ffa726;
            border-color: #ffa726 !important;
            
        }

        /* Средний левой руки */
        .key.middle-finger-left,
        .falling-letter.middle-finger-left {
            color: #ffee58;
            border-color: #ffee58 !important;
            
        }

        /* Указательный левой руки */
        .key.index-finger-left,
        .falling-letter.index-finger-left {
            color: #66bb6a;
            border-color: #66bb6a !important;
            
        }

        /* Указательный правой руки */
        .key.index-finger-right,
        .falling-letter.index-finger-right {
            color: #29b6f6;
            border-color: #29b6f6 !important;
            
        }

        /* Средний правой руки */
        .key.middle-finger-right,
        .falling-letter.middle-finger-right {
            color: #ab47bc;
            border-color: #ab47bc !important;
            
        }

        /* Безымянный правой руки */
        .key.ring-finger-right,
        .falling-letter.ring-finger-right {
            color: #ec407a;
            border-color: #ec407a !important;
            
        }

        /* Мизинец правой руки */
        .key.little-finger-right,
        .falling-letter.little-finger-right {
            color: #26c6da;
            border-color: #26c6da !important;
            
        }

        /* Большие пальцы (пробел) */
        .key.thumb,
        .falling-letter.thumb {
            color: #9ccc65;
            border-color: #9ccc65 !important;
            
        }

        /* Усиление свечения для падающих букв */
        .falling-letter.little-finger-left { text-shadow: 0 0 25px #ff6b6b, 0 0 15px #ff6b6b; }
        .falling-letter.ring-finger-left { text-shadow: 0 0 25px #ffa726, 0 0 15px #ffa726; }
        .falling-letter.middle-finger-left { text-shadow: 0 0 25px #ffee58, 0 0 15px #ffee58; }
        .falling-letter.index-finger-left { text-shadow: 0 0 25px #66bb6a, 0 0 15px #66bb6a; }
        .falling-letter.index-finger-right { text-shadow: 0 0 25px #29b6f6, 0 0 15px #29b6f6; }
        .falling-letter.middle-finger-right { text-shadow: 0 0 25px #ab47bc, 0 0 15px #ab47bc; }
        .falling-letter.ring-finger-right { text-shadow: 0 0 25px #ec407a, 0 0 15px #ec407a; }
        .falling-letter.little-finger-right { text-shadow: 0 0 25px #26c6da, 0 0 15px #26c6da; }
        .falling-letter.thumb { text-shadow: 0 0 25px #9ccc65, 0 0 15px #9ccc65; }

        /* Подсветка при наведении на клавишах */
        .key:hover.little-finger-left { background: rgba(255, 107, 107, 0.25) !important; }
        .key:hover.ring-finger-left { background: rgba(255, 167, 38, 0.25) !important; }
        .key:hover.middle-finger-left { background: rgba(255, 238, 88, 0.25) !important; }
        .key:hover.index-finger-left { background: rgba(102, 187, 106, 0.25) !important; }
        .key:hover.index-finger-right { background: rgba(41, 182, 246, 0.25) !important; }
        .key:hover.middle-finger-right { background: rgba(171, 71, 188, 0.25) !important; }
        .key:hover.ring-finger-right { background: rgba(236, 64, 122, 0.25) !important; }
        .key:hover.little-finger-right { background: rgba(38, 198, 218, 0.25) !important; }
        .key:hover.thumb { background: rgba(156, 204, 101, 0.25) !important; }

        /* Легенда цветов */
        .color-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin: 15px 0;
        }

        .color-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.8rem;
        }

        .color-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
        }

        /* Сообщение о поддержке латиницы */
        .layout-hint {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 153, 204, 0.2);
            border: 1px solid #0099cc;
            border-radius: 8px;
            padding: 10px 20px;
            font-size: 0.9rem;
            color: #aaddff;
            text-align: center;
            z-index: 1100;
            backdrop-filter: blur(5px);
            display: none;
        }

        .layout-hint.active {
            display: block;
        }

        /* Подсказка об очередности */
        .order-hint {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 204, 0, 0.9);
            color: #000;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1.2rem;
            text-align: center;
            z-index: 1500;
            display: none;
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .order-hint.active {
            display: block;
        }

        /* Индикатор скорости */
        .speed-display {
            background: rgba(0, 0, 0, 0.4);
            padding: 8px 15px;
            border-radius: 6px;
            border: 1px solid rgba(0, 255, 136, 0.3);
            min-width: 70px;
            text-align: center;
        }

        /* Визуализатор скорости */
        .speed-visualizer {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            margin-top: 5px;
            overflow: hidden;
            position: relative;
        }

        .speed-fill {
            height: 100%;
            background: linear-gradient(90deg, #00ff88, #ffcc00, #ff4444);
            border-radius: 2px;
            width: 50%;
            transition: width 0.2s ease-out;
        }

        .speed-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 2px;
        }
		/* Подсказка на клавишах А и О */
        .key.base-letter::after {
            content: '';
            position: absolute;
            bottom: 2px;
            left: 50%;
            transform: translateX(-50%);
            width: 10px;
            height: 10px;
            background: #00e5ff;
            border-radius: 50%;
            animation: blink-dot 2s infinite;
        }