/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

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

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

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

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary-dark);
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255,215,0,0.4);
}

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

.btn-outline:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

/* 标题 */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

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

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.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;
}

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

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

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.gap-1 {
    gap: 1rem;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
    transition: background 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav a {
    margin: 0 12px;
    font-weight: 600;
    color: var(--text);
    position: relative;
    padding-bottom: 4px;
}

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

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

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

.dark-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.dark-toggle:hover {
    background: var(--glass-bg);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--text-inverse);
    padding: 120px 20px 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(255,215,0,0.08) 0%, transparent 60%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        transform: translate(0,0) rotate(0deg);
    }
    100% {
        transform: translate(20px,20px) rotate(5deg);
    }
}

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

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero .btn {
    margin: 0 8px;
}

.hero .search-box {
    margin-top: 2rem;
    display: flex;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 4px;
    backdrop-filter: blur(8px);
}

.hero .search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 20px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.hero .search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}

.hero .search-box button {
    background: var(--accent);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 700;
    color: var(--primary-dark);
    cursor: pointer;
    transition: background 0.3s ease;
}

.hero .search-box button:hover {
    background: var(--accent-light);
}

/* Banner carousel */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 40px 0;
}

.banner-track {
    display: flex;
    transition: transform 0.6s ease;
}

.banner-slide {
    min-width: 100%;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.banner-slide h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.banner-slide p {
    max-width: 600px;
    opacity: 0.9;
}

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

.banner-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.stat-label {
    color: var(--text-light);
    margin-top: 8px;
}

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

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

.faq-question::after {
    content: '+';
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 0;
    color: var(--text-light);
}

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

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--text-inverse);
    padding: 60px 20px 30px;
}

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

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

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

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

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

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

/* Mobile menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 12px;
}

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

.mobile-nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Scroll animation */
.scroll-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* 响应式 */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}