* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.score, .high-score {
    font-size: 1.2em;
    font-weight: bold;
    color: #2d3748;
}

#gameCanvas {
    border: 3px solid #4a5568;
    border-radius: 10px;
    background-color: #1a202c;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
}

.controls p {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.1em;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 0 8px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    text-align: center;
    backdrop-filter: blur(10px);
}

.game-over h2 {
    color: #e53e3e;
    margin-bottom: 20px;
    font-size: 2em;
}

.game-over p {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #4a5568;
}

#restartBtn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    font-size: 1.1em;
    padding: 15px 30px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    button {
        margin: 5px;
        padding: 10px 20px;
    }
}