/* 全局重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #0f2440;
    --accent: #e8a838;
    --accent-light: #f0c060;
    --bg: #f5f7fa;
    --text: #1a1a2e;
    --card-bg: #fff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --primary: #2a5a8c;
    --primary-light: #4a7aac;
    --primary-dark: #1a3a5c;
    --accent: #d4a030;
    --accent-light: #e8b850;
    --bg: #0f1a2e;
    --text: #e0e4f0;
    --card-bg: #1a2a44;
    --glass: rgba(20, 30, 50, 0.85);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
}

/* 毛玻璃效果 */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: background var(--transition);
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: blur(16px);
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
    padding: 4px 0;
}

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

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

.nav-links a:hover {
    color: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: transform var(--transition);
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* Hero Banner */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.hero-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: background var(--transition);
}

.hero-indicators button.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* 通用section */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-title p {
    color: #666;
    font-size: 18px;
    margin-top: 12px;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}

/* 数字动画 */
.stat-item {
    text-align: center;
    padding: 24px;
}

.stat-item .number {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
}

.stat-item .label {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px 0;
    cursor: pointer;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 18px;
}

.faq-question .icon {
    transition: transform var(--transition);
}

.faq-item.open .faq-question .icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 16px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 16px;
}

/* 搜索模态 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-modal.open {
    display: flex;
}

.search-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-box input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border: 2px solid var(--primary-light);
    border-radius: 50px;
    outline: none;
    background: var(--bg);
    color: var(--text);
}

.search-results {
    margin-top: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.search-results div {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background var(--transition);
}

.search-results div:hover {
    background: var(--bg);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: scale(1.1);
}

/* 页脚 */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 48px 0 24px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer .grid-4 {
    gap: 32px;
}

footer h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 18px;
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
}

footer .copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 32px;
    font-size: 14px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--glass);
        position: absolute;
        top: 70px;
        left: 20px;
        right: 20px;
        border-radius: var(--radius);
        padding: 20px;
        gap: 12px;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    section {
        padding: 48px 0;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .stat-item .number {
        font-size: 36px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

/* 图片懒加载 */
.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 暗黑模式额外样式 */
[data-theme="dark"] .card {
    background: #1a2a44;
}

[data-theme="dark"] .section-title h2 {
    color: var(--accent);
}

[data-theme="dark"] .stat-item .label {
    color: #aaa;
}

[data-theme="dark"] .faq-item {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-box input {
    background: #1a2a44;
    color: #e0e4f0;
    border-color: var(--primary-light);
}

/* 图片占位 */
.img-placeholder {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    min-height: 200px;
}