* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    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 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
}

.score {
    color: #4CAF50;
}

.high-score {
    color: #FF9800;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: #e6e6e6;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    margin: 0 5px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.instructions {
    margin-bottom: 20px;
    color: #666;
}

.touch-controls {
    display: none;
    margin-top: 20px;
}

.direction-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin: 5px;
    background-color: #2196F3;
}

.direction-btn:hover {
    background-color: #0b7dda;
}

.middle-controls {
    display: flex;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        width: 100%;
        max-width: 450px;
        padding: 15px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .touch-controls {
        display: block;
    }
}