/* ========== 星河软件站 - 全局样式 ========== */

/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Microsoft Yahei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #e8eaf6;
    min-height: 100vh;
    overflow-x: hidden;
    perspective: 1200px;
    background: #0a0a1a;
}

/* ========== 3D 透视背景层 ========== */
.bg-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    transform-style: preserve-3d;
}
.bg-base {
    position: absolute;
    width: 100%; height: 100%;
    background: linear-gradient(160deg, #0a0a1a 0%, #151530 40%, #0a1a30 70%, #101020 100%);
}
.bg-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 30% 40%, rgba(102,126,234,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 70%, rgba(118,75,162,0.12) 0%, transparent 55%);
}

/* 动态3D背景层 - 两层叠加：底层纹理 + 上层大图轮播 */
.bg-img-layer {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    transform-style: preserve-3d;
    opacity: 0;
    /* 3D透视倾斜 + 动画 */
    transform: perspective(1200px) rotateX(8deg) rotateY(-5deg) scale(1.1);
    transition: opacity 1.5s ease-in-out, transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    /* 两层背景：渐变纹理做底，大图做面 */
    background-image:
        linear-gradient(135deg, rgba(20,20,50,0.7) 0%, rgba(40,20,80,0.5) 100%),
        url('../images/page0_glow.png');
    background-size: auto, cover;
}
/* 默认显示第1张（page0） */
.bg-img-layer[data-bg="1"] {
    background-image:
        linear-gradient(135deg, rgba(20,20,50,0.6) 0%, rgba(30,20,70,0.4) 100%),
        url('../images/page0_glow.png');
    opacity: 1;
    transform: perspective(1200px) rotateX(0deg) rotateY(0deg) scale(1.05);
}
.bg-img-layer[data-bg="2"] {
    background-image:
        linear-gradient(135deg, rgba(20,50,50,0.6) 0%, rgba(20,30,70,0.4) 100%),
        url('../images/page1_glow.png');
}
.bg-img-layer[data-bg="3"] {
    background-image:
        linear-gradient(135deg, rgba(50,20,50,0.6) 0%, rgba(30,20,60,0.4) 100%),
        url('../images/page2_glow.png');
}
.bg-img-layer[data-bg="4"] {
    background-image:
        linear-gradient(135deg, rgba(20,40,60,0.6) 0%, rgba(20,60,80,0.4) 100%),
        url('../images/page3_glow.png');
}
.bg-img-layer[data-bg="5"] {
    background-image:
        linear-gradient(135deg, rgba(40,30,20,0.6) 0%, rgba(60,40,20,0.4) 100%),
        url('../images/page4_glow.png');
}

/* 底层纹理背景（始终显示，不切换） */
.bg-texture {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    background-image: url('../assets/images/bg1.png');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: -1;
}

/* ========== 3D 气泡粒子 ========== */
.bubbles {
    position: absolute;
    width: 100%; height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(167,139,250,0.3);
    background: radial-gradient(circle at 35% 35%, rgba(167,139,250,0.1), transparent 70%);
    animation: bubble-rise linear infinite;
    transform-style: preserve-3d;
}
@keyframes bubble-rise {
    0%   { transform: translateY(110vh) rotateX(0deg) rotateY(0deg); opacity: 0; }
    8%   { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-10vh) rotateX(360deg) rotateY(180deg); opacity: 0; }
}

/* ========== 3D 旋转星星 ========== */
.starfield {
    position: absolute;
    width: 100%; height: 100%;
    transform-style: preserve-3d;
}
.star {
    position: absolute;
    width: 2px; height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: star-twinkle var(--d, 3s) ease-in-out infinite var(--delay, 0s);
}
@keyframes star-twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 1; box-shadow: 0 0 6px 1px rgba(180,200,255,0.9); }
}

/* ========== 主内容 ========== */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px;
    transform-style: preserve-3d;
}

/* ========== 头部 Logo ========== */
header {
    text-align: center;
    padding: 40px 0 25px;
}
.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transform-style: preserve-3d;
}
.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: logo-float 4s ease-in-out infinite;
}
@keyframes logo-float {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-5px) rotateY(5deg); }
}
.logo-text { text-align: left; }
.site-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5), 0 0 30px rgba(167,139,250,0.5);
}
.site-subtitle {
    font-size: 13px;
    color: rgba(200,210,255,0.7);
    letter-spacing: 4px;
    margin-top: 4px;
}

/* ========== 导航栏 ========== */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}
.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: rgba(200,210,255,0.85);
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}
.nav-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(102,126,234,0.6);
    color: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102,126,234,0.25);
}
.nav-btn.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.6), rgba(118,75,162,0.6));
    border-color: rgba(102,126,234,0.9);
    color: #fff;
    box-shadow: 0 0 25px rgba(102,126,234,0.5);
}

/* ========== 内容区块标题 ========== */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #e0e7ff;
    margin: 35px 0 20px;
    padding-left: 12px;
    border-left: 3px solid #667eea;
}

/* ========== 下载区域 ========== */
.download-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}
.download-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 25px 20px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.download-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(102,126,234,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.download-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 12px 40px rgba(102,126,234,0.25);
}
.download-card:hover::before { opacity: 1; }
.download-card h3 { font-size: 17px; color: #c4b5fd; margin-bottom: 8px; }
.download-card .version { font-size: 13px; color: rgba(200,210,255,0.55); margin-bottom: 6px; }
.download-card .file-size { font-size: 12px; color: rgba(200,210,255,0.45); margin-bottom: 16px; }
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 18px rgba(102,126,234,0.4);
}
.download-btn:hover {
    background: linear-gradient(135deg, #7c8ffa, #8e5db8);
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(102,126,234,0.6);
}

/* ========== 功能特点卡片 ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.feature-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.feature-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(102,126,234,0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(102,126,234,0.18);
}
.feature-card .feature-title { font-size: 14px; color: #c4b5fd; font-weight: 600; margin-bottom: 8px; }
.feature-card .feature-desc { font-size: 12px; color: rgba(200,210,255,0.55); line-height: 1.5; }

/* ========== 截图画廊 ========== */
.screenshot-gallery { margin-bottom: 30px; }
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.screenshot-item {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}
.screenshot-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 12px 35px rgba(102,126,234,0.2);
}
.screenshot-item img {
    width: 100%; height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.screenshot-item:hover img { transform: scale(1.05); }
.screenshot-label {
    padding: 12px;
    font-size: 13px;
    color: rgba(200,210,255,0.75);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
}

/* ========== 大图展示 ========== */
.screenshot-showcase { margin-bottom: 25px; }
.screenshot-showcase img {
    width: 100%; max-height: 450px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    display: block;
    transition: all 0.3s ease;
}
.screenshot-showcase img:hover {
    box-shadow: 0 10px 40px rgba(102,126,234,0.2);
}

/* ========== 首页入口卡片 ========== */
.entrance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin: 40px 0;
}
.entrance-card {
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 35px 30px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}
.entrance-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    opacity: 0;
    transition: opacity 0.4s;
}
.entrance-card:hover::before { opacity: 1; }
.entrance-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 20px 50px rgba(102,126,234,0.3);
}
.entrance-card h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.entrance-card p {
    font-size: 14px;
    color: rgba(200,210,255,0.65);
    line-height: 1.7;
}
.entrance-badge {
    display: inline-block;
    margin-top: 18px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(102,126,234,0.4), rgba(118,75,162,0.4));
    border-radius: 50px;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
}

/* ========== 底部信息 ========== */
footer {
    text-align: center;
    padding: 35px 0 25px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 40px;
}
footer p { font-size: 13px; color: rgba(200,210,255,0.5); line-height: 2.2; }
footer a { color: rgba(167,139,250,0.85); text-decoration: none; transition: color 0.3s; }
footer a:hover { color: #a78bfa; text-decoration: underline; }
.beian-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.beian-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .site-title { font-size: 26px; letter-spacing: 3px; }
    .logo-img { width: 45px; height: 45px; }
    .nav-btn { padding: 12px 20px; font-size: 13px; }
    .download-area { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
    .entrance-grid { grid-template-columns: 1fr; }
    .entrance-card { padding: 25px 20px; }
    header { padding: 25px 0 15px; }
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(102,126,234,0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(102,126,234,0.8); }
