body.game-layout {
    background: linear-gradient(180deg, #0a0a2e 0%, #1a1a4e 50%, #2d1b4e 100%);
    --title-color: #ff6b6b;
    --title-shadow: 0 0 20px rgba(255, 107, 107, 0.5), 0 0 40px rgba(255, 107, 107, 0.3);
    --back-btn-bg: rgba(255, 255, 255, 0.2);
    --back-btn-color: #fff;
    --text-secondary: #aaa;
}

/* 难度选择 */
.difficulty-selector {
    margin-bottom: 20px;
}

.difficulty-selector label {
    font-size: 1.2rem;
    color: #aaa;
    margin-right: 10px;
}

.diff-btn {
    padding: 8px 20px;
    margin: 0 5px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s;
}

.diff-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.diff-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

/* 游戏区域 */
.game-area {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #05051a 0%, #0a0a2e 30%, #15153e 60%, #1f1f5e 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 100px rgba(100, 100, 255, 0.1);
}

/* 多层星空 */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
}

.stars-far .star {
    animation: twinkle-slow 4s ease-in-out infinite;
}

.stars-mid .star {
    animation: twinkle 2.5s ease-in-out infinite;
}

.stars-near .star {
    animation: twinkle-fast 1.5s ease-in-out infinite;
}

@keyframes twinkle-slow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes twinkle-fast {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* 星云效果 */
.nebula {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 35%),
        radial-gradient(ellipse at 60% 70%, rgba(65, 105, 225, 0.1) 0%, transparent 45%);
    pointer-events: none;
    animation: nebula-pulse 10s ease-in-out infinite;
}

@keyframes nebula-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 流星 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), white);
    border-radius: 50%;
    animation: shoot 2s linear forwards;
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-300px) translateY(300px);
        opacity: 0;
    }
}

/* 月亮 */
.moon {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #fffde7 0%, #ffd54f 50%, #e6b800 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 213, 79, 0.5), 0 0 60px rgba(255, 213, 79, 0.3);
}

.moon-crater {
    position: absolute;
    background: rgba(200, 180, 100, 0.4);
    border-radius: 50%;
}

.crater-1 {
    width: 12px;
    height: 12px;
    top: 15px;
    left: 20px;
}

.crater-2 {
    width: 8px;
    height: 8px;
    top: 35px;
    left: 15px;
}

.crater-3 {
    width: 10px;
    height: 10px;
    top: 25px;
    left: 35px;
}

/* 发射台 */
.launch-pad {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 发射平台 */
.platform {
    position: relative;
    width: 140px;
    height: 50px;
}

.platform-top {
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 12px;
    background: linear-gradient(180deg, #888 0%, #555 100%);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.platform-top::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: repeating-linear-gradient(90deg, #ff0 0, #ff0 8px, #333 8px, #333 16px);
}

.platform-leg {
    position: absolute;
    top: 12px;
    width: 8px;
    height: 35px;
    background: linear-gradient(90deg, #666 0%, #888 50%, #666 100%);
}

.platform-leg-left {
    left: 25px;
    transform: skewX(-10deg);
}

.platform-leg-right {
    right: 25px;
    transform: skewX(10deg);
}

.platform-base {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(180deg, #444 0%, #222 100%);
    border-radius: 0 0 5px 5px;
}

/* 火箭 */
.rocket {
    position: relative;
    width: 80px;
    transition: transform 0.1s;
    z-index: 10;
}

.rocket-svg {
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

/* 火焰容器 */
.flame-container {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 80px;
    opacity: 0;
    transition: opacity 0.2s;
}

.flame-container.active {
    opacity: 1;
}

/* 火焰效果 */
.flame {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.flame-outer {
    bottom: 0;
    width: 45px;
    height: 70px;
    background: linear-gradient(180deg,
        rgba(255, 100, 0, 0.9) 0%,
        rgba(255, 150, 0, 0.8) 30%,
        rgba(255, 200, 0, 0.6) 60%,
        transparent 100%);
    animation: flame-flicker 0.1s ease-in-out infinite;
}

.flame-middle {
    bottom: 5px;
    width: 32px;
    height: 55px;
    background: linear-gradient(180deg,
        rgba(255, 200, 0, 1) 0%,
        rgba(255, 255, 0, 0.9) 40%,
        rgba(255, 255, 100, 0.5) 70%,
        transparent 100%);
    animation: flame-flicker 0.08s ease-in-out infinite;
}

.flame-inner {
    bottom: 8px;
    width: 18px;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 200, 0.9) 30%,
        rgba(255, 255, 100, 0.5) 60%,
        transparent 100%);
    animation: flame-flicker 0.06s ease-in-out infinite;
}

@keyframes flame-flicker {
    0%, 100% {
        transform: translateX(-50%) scaleY(1) scaleX(1);
    }
    25% {
        transform: translateX(-50%) scaleY(1.1) scaleX(0.95);
    }
    50% {
        transform: translateX(-50%) scaleY(0.95) scaleX(1.05);
    }
    75% {
        transform: translateX(-50%) scaleY(1.05) scaleX(0.98);
    }
}

/* 火焰粒子 */
.flame-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #fff 0%, #ff0 50%, #f60 100%);
    border-radius: 50%;
    animation: particle-rise 0.5s ease-out forwards;
}

@keyframes particle-rise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(60px) scale(0.3);
    }
}

/* 烟雾效果 */
.smoke-container {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
    pointer-events: none;
}

.smoke-puff {
    position: absolute;
    background: radial-gradient(circle, rgba(150, 150, 150, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: smoke-rise 2s ease-out forwards;
}

@keyframes smoke-rise {
    0% {
        opacity: 0.8;
        transform: translateY(0) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(2);
    }
}

/* 火箭震动 */
.rocket.charging {
    animation: shake 0.08s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-0.5deg); }
    75% { transform: translateX(3px) rotate(0.5deg); }
}

/* 火箭发射 */
.rocket.launching {
    animation: launch 3s ease-in forwards;
}

@keyframes launch {
    0% {
        transform: translateY(0);
    }
    5% {
        transform: translateY(5px);
    }
    15% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-900px);
    }
}

/* 能量条 */
.energy-bar-container {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.energy-label {
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.energy-bar {
    width: 35px;
    height: 280px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.energy-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg,
        #ff0 0%,
        #ff6b00 40%,
        #ff0000 100%);
    border-radius: 0 0 17px 17px;
    transition: height 0.1s;
}

.energy-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(180deg,
        rgba(255, 255, 0, 0.3) 0%,
        rgba(255, 107, 0, 0.3) 100%);
    border-radius: 0 0 17px 17px;
    filter: blur(10px);
    transition: height 0.1s;
}

.energy-threshold {
    position: absolute;
    left: -5px;
    right: -5px;
    height: 4px;
    background: #0f0;
    box-shadow: 0 0 15px #0f0, 0 0 30px #0f0;
    border-radius: 2px;
}

.energy-percent {
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* 状态区域 */
.status {
}

.instruction {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 15px;
}

.start-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.7);
}

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

/* 音量指示器 */
.volume-meter {
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
    display: none;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.volume-meter.active {
    display: block;
}

.volume-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff0, #ff6b00, #ff4444);
    border-radius: 10px;
    transition: width 0.05s;
    box-shadow: 0 0 15px rgba(255, 150, 0, 0.6);
}

/* 成功消息 */
.success-message {
    font-size: 2rem;
    color: #ff6b6b;
    animation: bounce 0.5s ease infinite;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 发射成功特效 */
.launch-success {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
}

.firework {
    position: absolute;
    border-radius: 50%;
    animation: firework-explode 1.5s ease-out forwards;
}

@keyframes firework-explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 尾焰拖尾效果 */
.trail {
    position: fixed;
    width: 20px;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(255, 255, 0, 0.8) 0%,
        rgba(255, 100, 0, 0.5) 50%,
        transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: trail-fade 0.5s ease-out forwards;
}

@keyframes trail-fade {
    0% {
        opacity: 1;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(2);
    }
}
