/* ==================== 变量与重置 ==================== */
:root {
    --bg-dark: #0c0c1e;
    --bg-card: rgba(30, 25, 60, 0.45);
    --bg-card-hover: rgba(50, 40, 90, 0.5);
    --primary: #818cf8;
    --secondary: #a5b4fc;
    --accent: #c4b5fd;
    --text-main: #f0ecff;
    --text-muted: #b0b0cc;
    --glow: 0 0 20px rgba(129, 140, 248, 0.3);
    --glow-strong: 0 0 40px rgba(129, 140, 248, 0.45);
    --border-glow: 1px solid rgba(129, 140, 248, 0.18);
    --border-card: 1px solid rgba(129, 140, 248, 0.1);
    --nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==================== 背景装饰 ==================== */
.bg-grid {
    position: fixed; inset: 0; z-index: -3; pointer-events: none;
    background-image:
        linear-gradient(rgba(129,140,248,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129,140,248,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.orb { position: fixed; border-radius: 50%; filter: blur(100px); z-index: -2; pointer-events: none; }
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(129,140,248,0.15), transparent 70%); top: -150px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(165,180,252,0.12), transparent 70%); bottom: 5%; left: -100px; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(196,181,253,0.08), transparent 70%); top: 40%; right: 20%; }

/* 粒子画布 */
#particleCanvas {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
}

/* ==================== 导航栏 ==================== */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; height: var(--nav-height); max-width: 1400px;
    margin: 0 auto; width: 100%;
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(to bottom, rgba(12,12,30,0.85), transparent);
}
.logo {
    font-size: 1.3rem; font-weight: 700; text-decoration: none;
    color: var(--text-main); letter-spacing: 0.5px;
}
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    padding: 0.5rem 1.2rem; border-radius: 8px;
    transition: all 0.3s ease; font-size: 0.95rem; position: relative;
}
.nav-links a:hover { color: var(--text-main); }
.nav-links a.active {
    color: var(--text-main);
    background: rgba(129, 140, 248, 0.12);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.2);
}
.nav-links a.active::after {
    content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 2px; background: var(--primary); border-radius: 1px;
}

.search-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); cursor: pointer; transition: 0.3s;
}
.search-btn:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--glow); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }

/* ==================== 主内容区 ==================== */
main { flex: 1; position: relative; }

/* ==================== 首页三区域布局 ==================== */
.homepage-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 5% 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: calc(100vh - var(--nav-height) - 80px);
}

/* 上半部分：轮播 + 科技小人 */
.homepage-top {
    display: flex;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

/* 第一区域：图片轮播 */
.area-carousel {
    flex: 1.8;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: var(--border-card);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    min-height: 300px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}
.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    transition: opacity 0.8s ease;
}
.carousel-slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12,12,30,0.6) 0%, rgba(12,12,30,0.2) 100%);
}
.carousel-slide-content {
    position: relative;
    z-index: 2;
}

.carousel-slide-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.carousel-slide-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-muted);
    font-weight: 400;
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
    display: flex;
    gap: 10px;
    z-index: 5;
}
.carousel-dot {
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid rgba(129, 140, 248, 0.35);
    background: transparent;
    cursor: pointer; transition: all 0.3s ease;
    padding: 0;
}
.carousel-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
    transform: scale(1.2);
}
.carousel-dot:hover { border-color: var(--primary); }

/* 第二区域：科技小人 */
.area-figure {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: var(--border-card);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.figure-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.figure-container svg {
    width: 85%;
    height: 90%;
    opacity: 0.8;
}

/* 科技小人发光效果 */
.figure-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(129,140,248,0.15), transparent 70%);
    filter: blur(30px);
    animation: figurePulse 4s ease-in-out infinite;
}
@keyframes figurePulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* 第三区域：发展历程卡片 */
.area-timeline {
    width: 100%;
}

.timeline-label {
    font-size: 0.8rem;
    color: rgba(129, 140, 248, 0.45);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.timeline-cards-row {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
}
.timeline-cards-row::-webkit-scrollbar { height: 3px; }
.timeline-cards-row::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 2px; }
.timeline-cards-row::-webkit-scrollbar-thumb { background: rgba(129,140,248,0.25); border-radius: 2px; }

.timeline-card {
    min-width: 260px;
    max-width: 280px;
    background: var(--bg-card);
    border: var(--border-card);
    border-radius: 16px;
    padding: 1.8rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.25), transparent);
}
.timeline-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 10px 40px rgba(129, 140, 248, 0.1);
    background: var(--bg-card-hover);
}

.timeline-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1rem;
}
.timeline-card-year {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.timeline-card-heart {
    background: none; border: none; color: rgba(255,255,255,0.25);
    cursor: pointer; font-size: 1.2rem; transition: 0.3s;
}
.timeline-card-heart:hover, .timeline-card-heart.liked { color: #ef4444; }

.timeline-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}
.timeline-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.timeline-card-icon {
    font-size: 1.8rem;
    opacity: 0.7;
}

/* ==================== 其他页面样式 ==================== */
.hot-section { padding: 4rem 5%; max-width: 1400px; margin: 0 auto; }
.contact-section { padding: 4rem 5%; max-width: 700px; margin: 0 auto; }

.about-section {
    min-height: calc(100vh - var(--nav-height) - 80px);
    display: flex; flex-direction: column;
    justify-content: center;
    padding: 2rem 5% 0;
    max-width: 1400px;
    margin: 0 auto;
}

.about-tags { display: flex; gap: 1rem; margin: 2rem 0; flex-wrap: wrap; }
.about-tag {
    padding: 0.6rem 1.5rem; border-radius: 50px; font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s ease;
    border: 1px solid rgba(129, 140, 248, 0.25);
    background: rgba(129, 140, 248, 0.06); color: var(--text-main);
}
.about-tag.active {
    background: rgba(129, 140, 248, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.2);
}
.about-tag:hover { border-color: var(--primary); }

.about-info-card {
    background: var(--bg-card); border: var(--border-card); border-radius: 16px;
    padding: 2rem; max-width: 400px; backdrop-filter: blur(10px);
}
.about-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.about-info-row:last-child { border-bottom: none; }
.about-info-label { color: var(--text-muted); font-size: 0.95rem; }
.about-info-value { color: var(--text-main); font-weight: 600; font-size: 0.95rem; }
.about-info-btn {
    padding: 0.4rem 1rem; border-radius: 6px;
    background: rgba(129, 140, 248, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.25);
    color: var(--primary); font-size: 0.8rem; cursor: pointer; transition: 0.3s;
}
.about-info-btn:hover { background: rgba(129, 140, 248, 0.2); }

/* ==================== 通用组件 ==================== */
.section-title {
    font-size: 2.2rem; margin-bottom: 3rem; position: relative; display: inline-block; color: #fff;
}
.section-title::after {
    content: ''; position: absolute; bottom: -8px; left: 0;
    width: 60px; height: 3px; background: var(--primary); border-radius: 2px;
}
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text; color: transparent;
}
.btn {
    display: inline-block; padding: 0.9rem 2rem; border-radius: 8px;
    font-weight: 600; text-decoration: none; transition: all 0.3s ease;
    cursor: pointer; border: none; font-size: 1rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow-strong); }
.btn-outline { background: transparent; border: var(--border-glow); color: var(--text-main); }
.btn-outline:hover { background: rgba(129,140,248,0.08); border-color: var(--primary); }

.card {
    background: var(--bg-card); border: var(--border-glow); border-radius: 16px;
    padding: 2rem; transition: all 0.4s ease; backdrop-filter: blur(10px);
}
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--glow); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.tech-tag {
    display: inline-block; font-size: 0.75rem; padding: 0.25rem 0.7rem;
    border-radius: 4px; background: rgba(165,180,252,0.12);
    color: var(--secondary); border: 1px solid rgba(165,180,252,0.18); margin-right: 0.5rem; margin-bottom: 0.5rem;
}

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==================== 页脚 ==================== */
footer { text-align: center; padding: 1.5rem 5%; margin-top: auto; position: relative; z-index: 2; }
.footer-content {
    max-width: 600px; margin: 0 auto;
    background: rgba(30, 25, 60, 0.35);
    border: 1px solid rgba(129, 140, 248, 0.1);
    border-radius: 16px; padding: 1.2rem 2rem;
    backdrop-filter: blur(10px);
}
.footer-content p { color: var(--text-muted); font-size: 0.85rem; margin: 0.3rem 0; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
     .nav-links {
            display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
            background: rgba(12,12,30,0.92); backdrop-filter: blur(12px);
            flex-direction: column; padding: 2rem; gap: 1rem;
        }
    .nav-links.open { display: flex; }
    .nav-links a { margin-left: 0; font-size: 1.1rem; }
    .mobile-menu-btn { display: block; }
    .search-btn { display: none; }

    .homepage-top { flex-direction: column; }
    .area-carousel, .area-figure { min-height: 240px; }
    .carousel-slide { padding: 2rem; }
    .carousel-dots { left: 2rem; bottom: 1.5rem; }

    .timeline-card { min-width: 220px; }
    .section-title { font-size: 1.8rem; }
    .grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .timeline-cards-row { gap: 1rem; }
    .timeline-card { min-width: 200px; padding: 1.2rem; }
    .about-info-card { max-width: 100%; }
}