/* 全局重置与变量 */
:root {
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --primary: #1a1a2e;
    --accent: #e94560;
    --accent-hover: #d63851;
    --card-bg: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --radius: 12px;
    --transition: 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f1a;
        --bg-alt: #1a1a2e;
        --text: #e0e0e0;
        --text-muted: #a0a0b0;
        --card-bg: #1a1a2e;
        --shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* 头部 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    transition: box-shadow var(--transition);
}

header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

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

nav a:hover::after {
    width: 100%;
}

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

@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.9;
}

.hero .btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: transform var(--transition), background var(--transition);
}

.hero .btn:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-sub {
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 关于 */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* 统计 */
.stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 折叠FAQ */
.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 16px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 8px 0;
    color: var(--text);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

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

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 8px 0 16px;
}

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

footer a {
    color: rgba(255,255,255,0.7);
}

footer a:hover {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* 其他 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: opacity var(--transition);
    z-index: 999;
}

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

.banner-carousel {
    overflow: hidden;
    position: relative;
    border-radius: var(--radius);
}

.banner-slide {
    display: none;
    padding: 40px;
    background: var(--bg-alt);
    min-height: 200px;
}

.banner-slide.active {
    display: block;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    border: none;
}

.banner-dot.active {
    background: var(--accent);
}

.dark-mode-toggle {
    background: none;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease forwards;
}

/* 毛玻璃效果增强 */
header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 暗色模式适配 */
html.dark {
    --bg: #0f0f1a;
    --bg-alt: #1a1a2e;
    --text: #e0e0e0;
    --text-muted: #a0a0b0;
    --card-bg: #1a1a2e;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

html.dark .hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
}

html.dark header {
    border-bottom-color: rgba(255,255,255,0.05);
}

html.dark .faq-item {
    border-bottom-color: rgba(255,255,255,0.05);
}