/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* 只阻止水平滚动 */
    background-color: #000;
    position: relative;
}

/* 导航栏样式 - 顶部固定导航条 */
.top-nav {
    position: fixed; /* 固定在视口顶部，不随页面滚动 */
    top: 0;
    left: 0;
    width: 100%; /* 占据整个视口宽度 */
    z-index: 1000; /* 确保导航栏位于其他内容之上 */
    padding: 2rem;
    background: transparent; /* 默认透明背景 */
    transition: background 0.3s ease; /* 背景色过渡动画 */
}

/* 导航内容的容器，控制内部元素布局 */
.nav-content {
    max-width: 1400px; /* 最大宽度，确保在大屏幕上不会过宽 */
    margin: 0 auto; /* 水平居中 */
    display: flex; /* 使用弹性布局 */
    justify-content: space-between; /* 两端对齐，logo在左，导航链接在右 */
    align-items: center; /* 垂直居中对齐 */
}

/* 网站Logo样式 */
.logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px; /* 字母间距 */
    background: linear-gradient(to right, #66ccff, #ff751a); /* 从行星蓝色到太阳橙色的渐变 */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    padding: 5px 0;
}

/* 移动端菜单切换按钮样式 */
.mobile-menu-toggle {
    display: none; /* 默认隐藏，通过JavaScript根据屏幕尺寸控制显示 */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease; /* 悬停动画效果 */
}

/* 移动端菜单切换按钮悬停效果 */
.mobile-menu-toggle:hover {
    transform: scale(1.1); /* 鼠标悬停时微小放大效果 */
}

/* 导航链接容器样式 */
.nav-links {
    display: flex; /* 水平排列链接 */
    gap: 3rem; /* 链接之间的间距 */
}

/* 移动设备导航样式 - 扩展断点覆盖范围 */
/* 大屏幕到平板电脑的响应式样式（1024px及以下） */
@media (max-width: 1024px) {
    /* 为确保在平板设备上也应用移动导航 */
    .top-nav {
        padding: 1rem; /* 减小内边距 */
        background: rgba(0, 0, 0, 0.85); /* 增加背景不透明度 */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 添加阴影效果 */
        position: fixed;
        backdrop-filter: blur(10px); /* 背景模糊效果，增强可读性 */
    }
    
    /* 在平板电脑尺寸不显示移动端菜单按钮，由JavaScript控制 */
    /* 移除移动菜单按钮强制显示的样式 */
}

/* 中小型平板和大型手机的响应式样式（768px及以下） */
@media (max-width: 768px) {
    /* 移动端顶部导航栏样式调整 */
    .top-nav {
        padding: 0.8rem; /* 减小内边距 */
        background: rgba(0, 0, 0, 0.85) !important; /* 强制使用深色背景 */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 加强阴影效果 */
        position: fixed;
        backdrop-filter: blur(10px); /* 背景模糊效果 */
    }
    
    /* 移动端导航链接容器样式 */
    .nav-links {
        position: fixed; /* 固定定位 */
        top: 0; /* 从顶部开始 */
        right: -100%; /* 初始位置在屏幕右侧外 */
        width: 80%; /* 宽度占屏幕80% */
        max-width: 300px; /* 最大宽度限制 */
        height: 100vh; /* 全屏高度 */
        background: rgba(0, 0, 0, 0.95); /* 深色半透明背景 */
        flex-direction: column; /* 垂直排列链接 */
        justify-content: flex-start; /* 从顶部开始排列 */
        align-items: center; /* 水平居中 */
        gap: 2rem; /* 链接之间的间距 */
        padding: 5rem 2rem 2rem; /* 顶部留出空间，避免与菜单按钮重叠 */
        transition: right 0.3s ease; /* 平滑滑入/滑出效果 */
        z-index: 999; /* 确保显示在其他内容之上 */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5); /* 左侧阴影 */
    }
    
    /* 激活状态的导航链接容器（菜单展开时） */
    .nav-links.active {
        right: 0; /* 滑入屏幕 */
    }
    
    /* 移动端导航链接样式 */
    .nav-links a {
        margin-left: 0;
        font-size: 1.2rem; /* 增大字体 */
        padding: 15px; /* 增加内边距使点击区域更大 */
        width: 100%; /* 占满容器宽度 */
        text-align: center; /* 文本居中 */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 添加分隔线 */
        margin: 5px 0;
    }
    
    /* 移动端Logo样式调整 */
    .logo {
        font-size: 1.3rem;
        max-width: 70%; /* 限制宽度，避免与菜单按钮重叠 */
        background: linear-gradient(to right, #66ccff, #ff751a);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    
    /* 防止文本太小导致难以阅读 */
    .planet-card p,
    .category-description,
    .planet-detail-description {
        font-size: 16px !important; /* 移动设备上的最小可读尺寸 */
    }
    
    /* 改善滚动体验 */
    html, body {
        scroll-padding-top: 70px; /* 考虑固定头部时的锚点滚动 */
    }
}

/* 小型手机设备的响应式样式（480px及以下） */
@media (max-width: 480px) {
    /* 进一步优化小屏幕上的顶部导航栏 */
    .top-nav {
        padding: 0.5rem; /* 进一步减小内边距 */
        background: rgba(0, 0, 0, 0.9) !important; /* 增加背景不透明度 */
    }
    
    /* 小屏幕上的移动端菜单按钮样式调整 */
    .mobile-menu-toggle {
        min-width: 40px; /* 调整按钮宽度 */
        min-height: 40px; /* 调整按钮高度 */
        font-size: 1.5rem; /* 调整图标大小 */
    }
    
    /* 小屏幕上的Logo样式调整 */
    .logo {
        font-size: 1.1rem; /* 减小字体大小 */
        max-width: 60%; /* 进一步限制宽度 */
        background: linear-gradient(to right, #66ccff, #ff751a);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

/* 导航链接基础样式 */
.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1rem;
    letter-spacing: 2px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease; /* 颜色变化过渡效果 */
}

/* 移除原有的下划线动画 */
.nav-links a::after {
    display: none;
}

/* STRUCTURE页面链接动画 - 扩散效果 */
.nav-links a.structure-link {
    overflow: hidden;
}

.nav-links a.structure-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a.structure-link:hover::before,
.nav-links a.structure-link.active::before {
    width: 100%;
}

/* PLANET页面链接动画 - 旋转缩放效果 */
.nav-links a.planet-link {
    transition: all 0.3s ease;
    padding: 5px 15px; /* 增加水平内边距使圆形更大 */
}

.nav-links a.planet-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent; /* 增加边框宽度 */
    border-radius: 25px; /* 增加圆角半径 */
    transition: all 0.3s ease;
    transform: scale(0.8);
    opacity: 0;
}

.nav-links a.planet-link:hover,
.nav-links a.planet-link.active {
    color: #66ccff;
    transform: translateY(-2px);
}

.nav-links a.planet-link:hover::before,
.nav-links a.planet-link.active::before {
    border-color: #66ccff;
    transform: scale(1.1); /* 增加悬停时的缩放比例 */
    opacity: 1;
}

/* SUN页面链接动画 - 发光效果 */
.nav-links a.sun-link {
    transition: all 0.3s ease;
}

.nav-links a.sun-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 119, 0, 0.2) 0%, rgba(255, 119, 0, 0) 70%);
    border-radius: 20px;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-links a.sun-link:hover,
.nav-links a.sun-link.active {
    color: #ff751a;
    text-shadow: 0 0 10px rgba(255, 119, 0, 0.5);
}

.nav-links a.sun-link:hover::before,
.nav-links a.sun-link.active::before {
    transform: scale(1.2);
    opacity: 1;
}

/* MOON页面链接动画 - 月相变化效果 */
.nav-links a.moon-link {
    transition: all 0.3s ease;
}

.nav-links a.moon-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    width: 8px;
    height: 8px;
    background: #c2c5cc;
    border-radius: 50%;
    box-shadow: 0 0 10px #c2c5cc;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-links a.moon-link:hover,
.nav-links a.moon-link.active {
    color: #c2c5cc;
    letter-spacing: 3px;
}

.nav-links a.moon-link:hover::before,
.nav-links a.moon-link.active::before {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* 英雄区域样式 */
.hero-section {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: url('images/backwards.jpg') no-repeat 95% center;
    background-size: cover;
    background-attachment: fixed;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(to right, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.8) 30%, 
        rgba(0,0,0,0.4) 60%, 
        transparent 80%
    );
}

.hero-title {
    font-size: 11vw;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    position: absolute;
    left: 8%;
    z-index: 2;
    letter-spacing: -0.02em;
    animation: fadeInLeft 1s ease-out;
    mix-blend-mode: difference;
    line-height: 0.9;
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll; /* Better mobile compatibility */
        background-position: center;
    }
    
    .hero-content {
        background: linear-gradient(to right, 
            rgba(0,0,0,0.8) 0%, 
            rgba(0,0,0,0.7) 70%, 
            rgba(0,0,0,0.6) 100%
        );
        justify-content: center;
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
        text-align: center;
        position: relative;
        left: 0;
        width: 100%;
        line-height: 1.2;
    }

    .container {
        padding: 1rem;
    }

    .category-title {
        font-size: 1.8rem;
        text-align: center;
        width: 100%;
        padding: 0 1rem;
    }
    
    .category-title::before,
    .category-title::after {
        width: 30px;
    }
    
    .category-title::before {
        left: -40px;
    }
    
    .category-title::after {
        right: -40px;
    }
    
    .category-description {
        font-size: 0.95rem;
        text-align: center;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
}

/* 主要内容区域 */
.main-content {
    position: relative;
    z-index: 2;
    background: #000;
    padding-top: 5rem;
}

/* 原有的样式保持不变 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

/* 主要内容布局 */
.planet-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* 行星图片部分 */
.planet-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

#planet-canvas {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

#planet-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

/* 行星信息部分 */
.planet-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.planet-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.planet-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* 大气成分网格 */
.composition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.composition-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.composition-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

/* 行星统计数据 */
.planet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-item h4 {
    color: #ccc;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    color: #fff;
}

/* 卫星部分 */
.moons-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.moons-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        padding: 2rem;
        justify-content: center;
    }

    .planet-title {
        font-size: 4rem;
        text-align: center;
    }

    .planet-image {
        height: 50vh;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .planet-content {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .planet-info h2 {
        font-size: 2rem;
    }
}

/* 内容区域样式 */
.content-section {
    position: relative;
    background: #000;
    padding: 6rem 0;
    min-height: 100vh;
    z-index: 1;
    animation: pageLoad 1s ease-out;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.structure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding: 2rem;
}

.structure-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.structure-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.item-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.structure-item h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.structure-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
}

.distance-info {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.au-info {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .structure-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .structure-item {
        padding: 1.5rem;
    }

    .item-icon {
        width: 80px;
        height: 80px;
    }

    .structure-item h3 {
        font-size: 1.5rem;
    }
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

/* Planet页面特定样式 */
.planet-hero {
    background: url('images/backwards.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* 行星页面标题样式调整 - 添加太空灰色 */
.planet-hero .hero-title {
    color: #999ea8; /* 太空灰色 */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7); /* 添加发光效果，增强可见性 */
}

.planet-categories {
    padding: 4rem 0;
}

.category {
    margin-bottom: 6rem;
}

.category-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding: 0 10px;
}

.category-title::before,
.category-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
}

.category-title::before {
    left: -60px;
}

.category-title::after {
    right: -60px;
}

.category-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
}

.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.planet-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.planet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.planet-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(255, 255, 255, 0.1);
}

.planet-card.touch-active {
    transform: translateY(-8px) scale(1.01);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(255, 255, 255, 0.1);
}

.planet-card:hover::before,
.planet-card.touch-active::before {
    opacity: 1;
}

.planet-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.planet-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.planet-card:hover .planet-image::after {
    opacity: 1;
}

.planet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.planet-card:hover .planet-image img {
    transform: scale(1.1) rotate(3deg);
}

.planet-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-align: center;
}

.planet-card p {
    color: #ccc;
    text-align: center;
    font-size: 1rem;
}

/* Style for "Click to view more information" prompt */
.planet-card .view-more {
    margin-top: 10px;
    color: #66ccff;
    font-size: 0.85rem;
    opacity: 0.8;
    font-style: italic;
    transition: all 0.3s ease;
    border-top: 1px dotted rgba(102, 204, 255, 0.3);
    padding-top: 8px;
    width: 100%;
    text-align: center;
}

.planet-card:hover .view-more {
    opacity: 1;
    transform: translateY(2px);
    color: #8dd5ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .planets-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.2rem;
        padding: 1rem 0.5rem;
    }
    
    .planet-card {
        padding: 1rem;
        margin-bottom: 15px;
    }
    
    .planet-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .planet-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
    
    .planet-card p {
        font-size: 16px;
    }
    
    .planet-card .view-more {
        font-size: 0.75rem;
        margin-top: 8px;
        padding-top: 5px;
    }
    
    .planet-image {
        margin-bottom: 1rem;
    }
}

/* 响应式调整 - 小屏幕设备 */
@media (max-width: 480px) {
    .planets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .planet-card {
        padding: 0.8rem;
    }
    
    .planet-card h3 {
        font-size: 1.1rem;
    }
}

/* 行星详细信息部分样式 */
.planet-details {
    margin-top: 4rem;
}

.planet-detail-section {
    margin-bottom: 5rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.planet-detail-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.planet-detail-title {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.planet-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.planet-detail-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.planet-detail-image:hover {
    transform: scale(1.02);
}

.planet-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.planet-detail-info {
    color: #ccc;
}

.planet-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.planet-detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.planet-detail-stats .stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.planet-detail-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .planet-detail-section {
        padding: 1.5rem 1rem;
        margin-bottom: 3rem;
    }
    
    .planet-detail-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .planet-detail-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .planet-detail-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .planet-detail-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .planet-detail-stats .stat-item {
        padding: 0.8rem;
    }
    
    .planet-detail-stats .stat-item h4 {
        font-size: 0.9rem;
    }
    
    .planet-detail-stats .stat-item p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .planet-detail-section {
        padding: 1.2rem 0.8rem;
    }
    
    .planet-detail-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

/* 添加滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加页面载入动画 */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加星星背景动画 */
@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
        box-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
    }
    50% {
        opacity: 0.5;
        transform: scale(1);
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    }
}

.star-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

/* 确保所有页面背景为黑色，以便星星可见 */
body {
    background-color: #000;
    color: #fff;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 提高星星亮度和可见性 */
.star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
    z-index: 5;
    animation: twinkle var(--twinkle-duration) infinite alternate;
    animation-delay: var(--twinkle-delay);
    box-shadow: 0 0 3px rgba(255, 255, 255, 1);
}

.star-small {
    width: 1px;
    height: 1px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.9);
}

.star-medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 1);
}

.star-large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 1);
}

/* 页面切换动画 */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

.slide-left-out {
    animation: slideLeftOut 0.5s forwards;
}

.zoom-out {
    animation: zoomOut 0.5s forwards;
}

.fade-out-bright {
    animation: fadeOutBright 0.5s forwards;
}

.slide-right-out {
    animation: slideRightOut 0.5s forwards;
}

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

@keyframes fadeOut {
    to { opacity: 0; }
}

@keyframes slideLeftOut {
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

@keyframes zoomOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes fadeOutBright {
    to {
        opacity: 0;
        filter: brightness(3);
    }
}

@keyframes slideRightOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* 星星样式 */
.star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
    z-index: 0;
    animation: twinkle var(--twinkle-duration) infinite alternate;
    animation-delay: var(--twinkle-delay);
    box-shadow: 0 0 3px rgba(255, 255, 255, 1);
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 流星样式 */
.meteor {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 1) 100%);
    animation: meteor 1.5s linear forwards;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.meteor::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 1), 
                0 0 40px rgba(120, 180, 255, 0.9);
    transform: translateX(-50%) translateY(-50%);
}

@keyframes meteor {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(1000px) translateX(300px);
    }
}

/* Add additional styles for better mobile experience */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .hero-section {
        height: 90vh; /* Slightly shorter on mobile */
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    /* Disable hover effects on mobile for better performance */
    .planet-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .planet-image img {
        object-fit: contain; /* Better image display on mobile */
    }
    
    /* Improve mobile scrolling performance */
    .hero-section, 
    .planet-hero {
        background-attachment: scroll;
    }
    
    /* Ensure the menu shows correctly */
    .nav-content {
        position: relative;
        z-index: 1002;
        width: 100%;
    }
    
    /* Add space for fixed header */
    .hero-content {
        padding-top: 60px;
    }
    
    /* Override any styles that might hide the menu */
    .mobile-menu-toggle {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Improve planet section spacing */
    .planet-categories {
        padding-top: 2rem;
    }
}

/* Adjust font sizes for very small screens */
@media (max-width: 320px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .planet-card h3 {
        font-size: 1rem;
    }
    
    .planet-card p {
        font-size: 0.8rem;
    }
    
    .planet-detail-title {
        font-size: 1.5rem;
    }
}

/* 页面来源信息样式 */
.source-information {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 0;
    margin-top: 40px;
    text-align: center;
}

.sources-text {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

.sources-text a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sources-text a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 增加标题在移动设备上的居中样式 */
@media (max-width: 744px) {
    /* 所有页面大标题在移动设备上的通用样式 */
    .hero-title {
        text-align: center !important;
        position: relative !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0 15px;
    }
    
    /* 行星页面标题特定样式 */
    .planet-hero .hero-title {
        text-align: center !important;
        font-size: 3rem !important;
        line-height: 1.2;
    }
    
    /* 太阳页面标题特定样式 */
    .sun-title {
        text-align: center !important;
        width: 100% !important;
        font-size: 3rem !important;
        left: 0 !important;
        padding: 0 15px;
    }
    
    /* 月球页面标题特定样式 */
    .moon-title {
        text-align: center !important;
        width: 100% !important;
        font-size: 3rem !important;
        left: 0 !important;
        padding: 0 15px;
    }
    
    /* 更新内容容器以确保标题正确居中 */
    .hero-content {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
}

/* 图片信息和来源样式 */
.image-info {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 0 0 15px 15px;
    margin-top: -5px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.image-date {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0;
    padding: 5px 10px;
}

.image-source-button {
    background: #343d46;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.image-source-button:hover {
    background: #4a5560;
    transform: translateY(-2px);
}

.image-source-button i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .image-info {
        flex-direction: column;
        align-items: center;
        padding: 8px;
        gap: 8px;
    }
    
    .image-date {
        font-size: 0.8rem;
        padding: 3px 0;
    }
    
    .image-source-button {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
} 