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

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

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-header h1 {
    color: #00d4ff;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.game-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.game-board {
    position: relative;
    background: #0a0a0f;
    border: 3px solid #00d4ff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

#gameCanvas {
    display: block;
    background: #0a0a0f;
}

.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: 5px;
}

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

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

.overlay-content h2 {
    color: #ff4757;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ccc;
}

.overlay-content button {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 1rem;
    background: #00d4ff;
    color: #0a0a0f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.overlay-content button:hover {
    background: #00a8cc;
    transform: scale(1.05);
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    min-width: 120px;
    text-align: center;
}

.panel-section h3 {
    color: #888;
    font-size: 0.8rem;
    letter-spacing: 0.2rem;
    margin-bottom: 10px;
}

.stat-value {
    color: #00d4ff;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

#nextCanvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.controls-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.controls-info p {
    color: #666;
    font-size: 0.9rem;
}

.key {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    margin: 0 3px;
    font-size: 0.8rem;
    color: #aaa;
}

@media (max-width: 600px) {
    .game-content {
        flex-direction: column;
        align-items: center;
    }
    
    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .game-header h1 {
        font-size: 1.8rem;
    }
}
