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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.score {
    color: #4CAF50;
}

.high-score {
    color: #FF9800;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: #e0e0e0;
    display: block;
    margin: 0 auto 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button:active {
    transform: scale(0.98);
}

#pauseButton {
    background-color: #FF9800;
}

#pauseButton:hover {
    background-color: #e68900;
}

#resetButton {
    background-color: #f44336;
}

#resetButton:hover {
    background-color: #da190b;
}

.instructions {
    color: #666;
    font-size: 0.9rem;
}

.instructions p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 450px) {
    .container {
        width: 95vw;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #gameCanvas {
        width: 90vw;
        height: 90vw;
        max-width: 300px;
        max-height: 300px;
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}