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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(255,255,255,0.08), transparent 40%),
        linear-gradient(135deg, #5c6ae5 0%, #7a4fd6 35%, #111827 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #e9ecf5;
}

.container {
    background: rgba(20, 24, 38, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.05);
    max-width: 600px;
    width: 100%;
}

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

.game-header h1 {
    color: #f8fafc;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
}

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

.score-item .label {
    font-size: 0.9em;
    color: #cdd5f4;
    margin-bottom: 5px;
}

.score-item .value {
    font-size: 1.8em;
    font-weight: bold;
    color: #9ad8ff;
    text-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.game-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.06), transparent 55%), #0f172a;
    display: block;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 0 30px rgba(154, 216, 255, 0.08);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(17,24,39,0.65));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(4px);
}

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

.overlay-content {
    text-align: center;
    padding: 20px;
}

.overlay-content h2 {
    color: #f8fafc;
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.overlay-content p {
    color: #cdd5f4;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.game-button {
    background: linear-gradient(135deg, #4cc9f0 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(76,201,240,0.35);
}

.game-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 16px 35px rgba(76,201,240,0.45);
}

.game-button:active {
    transform: translateY(0);
}

.controls {
    text-align: center;
}

.control-hint {
    color: #cdd5f4;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.mobile-controls {
    display: none;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.control-btn {
    background: #667eea;
    color: white;
    border: none;
    min-width: 50px;
    height: 50px;
    border-radius: 10px;
    font-size: 1.5em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin: 5px;
}

.control-btn:hover {
    background: #5568d3;
    box-shadow: 0 8px 18px rgba(102,126,234,0.35);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.control-row.spaced {
    gap: 12px;
    margin: 4px 0;
}

.control-btn.wide {
    min-width: 90px;
    font-size: 1.1em;
    height: 46px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .control-hint {
        display: none;
    }
}



