* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    min-height: 100vh;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

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

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #ffff00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

.stat span {
    color: #00ff00;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn:active {
    transform: translateY(0);
}

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

.game-canvas-container {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 3px solid #ffff00;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.3);
}

.control-hint {
    margin-top: 10px;
    font-size: 1.1em;
    color: #ffff00;
    font-weight: bold;
}

.power-ups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.power-up {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.power-up .emoji {
    font-size: 1.5em;
}

.power-up .description {
    font-size: 0.95em;
    color: #ccc;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ff6b6b;
    display: none;
}

.game-over.show {
    display: block;
}

.game-over h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 2em;
}

.game-over p {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.score-display {
    color: #ffff00;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
        margin: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
        font-size: 1em;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
        max-height: 300px;
    }
    
    .power-ups {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 1em;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn.pulse {
    animation: pulse 1s infinite;
}

@keyframes gameOver {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.5); 
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

.game-over.show {
    animation: gameOver 0.5s ease-out;
}