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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* 游戏容器 */
.game-container {
    max-width: 850px;
    margin: 20px auto;
    padding: 25px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(255, 107, 107, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    text-align: center;
    border: 2px solid rgba(255, 107, 107, 0.2);
}

/* 游戏标题 */
.game-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff6b6b;
    text-shadow: 
        0 0 10px rgba(255, 107, 107, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    font-weight: bold;
}

/* 游戏信息栏 */
.game-info {
    margin-bottom: 20px;
}

.status-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.score-display, .lives-display, .level-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    padding: 5px 15px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    border-radius: 5px;
    min-width: 100px;
}

/* 游戏画布 */
.game-canvas {
    margin: 20px auto;
    border: 3px solid #ff6b6b;
    background: linear-gradient(180deg, #000428, #004e92);
    display: block;
    border-radius: 10px;
    box-shadow: 
        0 0 20px rgba(255, 107, 107, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
}

/* 控制按钮 */
.controls {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 按钮基础样式 */
button {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ee5a52, #d94444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #44a08d, #3d8b7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.btn-tertiary {
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
}

.btn-tertiary:hover {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

/* 游戏说明 */
.instructions {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.instructions h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.control-guide {
    color: #ddd;
    line-height: 1.6;
}

.control-guide p {
    margin-bottom: 8px;
}

/* 键盘按键样式 */
kbd {
    background: linear-gradient(145deg, #333, #555);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
}

/* 游戏结束画面样式 */
.game-over-overlay {
    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: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ff6b6b;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

/* 响应式设计 */
@media (max-width: 900px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-canvas {
        width: 100%;
        height: auto;
        max-width: 800px;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 200px;
    }
}

@media (max-width: 600px) {
    .game-title {
        font-size: 2rem;
    }
    
    .instructions {
        font-size: 0.9rem;
    }
}
.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    margin: 0 10px;
    font-size: 1rem;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 120px;
}

#startBtn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

#pauseBtn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

#restartBtn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        width: 90%;
        padding: 10px;
    }

    .game-canvas {
        width: 100%;
        height: auto;
    }
}