/* 全局变量定义 
-------------------------------------------------- */
:root {
    --primary-dark: #0a1128;    /* 主要深色背景 */
    --secondary-dark: #1a2f4b;  /* 次要深色背景 */
    --neon-blue: #00f3ff;      /* 霓虹蓝色调 - 用于高亮和发光效果 */
    --neon-purple: #bf00ff;    /* 霓虹紫色调 - 用于装饰和点缀 */
    --text-primary: #ffffff;    /* 主要文本颜色 */
    --text-secondary: #7a8ba9;  /* 次要文本颜色 */
    --cyber-glow: 0 0 10px rgba(0, 243, 255, 0.5);  /* 全局发光效果 */
}

/* 基础样式设置
-------------------------------------------------- */
body {
    background-color: var(--primary-dark);
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;  /* 科幻风格字体 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;  /* 防止水平滚动 */
}

/* 星空背景效果
-------------------------------------------------- */
#space-background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    /* 深空渐变背景 */
    background: radial-gradient(circle at center, #0a1128 0%, #050816 100%);
    overflow: hidden;
}

/* 星星层效果 - 创建基础星空 */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -3;
}

/* 星星点缀效果 - 使用径向渐变创建星星 */
.stars::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 增加更多随机位置的星星 */
    background-image: 
        /* 小星星 - 更多随机位置 */
        radial-gradient(1px 1px at 25px 5px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 25px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 125px 20px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 175px 45px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 75px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 250px 100px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 300px 125px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 350px 150px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 400px 175px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 450px 200px, #fff, rgba(0,0,0,0)),
        /* 中等大小的星星 */
        radial-gradient(2px 2px at 75px 50px, var(--neon-blue), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 150px 100px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 225px 150px, var(--neon-purple), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 200px, #fff, rgba(0,0,0,0)),
        /* 大星系效果 */
        radial-gradient(3px 3px at 100px 300px, var(--neon-blue), rgba(0,0,0,0)),
        radial-gradient(3px 3px at 200px 250px, var(--neon-purple), rgba(0,0,0,0)),
        radial-gradient(3px 3px at 300px 350px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 450px 450px;
    animation: twinkle 4s ease-in-out infinite;
}

/* 星云效果层 - 创建彩色星云 */
.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    opacity: 0.3;
    filter: blur(3px);  /* 模糊效果增加星云感 */
}

/* 星云渐变效果 */
.clouds::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用多层径向渐变创建星云效果 */
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 243, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(191, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.05) 0%, transparent 70%);
    animation: moveClouds 60s linear infinite;  /* 星云缓慢移动动画 */
}

/* 闪烁星星效果层 - 创建明亮的星星 */
.twinkling {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* 闪烁星星样式 */
.twinkling::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用径向渐变创建不同颜色的闪烁星星 */
    background-image: 
        radial-gradient(1px 1px at 10px 10px, var(--neon-blue), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 150px, var(--neon-purple), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 250px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 300px, var(--neon-blue), rgba(0,0,0,0));
    background-size: 400px 400px;
    animation: twinkle 3s ease-in-out infinite alternate;
}

/* 流星动画效果
-------------------------------------------------- */
@keyframes meteor {
    0% {
        transform: rotate(215deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: rotate(215deg) translateX(-500px);
        opacity: 0;
    }
}

/* 背景流星效果 */
#space-background::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-blue), transparent);
    top: 0;
    right: 0;
    animation: meteor 3s linear infinite;
    animation-delay: 2s;
}

/* 动画关键帧定义
-------------------------------------------------- */
@keyframes twinkle {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

@keyframes moveClouds {
    from { transform: translateX(-50%) translateY(-10%); }
    to { transform: translateX(50%) translateY(10%); }
}

/* 多个流星效果
-------------------------------------------------- */
.meteor {
    position: absolute;
    width: 150px;
    height: 1px;
    transform-origin: right;
    background: linear-gradient(90deg, var(--neon-blue), transparent);
}

/* 第一颗流星 */
.meteor:nth-child(1) {
    top: 15%;
    right: 20%;
    animation: meteor 1.5s linear infinite;
}

/* 第二颗流星 */
.meteor:nth-child(2) {
    top: 35%;
    right: 40%;
    width: 100px;
    animation: meteor 2s linear infinite;
    animation-delay: 0.4s;
}

/* 第三颗流星 */
.meteor:nth-child(3) {
    top: 55%;
    right: 65%;
    width: 200px;
    animation: meteor 2.5s linear infinite;
    animation-delay: 0.8s;
}

/* 第四颗流星 */
.meteor:nth-child(4) {
    top: 25%;
    right: 85%;
    width: 120px;
    animation: meteor 1.8s linear infinite;
    animation-delay: 1.2s;
}

/* 第五颗流星 */
.meteor:nth-child(5) {
    top: 45%;
    right: 15%;
    width: 180px;
    animation: meteor 2.2s linear infinite;
    animation-delay: 1.6s;
}

/* 添加银河旋转动画 */
@keyframes rotateGalaxy {
    from { transform: rotate(-30deg); }
    to { transform: rotate(330deg); }
}

/* 导航栏样式
-------------------------------------------------- */
.cyber-nav {
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(10px);  /* 毛玻璃效果 */
    border-bottom: 2px solid var(--neon-blue);
    box-shadow: 0 2px 15px rgba(0, 243, 255, 0.2);
}

/* 品牌标志样式 */
.cyber-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-blue) !important;
    text-transform: uppercase;
    position: relative;
    padding: 0 15px;
}

/* 品牌装饰线效果 */
.brand-decoration {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

/* 品牌悬停效果 */
.cyber-brand:hover .brand-decoration {
    transform: scaleX(1);
    transform-origin: left;
}

/* 导航链接样式 */
.cyber-link {
    color: var(--text-primary) !important;
    position: relative;
    padding: 8px 15px !important;
    margin: 0 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 链接装饰线效果 */
.link-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blue);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

/* 链接悬停效果 */
.cyber-link:hover {
    color: var(--neon-blue) !important;
    text-shadow: var(--cyber-glow);
}

.cyber-link:hover .link-decoration {
    transform: translateX(0);
}

/* 主要内容区样式
-------------------------------------------------- */
.main-content {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* 提示框样式
-------------------------------------------------- */
.cyber-alert {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--text-primary);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

/* 提示框动画效果 */
.cyber-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    animation: cyber-alert-shine 2s infinite;
}

/* 页脚样式
-------------------------------------------------- */
.cyber-footer {
    background: rgba(10, 17, 40, 0.95);
    border-top: 2px solid var(--neon-blue);
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

/* 页脚内容布局 */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* 页脚标志样式 */
.footer-logo {
    font-size: 2rem;
    color: var(--neon-blue);
    position: relative;
}

/* 页脚装饰线 */
.footer-decoration {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blue);
    box-shadow: var(--cyber-glow);
}

/* 页脚链接样式 */
.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 页脚链接悬停效果 */
.footer-links a:hover {
    color: var(--neon-blue);
    text-shadow: var(--cyber-glow);
}

/* 版权信息样式 */
.footer-copyright {
    color: var(--text-secondary);
    text-align: center;
}

/* 提示框闪光动画
-------------------------------------------------- */
@keyframes cyber-alert-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 响应式布局调整
-------------------------------------------------- */
@media (max-width: 768px) {
    /* 移动端品牌文字大小 */
    .cyber-brand {
        font-size: 1.4rem;
    }
    
    /* 移动端页脚链接布局 */
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* 添加远处银河效果 */
.galaxy {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -2;
    opacity: 0.15;
    filter: blur(3px);
}

.galaxy::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(ellipse at center, rgba(0,243,255,0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 40%, rgba(191,0,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(255,255,255,0.1) 0%, transparent 45%),
        linear-gradient(45deg, rgba(0,243,255,0.1) 0%, transparent 70%);
    transform: rotate(-30deg);
    animation: rotateGalaxy 200s linear infinite;
}

/* 添加大流星效果 
-------------------------------------------------- */
.mega-meteor {
    position: absolute;
    width: 300px;
    height: 3px;
    top: -10%;
    left: -10%;
    background: linear-gradient(90deg, 
        rgba(0, 243, 255, 0.8), 
        rgba(0, 243, 255, 0.4), 
        transparent);
    transform-origin: left;
    animation: mega-meteor 8s ease-in infinite;
    z-index: -1;
}

/* 大流星的尾迹效果 */
.mega-meteor::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: radial-gradient(
        ellipse at top,
        rgba(0, 243, 255, 0.2) 0%,
        rgba(0, 243, 255, 0.1) 30%,
        transparent 60%
    );
    transform: translateY(-50%);
}

/* 大流星动画 */
@keyframes mega-meteor {
    0% {
        transform: rotate(35deg) translateX(0) scale(0.3);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    40% {
        transform: rotate(35deg) translateX(100vw) translateY(100vh) scale(1);
        opacity: 1;
    }
    41% {
        opacity: 0;
    }
    100% {
        transform: rotate(35deg) translateX(100vw) translateY(100vh) scale(1);
        opacity: 0;
    }
} 