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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== CSS 变量 ===== */
:root {
    --primary: #e94560;
    --primary-dark: #c73e54;
    --secondary: #0f3460;
    --accent: #16213e;
    --bg-light: #ffffff;
    --bg-dark: #1a1a2e;
    --text-light: #1a1a2e;
    --text-dark: #e0e0e0;
    --glass: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: 0.3s ease;
}

body.dark {
    --bg-light: #1a1a2e;
    --text-light: #e0e0e0;
    --glass: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== Header ===== */
.header {
    background: var(--bg-light);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav a {
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.theme-toggle {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    color: var(--text-light);
}

.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--secondary), var(--accent), #1a1a2e);
    color: #fff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15), transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(10%, 10%);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* ===== Section ===== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

body.dark .section-subtitle {
    color: #aaa;
}

/* ===== Grid ===== */
.grid {
    display: grid;
    gap: 30px;
}

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

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

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

/* ===== Card ===== */
.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(30px);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.card-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

body.dark .card p {
    color: #bbb;
}

/* ===== Stats ===== */
.stats {
    background: var(--secondary);
    color: #fff;
    padding: 60px 0;
}

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

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 8px;
}

/* ===== Banner Carousel ===== */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    height: 400px;
    background: var(--accent);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.8s ease;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
}

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

.banner-slide .slide-content {
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.banner-slide h2 {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.banner-slide p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dots span.active {
    background: #fff;
    transform: scale(1.2);
}

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

body.dark .faq-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 0;
}

.faq-question span {
    transition: transform 0.3s;
}

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

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

body.dark .faq-answer {
    color: #bbb;
}

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

/* ===== Search ===== */
.search-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 50px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

body.dark .search-box input {
    border-color: rgba(255, 255, 255, 0.2);
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 14px 28px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: #ccc;
    padding: 60px 0 30px;
}

.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

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

.footer a {
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--primary);
}

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

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
    transition: all 0.3s;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-image {
        order: -1;
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-light);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 16px;
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .banner-carousel {
        height: 280px;
    }
    .banner-slide h2 {
        font-size: 1.6rem;
    }
    .stats .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    .stat-number {
        font-size: 2.2rem;
    }
}

/* ===== Scroll Animation ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    padding: 16px 0;
    color: #888;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== HowTo Steps ===== */
.howto-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.howto-step .step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.howto-step p {
    flex: 1;
    padding-top: 6px;
}