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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

.game-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 160px;
}

.panel-box {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.panel-box h3 {
    color: #0ff;
    text-align: center;
    font-size: 14px;
    margin-bottom: 12px;
    text-shadow: 0 0 10px #0ff;
    letter-spacing: 2px;
}

.controls-info p {
    color: #aaa;
    font-size: 11px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

kbd {
    background: #333;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    border: 1px solid #555;
}

.game-area {
    position: relative;
    background: #000;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.2),
                inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-header h1 {
    color: #0ff;
    font-size: 28px;
    text-shadow: 0 0 20px #0ff,
                 0 0 40px #0ff;
    letter-spacing: 8px;
}

#gameCanvas {
    display: block;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 5px;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
}

.overlay-content h2 {
    color: #0ff;
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 0 0 30px #0ff;
    letter-spacing: 4px;
}

.overlay-content p {
    color: #aaa;
    font-size: 18px;
    animation: pulse 2s infinite;
    margin-bottom: 20px;
}

.start-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    background: linear-gradient(180deg, #0ff, #0aa);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}
.start-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}
.start-btn:active {
    transform: scale(0.96);
}

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

#nextCanvas {
    display: block;
    margin: 0 auto;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 5px;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    color: #666;
    font-size: 10px;
    letter-spacing: 1px;
}

.stat-value {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Адаптивность */
@media (max-width: 700px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    
    .side-panel {
        flex-direction: row;
        width: auto;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .left-panel {
        order: 2;
    }
    
    .right-panel {
        order: 1;
    }
}
