/* 基础样式 */
* {
    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;
    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);
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.game-header {
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 2.5em;
    color: #4a5568;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #56ab2f, #a8e6cf);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.game-area {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#game-canvas {
    border: 3px solid #4a5568;
    border-radius: 10px;
    background: #f7fafc;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.score-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #4a5568;
}

.game-status {
    font-size: 1.2em;
    color: #718096;
    padding: 8px 16px;
    background: rgba(113, 128, 150, 0.1);
    border-radius: 20px;
}

.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-over-content h2 {
    font-size: 2em;
    color: #e53e3e;
    margin-bottom: 20px;
}

.final-score {
    font-size: 1.8em;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 30px;
}

.game-over-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        width: 95%;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    #game-canvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}