* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Orbitron', sans-serif;
    background: #0a0a1a;
    color: #fff;
    overflow: hidden;
    min-height: 100vh;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen.hidden {
    display: none;
}

/* 星空背景 */
.stars,
.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stars {
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="20" r="0.5" fill="white"/><circle cx="30" cy="50" r="0.3" fill="white"/><circle cx="50" cy="10" r="0.4" fill="white"/><circle cx="70" cy="80" r="0.5" fill="white"/><circle cx="90" cy="40" r="0.3" fill="white"/><circle cx="20" cy="70" r="0.4" fill="white"/><circle cx="60" cy="60" r="0.3" fill="white"/><circle cx="80" cy="15" r="0.5" fill="white"/><circle cx="40" cy="90" r="0.4" fill="white"/><circle cx="15" cy="45" r="0.3" fill="white"/></svg>') repeat;
    background-size: 200px 200px;
    animation: moveStars 100s linear infinite;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="35" r="0.8" fill="rgba(255,255,255,0.8)"/><circle cx="75" cy="65" r="0.6" fill="rgba(255,255,255,0.6)"/><circle cx="45" cy="85" r="0.7" fill="rgba(255,255,255,0.7)"/></svg>') repeat;
    background-size: 300px 300px;
    animation: twinkle 3s ease-in-out infinite, moveStars 150s linear infinite;
}

@keyframes moveStars {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(200px);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* 开始界面 */
#start-screen .content {
    text-align: center;
    z-index: 10;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 200, 255, 0.8),
        0 0 40px rgba(0, 200, 255, 0.5);
}

.title-line {
    display: block;
    background: linear-gradient(135deg, #00d4ff, #7b2fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line.accent {
    background: linear-gradient(135deg, #ff2d75, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.5em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
}

.instructions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.instruction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.key {
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

.desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 霓虹按钮 */
.neon-btn {
    position: relative;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff, #7b2fff);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.4),
        0 0 40px rgba(123, 47, 255, 0.2);
}

.neon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.6),
        0 0 60px rgba(123, 47, 255, 0.4);
}

.neon-btn.secondary {
    background: linear-gradient(135deg, #2a2a5a, #1a1a3a);
    border: 2px solid rgba(0, 200, 255, 0.5);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.neon-btn:hover .btn-glow {
    transform: translate(-50%, -50%) scale(1);
}

/* 游戏画布 */
#game-screen {
    background: linear-gradient(180deg, #0a0a2e 0%, #1a1a4a 50%, #0a0a2e 100%);
}

#game-canvas {
    display: block;
    background: transparent;
}

/* HUD 界面 */
#hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3rem;
    z-index: 100;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 200, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hud-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hud-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #7b2fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lives-container {
    display: flex;
    gap: 0.3rem;
}

.life-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px #ff2d75);
    transition: all 0.3s ease;
}

.life-icon.lost {
    opacity: 0.3;
    filter: grayscale(1);
}

/* 暂停按钮 */
#pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

#pause-btn:hover {
    background: rgba(0, 200, 255, 0.2);
    transform: scale(1.1);
}

/* 遮罩层 */
.overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 200;
}

.overlay-content {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(20, 20, 60, 0.9), rgba(10, 10, 40, 0.9));
    border-radius: 30px;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 200, 255, 0.2);
}

.overlay-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #00d4ff, #7b2fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-content .neon-btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

/* 游戏结束界面 */
.gameover-title {
    color: #ff2d75 !important;
    background: linear-gradient(135deg, #ff2d75, #ff8c00) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.final-score {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.final-score .label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.final-score .value {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #00d4ff;
}

/* 道具状态显示 */
.powerup-status {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.powerup-active {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 2px solid var(--color);
    color: var(--color);
    font-weight: bold;
    font-size: 0.9rem;
    animation: pulse-glow 1s ease-in-out infinite;
    box-shadow: 0 0 15px var(--color);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px var(--color);
    }

    50% {
        box-shadow: 0 0 25px var(--color);
    }
}