* {
    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: white;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.game-header {
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.score, .high-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.game-area {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    display: none;
    border: 2px solid #ff6b6b;
}

.game-over h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 2em;
}

.game-over p {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.difficulty-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.difficulty-section h3 {
    margin-bottom: 15px;
    color: #4ecdc4;
    text-align: center;
}

.difficulty-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.difficulty-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.difficulty-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.difficulty-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.difficulty-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

button {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h3 {
    margin-bottom: 10px;
    color: #4ecdc4;
}

.instructions p {
    margin-bottom: 5px;
    font-size: 0.9em;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        margin: 20px;
        padding: 20px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-buttons {
        flex-direction: column;
    }
}
