
/* 彻底重构 Hero 区域 - 采用 Flexbox 绝对居中方案 */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh; /* 占满视口高度 */
    min-height: 800px; /* 保证最小高度 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* 改为透明，让 fixed 轮播图透出来 */
    overflow: hidden;
    margin-top: -66px; /* 抵消导航栏高度 */
    padding-top: 66px; /* 确保内容垂直居中 */
    /* z-index 已移除，避免创建新的层叠上下文影响导航栏 */
}

/* Slideshow Background - Fixed for Global Parallax */
.hero-slideshow-fixed {
    position: fixed; /* 全局固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2; /* 确保在所有内容之下 */
    will-change: transform; /* 优化渲染性能 */
}

/* 兼容旧的类名，确保 JS 选择器正常工作 */
.hero-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/* Dark Overlay - 已被全局遮罩替代，废弃 */
.hero-overlay-dark {
    display: none;
}

/* Core Content Container - Absolute Center */
.hero-content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Tech Hex Decoration (Adjusted for dark background) */
.hex-tech-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    z-index: -1;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    animation: pulse-border 4s infinite;
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.2);
    opacity: 0.6;
}

@keyframes pulse-border {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.4; }
}

/* Title Style Optimized for Dark Background */
.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: #ffffff;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* Slideshow Navigation Controls - Fixed Position */
.hero-nav {
    position: fixed; /* 改为 fixed，确保滚动时不动 */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10; /* 提高 z-index 确保可点击 */
    backdrop-filter: blur(5px);
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav.prev {
    left: 20px;
}

.hero-nav.next {
    right: 20px;
}

.hero-subtitle {
    font-size: 1.5rem; /* 从 1.5rem 放大到 2rem */
    font-weight: 300;
    color: #e2e8f0;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 增强阴影以保证大字的清晰度 */
    letter-spacing: 2px; /* 增加一点字间距提升气质 */
}

/* 浮动图标 - 重新分布 */
.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: #93c5fd;
    opacity: 0.6;
    z-index: 1;
}

/* 向下滚动箭头 */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #3b82f6;
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

/* 按钮样式 - 科技线条风格 */
.btn-hero-primary {
    background: transparent;
    color: #ffffff;
    padding: 1rem 3rem;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    overflow: hidden;
    letter-spacing: 1px;
}

/* 按钮边框线条 */
.btn-hero-primary::before,
.btn-hero-primary::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-hero-primary::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.btn-hero-primary::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* 悬停时的全边框效果 */
.btn-hero-primary:hover::before,
.btn-hero-primary:hover::after {
    width: 100%;
    height: 100%;
    border-color: #60a5fa; /* 亮蓝色 */
}

/* 悬停时的背景辉光 */
.btn-hero-primary:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
    transform: scale(1.05);
}

/* 左侧装饰粒子 */
.left-side-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* 占据左半边 */
    height: 100%;
    z-index: 1;
    pointer-events: none; /* 允许点击穿透 */
}

.particle {
    position: absolute;
    opacity: 0.6;
    animation: float-particle 6s ease-in-out infinite;
}

/* 圆形粒子 */
.p-circle {
    border-radius: 50%;
    background-color: #93c5fd;
    box-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
}

/* 六边形粒子 */
.p-hex {
    width: 20px;
    height: 12px;
    background-color: #60a5fa;
    position: relative;
    margin: 6px 0;
}
.p-hex:before, .p-hex:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}
.p-hex:before { bottom: 100%; border-bottom: 6px solid #60a5fa; }
.p-hex:after { top: 100%; width: 0; border-top: 6px solid #60a5fa; }

/* 代码符号粒子 */
.p-code {
    font-family: monospace;
    font-weight: bold;
    color: #3b82f6;
    font-size: 1.5rem;
}

/* 加号粒子 */
.p-plus {
    font-family: monospace;
    font-weight: 900;
    color: #60a5fa;
    font-size: 2rem;
}

/* 方块粒子 */
.p-square {
    width: 10px;
    height: 10px;
    background-color: #2563eb;
    transform: rotate(45deg);
}

/* 圆环粒子 */
.p-ring {
    width: 15px;
    height: 15px;
    border: 2px solid #93c5fd;
    border-radius: 50%;
}

/* 粒子分布与差异化动画 - 广域分散版 */
.p1 { 
    top: 12%; left: 35%; width: 8px; height: 8px; 
    animation-delay: 0s; animation-duration: 5s; 
}
.p2 { 
    top: 70%; left: 8%; width: 12px; height: 12px; 
    background-color: #3b82f6; 
    animation-delay: 1s; animation-duration: 7s; 
}
.p3 { 
    top: 45%; left: 28%; 
    transform: scale(0.8);
    animation: float-particle 8s ease-in-out infinite, spin-slow 20s linear infinite; 
}
.p4 { 
    top: 22%; left: 6%; 
    opacity: 0.4;
    animation-delay: 2s; animation-duration: 6s; 
}
.p5 { 
    bottom: 8%; left: 32%; 
    opacity: 0.3;
    animation-delay: 0.5s; animation-duration: 9s; 
}
.p6 { 
    top: 85%; left: 42%; width: 6px; height: 6px; 
    animation-delay: 3s; animation-duration: 4s; 
}

/* 新增最左侧粒子位置 */
.p7 {
    top: 8%; left: 15%; 
    opacity: 0.5;
    animation: float-particle 7s ease-in-out infinite, spin-slow 15s linear infinite;
}
.p8 {
    top: 55%; left: 2%;
    opacity: 0.4;
    animation: float-particle 5s ease-in-out infinite, spin-slow 10s linear infinite;
}
.p9 {
    bottom: 30%; left: 12%;
    opacity: 0.6;
    animation: float-particle 6s ease-in-out infinite;
}
.p10 {
    top: 32%; left: 40%; width: 4px; height: 4px;
    background-color: #1d4ed8;
    animation-delay: 4s; animation-duration: 8s;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-20px); opacity: 0.3; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem; /* much smaller */
        margin-bottom: 1rem;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
        letter-spacing: 1px;
    }
    .hero-section {
        min-height: 100vh; /* Better on mobile */
    }
    .floating-icon {
        display: none; /* Might clutter mobile screen */
    }
    .hex-tech-decoration {
        width: 350px;
        height: 350px;
    }
    .btn-hero-primary {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    /* Navigation arrows */
    .hero-nav {
        width: 40px;
        height: 40px;
    }
    .hero-nav.prev {
        left: 10px;
    }
    .hero-nav.next {
        right: 10px;
    }
    .left-side-particles {
        display: none; /* Hide particles on mobile for performance and cleaner look */
    }
}
