/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a148c;
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

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

.score, .high-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

#gameCanvas {
    border: 3px solid #4a148c;
    border-radius: 10px;
    background: #f0f0f0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

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

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

#startBtn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

#startBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#pauseBtn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

#pauseBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#resetBtn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

#resetBtn:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-instructions {
    margin-bottom: 20px;
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #4a148c;
}

.game-instructions h3 {
    margin-bottom: 10px;
    color: #4a148c;
}

.game-instructions p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 移动端控制按钮 */
.mobile-controls {
    display: none;
    margin-top: 20px;
}

.direction-btn {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    margin: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.direction-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.middle-buttons {
    display: flex;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    .mobile-controls {
        display: block;
    }
    
    .game-controls {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    #gameCanvas {
        width: 250px;
        height: 250px;
    }
    
    .direction-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}`,"rewrite":false}}}