/* --- 1. 全局设置 & 字体 --- */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #00A8E8; /* 太空科技蓝 */
    
    /* 字体回退栈：优先 Exo 2，其次系统自带现代无衬线字体 */
    --font-stack: "Exo 2", "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- 2. 导航栏 --- */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 65px; /* 根据你的Logo图片实际比例调整 */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    position: relative;
    opacity: 0.9;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 汉堡菜单样式 */
.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- 3. Hero Section (首页) --- */
.hero-section {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 背景图：建议替换为本地太空视频或高清图 */
    background-image: url('images/background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 视差效果 */
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2rem;
    letter-spacing: 6px;
    margin-bottom: 50px;
    font-weight: 300;
    text-transform: uppercase;
}

.btn-ghost {
    display: inline-block;
    padding: 12px 40px;
    border: 2px solid #fff;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-ghost:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 2rem;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* --- 4. News Ticker --- */
.news-ticker {
    background: #111;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}
.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}
.tag {
    background: var(--accent-color);
    padding: 2px 8px;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 2px;
    white-space: nowrap;
}
.read-more { color: var(--accent-color); margin-left: auto; }

/* --- 5. Stats (数据概览) --- */
.stats-section {
    padding: 120px 0;
    background: #000;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 80px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.stat-item {
    border: 1px solid #222;
    padding: 40px 20px;
    transition: 0.3s;
    background: rgba(255,255,255,0.02);
}

.stat-item:hover { 
    border-color: var(--accent-color); 
    box-shadow: 0 0 20px rgba(0, 168, 232, 0.15); 
    transform: translateY(-5px);
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-stack); /* 确保数字也是同字体 */
}

.stat-unit {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-label {
    color: #888;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* --- 6. Split Sections (EarthData & Xbyte) --- */
.split-section {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.split-section .bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 12s ease;
}

.split-section:hover .bg-image {
    transform: scale(1.05);
}

.content-box {
    position: relative;
    z-index: 2;
    width: 45%;
    max-width: 600px;
    padding: 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    margin: 0 5%;
    border-left: 4px solid var(--accent-color);
}

.right-text { justify-content: flex-end; }
.left-text { justify-content: flex-start; }

.content-box h3 { color: var(--accent-color); text-transform: uppercase; margin-bottom: 10px; letter-spacing: 2px; }
.content-box h2 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.content-box p { margin-bottom: 40px; font-size: 1.1rem; color: #ccc; }

.btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: #fff;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-primary:hover { background: #ddd; }

/* --- 7. Partners --- */
.partners-section { 
    padding: 100px 0; 
    background: #0a0a0a; 
    text-align: center; 
}
.partners-grid {
    display: flex;
    justify-content: center;
    gap: 50px;               /* 卡片之间的间距 */
    flex-wrap: wrap;         /* 自动换行 */
    margin-top: 20px;
}
/* 新增：Logo 的白色卡片容器 */
.partner-card {
    width: 300px;           /* 卡片固定宽度 */
    height: 150px;          /* 卡片固定高度 */
    background: #ffffff;    /* 纯白背景：解决Logo自带白底和黑字的问题 */
    border-radius: 8px;     /* 圆角 */
    
    display: flex;          /* 让图片在卡片里居中 */
    align-items: center;
    justify-content: center;
    
    padding: 15px;          /* 内部留白，防止Logo顶边 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* 默认状态下稍微降低不透明度，不抢视觉重心 */
    opacity: 0.9;
    border: 1px solid #333; /* 加上微弱边框 */
}
/* 卡片悬停效果 */
.partner-card:hover {
    opacity: 1;
    transform: translateY(-5px); /* 整体上浮 */
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1); /* 发光阴影 */
    border-color: var(--accent-color); /* 边框变蓝 */
}
/* .partner-logo {
    width: 220px;
    height: 100px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-weight: bold;
    font-size: 1.2rem;
    transition: 0.3s;
    border: 1px solid #222;
} */
 /* Logo 图片专用样式 */
.partner-img {
    max-width: 100%;       /* 限制宽度不超过卡片 */
    max-height: 100%;      /* 限制高度不超过卡片 */
    width: auto;
    height: auto;
    object-fit: contain;   /* 保持图片比例 */
    
    /* 这里的滤镜改为：默认黑白 */
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}
/* 鼠标悬停交互 */
.partner-img:hover {
    filter: grayscale(0%) opacity(1); /* 悬停：恢复彩色 + 不透明 */
    transform: scale(1.1); /* 轻微放大 */
}
/* 移动端适配 */
@media (max-width: 768px) {
    .partners-grid {
        gap: 15px;
    }
    .partner-card {
        width: 140px;  /* 手机上卡片小一点 */
        height: 70px;
    }
}
/* .partner-logo:hover { background: #222; color: #fff; border-color: #555; } */

/* --- 8. About & Contact --- */
.about-section { padding: 100px 0; background: #000; border-top: 1px solid #111; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-info { margin-top: 40px; padding-left: 20px; border-left: 2px solid var(--accent-color); }
.contact-info h3 { margin-bottom: 15px; font-size: 1.2rem; }
.contact-info p { color: #aaa; margin-bottom: 5px; }

.social-media { display: flex; gap: 30px; justify-content: flex-end; }
.social-card {
    background: #111;
    padding: 20px;
    text-align: center;
    width: 160px;
    border: 1px solid #222;
}
.social-card span { display: block; margin-bottom: 15px; font-size: 0.9rem; color: #aaa; }
.qr-placeholder {
    width: 100%; height: 120px; background: #fff; color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
}

/* --- 9. Footer --- */
footer { padding: 50px 0; background: #050505; color: #555; font-size: 0.85rem; border-top: 1px solid #111; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-links { display: flex; gap: 30px; }
.footer-links a:hover { color: #fff; }

/* --- 10. 动效类 --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s ease-out;
}
.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 11. 响应式设计 (移动端适配) --- */
@media (max-width: 768px) {
    /* 导航栏适配 */
    .nav-links {
        position: absolute;
        right: 0px;
        top: 80px; /* 导航栏高度 */
        background-color: #000;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 20px 0;
        transform: translateX(100%); /* 默认隐藏 */
        transition: transform 0.5s ease-in;
        border-bottom: 1px solid #333;
        gap: 20px;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .burger { display: block; }
    
    /* 内容适配 */
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 0.9rem; letter-spacing: 2px; }
    
    .split-section { flex-direction: column; height: auto; }
    .content-box { 
        width: 90%; 
        margin: 60px auto; 
        padding: 30px;
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--accent-color);
    }
    .content-box h2 { font-size: 2rem; }
    
    .about-grid { grid-template-columns: 1fr; }
    .social-media { justify-content: flex-start; }
    
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}
/* =========================================
   新增：子页面专用样式 (追加到 style.css 末尾)
   ========================================= */

/* 通用子页面头部 */
.sub-hero {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 0;
}
.sub-hero h1 { font-size: 3.5rem; z-index: 2; position: relative; text-shadow: 0 5px 15px rgba(0,0,0,0.8); }

/* --- 产品页 (Products) --- */
.product-block { padding: 80px 0; border-bottom: 1px solid #222; }
.product-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 50px; }
.product-img { width: 100%; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 0.9rem; }
.spec-table th, .spec-table td { border: 1px solid #333; padding: 12px; text-align: left; }
.spec-table th { background: #111; color: var(--accent-color); width: 30%; }

/* --- 媒体库 (Media) --- */
.filter-bar { display: flex; gap: 15px; justify-content: center; margin-bottom: 50px; }
.filter-btn { background: transparent; border: 1px solid #444; color: #fff; padding: 8px 20px; cursor: pointer; transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--accent-color); border-color: var(--accent-color); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
/* .media-card { position: relative; cursor: pointer; } */
.media-card {
    position: relative;
    cursor: pointer;
    overflow: hidden; /* 保证放大时不溢出边界 */
    border-radius: 8px; /* 加一点圆角 */
    /* 关键点：添加过渡，让 hover 效果平滑 */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
}
.media-card:hover {
    transform: translateY(-5px); /* 悬停时整体轻微上浮 */
    box-shadow: 0 10px 20px rgba(0, 168, 232, 0.2); /* 悬停时增加发光阴影 */
}
/* .media-thumb { width: 100%; height: 200px; object-fit: cover; opacity: 0.7; transition: 0.3s; } */
.media-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    opacity: 0.8;
    /* 关键点：图片缩放过渡 */
    transition: transform 0.5s ease, opacity 0.5s ease;
}
/* .media-card:hover .media-thumb { opacity: 1; transform: scale(1.02); } */
.media-card:hover .media-thumb {
    opacity: 1;
    transform: scale(1.1); /* 悬停时图片缓慢放大 */
}
/* --- 新增：筛选时的浮现动画 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* 这个类名稍后由 JS 添加 */
.animate-in {
    animation: fadeInUp 0.5s ease-out forwards;
}
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; opacity: 0; transition: 0.3s; }
.media-card:hover .play-icon { opacity: 1; }
.media-info { padding: 15px 0; }
.media-tag { color: var(--accent-color); font-size: 0.8rem; text-transform: uppercase; }

/* --- 太空数仓 & Xbyte 专用 --- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: -50px; position: relative; z-index: 10; padding-bottom: 80px; }
.feature-card { background: #111; padding: 30px; border-top: 3px solid var(--accent-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.login-section { text-align: center; padding: 100px 0; background: #0a0a0a; }

/* --- 移动端适配增补 --- */
@media (max-width: 768px) {
    .sub-hero h1 { font-size: 2.5rem; }
    .product-intro, .feature-grid { grid-template-columns: 1fr; }
    .feature-grid { margin-top: 20px; }
}
/* --- 新闻轮播动画 --- */
.ticker-text, .tag, .read-more {
    transition: opacity 0.5s ease-in-out; /* 0.5秒的透明度过渡 */
}

.fade-out {
    opacity: 0; /* 隐藏状态 */
}
/* --- 二维码专用样式 --- */
.qr-img {
    width: 100%;            /* 宽度跟随父容器 */
    max-width: 160px;       /* 限制最大宽度，避免在宽屏下过大 */
    height: auto;           /* 高度自动，严格保持原图比例，绝不变形 */
    aspect-ratio: 1 / 1;    /* 锁定显示区域为正方形 (现代浏览器支持) */
    object-fit: contain;    /* 如果容器比例不对，保证图片完整显示不裁剪 */
    
    display: block;
    margin: 10px auto;      /* 居中显示 */
    background-color: #ffffff; /* 强制白底，确保二维码可识别 */
    padding: 10px;          /* 给二维码留出白边 */
    border-radius: 8px;     /* 轻微圆角，增加设计感 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* 增加一点阴影立体感 */
}
/* --- 视频弹窗样式 (Lightbox) --- */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 2000; /* 保证在最上层 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* 深黑背景 */
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px; /* 限制最大宽度 */
    box-shadow: 0 0 50px rgba(0, 168, 232, 0.3);
}

.modal-content video {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-btn:hover { color: var(--accent-color); }
/* --- 二维码点击放大样式 --- */

/* 1. 让二维码鼠标变成放大镜，提示可点击 */
.qr-img {
    cursor: zoom-in; 
    transition: transform 0.3s ease;
}

.qr-img:hover {
    transform: scale(1.05); /* 悬停时轻微放大 */
}

/* 2. 图片弹窗内的图片样式 */
.modal-content-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    max-width: 90%;  /* 保证不超过屏幕宽度 */
    max-height: 90%; /* 保证不超过屏幕高度 */
    width: auto;
    height: auto;
    
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
    background-color: #fff; /* 加上白底，防止透明二维码在黑背景看不清 */
    padding: 20px;
}

/* 3. 关闭按钮微调 (复用之前的样式，但针对图片弹窗调整位置) */
.img-close {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 2001;
}