/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 星云背景 */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

.nebula-core {
    position: absolute;
    width: 200%;
    height: 200%;
    animation: nebula-move 60s linear infinite;
    opacity: 0.8;
}

.nebula-core::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, 
            rgba(94, 28, 122, 0.8) 0%, 
            transparent 50%),
        radial-gradient(circle at 70% 60%, 
            rgba(25, 58, 121, 0.8) 0%, 
            transparent 50%);
    filter: blur(30px);
}

.nebula-core::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(2px 2px at 50% 50%, 
            rgba(255,255,255,0.3) 10%, 
            transparent 100%);
    background-size: 100px 100px;
    animation: stars-pulse 2s infinite alternate;
}

@keyframes nebula-move {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-25%, -15%) rotate(2deg); }
    50% { transform: translate(-50%, -30%) rotate(0deg); }
    75% { transform: translate(-25%, -45%) rotate(-2deg); }
    100% { transform: translate(0, -30%) rotate(0deg); }
}

@keyframes stars-pulse {
    from { opacity: 0.3; }
    to { opacity: 0.8; }
}

.shooting-stars::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.8), 
        transparent);
    animation: shooting-star 8s infinite linear;
}

@keyframes shooting-star {
    0% { transform: translate(-200px, -200px) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(600px, 600px) rotate(45deg); opacity: 0; }
}

/* 主内容样式 */
.container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.title {
    margin: 20px 0;
    color: #fff;
    text-shadow: 0 0 10px #00ffff;
}

.solar-system {
    width: 900px;
    height: 900px;
    position: relative;
    margin: 50px auto;
}

/* 行星样式 */
.sun {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ffd700, #ff4500);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 80px #ff4500;
    z-index: 2;
}

.planet {
    position: absolute;
    border-radius: 50%;
    transform-style: preserve-3d;
    top: 50%;
    left: 50%;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3;
}

/* 行星颜色和尺寸 */
.mercury { width: 20px; height: 20px; background: #A0522D; }
.venus { width: 25px; height: 25px; background: #DEB887; }
.earth { width: 28px; height: 28px; background: #4169E1; }
.mars { width: 22px; height: 22px; background: #CD5C5C; }
.jupiter { width: 50px; height: 50px; background: #CD853F; }
.saturn { width: 45px; height: 45px; background: #DAA520; }
.uranus { width: 35px; height: 35px; background: #87CEEB; }
.neptune { width: 33px; height: 33px; background: #4682B4; }

/* 轨道动画 */
@keyframes orbit {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg); }
}

.mercury { --orbit-radius: 60px; animation: orbit 4s linear infinite; }
.venus { --orbit-radius: 80px; animation: orbit 6s linear infinite; }
.earth { --orbit-radius: 110px; animation: orbit 8s linear infinite; }
.mars { --orbit-radius: 140px; animation: orbit 10s linear infinite; }
.jupiter { --orbit-radius: 200px; animation: orbit 14s linear infinite; }
.saturn { --orbit-radius: 260px; animation: orbit 18s linear infinite; }
.uranus { --orbit-radius: 320px; animation: orbit 22s linear infinite; }
.neptune { --orbit-radius: 380px; animation: orbit 26s linear infinite; }

/* 信息面板 */
#planet-info {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    width: 300px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    pointer-events: none;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    z-index: 1000;
}

#planet-info.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}

.desc {
    margin-top: 15px;
    line-height: 1.4;
    color: #aaa;
}

.planet.highlight {
    box-shadow: 0 0 15px #00ffff;
    transform: scale(1.2);
    z-index: 999;
}

/* 行星图片 */
.planet-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.1);
    transition: opacity 0.3s;
}

.planet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.planet-image img.loaded {
    opacity: 1;
}

/* 游戏跳转按钮样式 */
.nav-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.game-link {
    position: relative;
    padding: 12px 24px;
    font-size: 16px;
    background: rgba(0, 102, 255, 0.3);
    border: 1px solid #00ffff;
    color: #fff;
    cursor: pointer;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.game-link span {
    position: relative;
    z-index: 2;
}

.hover-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.game-link:hover {
    background: rgba(0, 102, 255, 0.5);
    box-shadow: 0 0 15px #00ffff;
}

.game-link:hover .hover-effect {
    left: 100%;
}

/* 备用方案（不支持backdrop-filter的浏览器）
@supports not (backdrop-filter: blur(5px)) {
    .game-link {
        background: rgba(0, 34, 68, 0.7);
    }
} */

/* 移动端适配 */
@media (max-width: 768px) {
    .game-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}