/* ===== 全局重置与基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent2: #0f3460;
    --glass: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.12);
    --text: #eaeaea;
    --text-muted: #a0a0b0;
    --card-bg: rgba(255,255,255,0.04);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --nav-height: 70px;
}

.light-mode {
    --primary: #ffffff;
    --secondary: #f5f7fa;
    --accent: #e94560;
    --accent2: #0f3460;
    --glass: rgba(0,0,0,0.04);
    --glass-border: rgba(0,0,0,0.08);
    --text: #1a1a2e;
    --text-muted: #555;
    --card-bg: rgba(0,0,0,0.02);
    --shadow: 0 8px 32px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary);
    color: var(--text);
    line-height: 1.7;
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.8; }

img, svg { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== 玻璃拟态 ===== */
.glass {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

/* ===== 卡片 ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}
.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(233,69,96,0.4);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* ===== 排版 ===== */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
}

/* ===== 网格 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; }

/* ===== 导航 ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(26,26,46,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}
.light-mode nav { background: rgba(255,255,255,0.85); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo svg { width: 36px; height: 36px; }

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}
.nav-links a {
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    background: var(--glass);
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--glass);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover { background: var(--glass-border); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent2) 100%);
    padding-top: var(--nav-height);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(233,69,96,0.15) 0%, transparent 50%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 80px 0;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--accent), #ff8e8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 520px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual svg {
    width: 100%;
    max-width: 520px;
    height: auto;
    filter: drop-shadow(0 20px 60px rgba(233,69,96,0.2));
}

/* ===== 轮播 ===== */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}
.carousel-slide {
    min-width: 100%;
    padding: 0 12px;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    z-index: 10;
    transition: var(--transition);
}
.carousel-btn:hover {
    background: var(--accent);
    color: #fff;
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 0;
    cursor: pointer;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}
.faq-question span { transition: var(--transition); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    color: var(--text-muted);
}
.faq-item.open .faq-answer {
    max-height: 400px;
    padding-top: 12px;
}
.faq-item.open .faq-question span { transform: rotate(180deg); }

/* ===== HowTo ===== */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.howto-step-num {
    background: var(--accent);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== 文章卡片 ===== */
.article-card { padding: 24px; }
.article-card h4 { font-size: 1.2rem; margin-bottom: 8px; }
.article-card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.article-card p { color: var(--text-muted); }

/* ===== 统计 ===== */
.stat-item {
    text-align: center;
    padding: 24px;
}
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-label {
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== 页脚 ===== */
footer {
    background: var(--secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.92rem;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(233,69,96,0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover { transform: scale(1.1); }

/* ===== 滚动动画 ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons { justify-content: center; }
    .hero-visual { order: -1; }
    .hero h1 { font-size: 2.8rem; }
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== 响应式 - 手机 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(26,26,46,0.98);
        padding: 20px;
        gap: 8px;
        border-bottom: 1px solid var(--glass-border);
    }
    .light-mode .nav-links { background: rgba(255,255,255,0.98); }
    .nav-links.open { display: flex; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 2.2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { min-height: 80vh; }
    .hero-content { padding: 40px 0; }
}

/* ===== 响应式 - 小屏手机 ===== */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 1.8rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
}