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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-container {
    width: 95%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 游戏标题栏 */
.game-header {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
}

.title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.8),
                     0 0 40px rgba(0, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 255, 255, 1),
                     0 0 60px rgba(0, 255, 255, 0.7);
    }
}

.stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.label {
    font-size: 0.9rem;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.hearts {
    display: flex;
    gap: 0.3rem;
}

.heart {
    font-size: 1.5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 游戏画布 */
#gameCanvas {
    width: 100%;
    max-width: 900px;
    height: 600px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(0, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3),
                inset 0 0 50px rgba(0, 255, 255, 0.1);
    cursor: none;
}

/* 游戏覆盖层 */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 3rem;
    background: rgba(30, 60, 114, 0.8);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    max-width: 500px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.game-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.game-subtitle {
    font-size: 1.3rem;
    color: #00ffff;
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.game-over-title {
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
}

.instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: left;
}

.instructions h3 {
    color: #00ffff;
    margin-bottom: 1rem;
    text-align: center;
}

.instructions p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.power-ups {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.power-ups h4 {
    color: #00ffff;
    margin-bottom: 0.8rem;
}

.power-ups p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.final-stats {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.final-stats p {
    margin: 0.8rem 0;
    font-size: 1.2rem;
}

.final-stats span {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.5rem;
}

/* 按钮样式 */
.game-button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #00ffff 0%, #0088ff 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.5rem;
}

.game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.6);
}

.game-button:active {
    transform: translateY(-1px);
}

.game-button.secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.game-button.secondary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* 控制按钮 */
.controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        width: 98%;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    #gameCanvas {
        height: 500px;
    }
    
    .overlay-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .stats {
        gap: 0.5rem;
    }
    
    .stat-item {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    #gameCanvas {
        height: 400px;
    }
    
    .game-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

