/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a0e27;
    --secondary: #1a1f4e;
    --accent: #3b82f6;
    --accent2: #8b5cf6;
    --text: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--primary);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

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

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Glass Morphism ===== */
.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
}

/* ===== Card ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Gradient Background ===== */
.gradient-bg {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* ===== Navigation ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 36px;
    height: 36px;
}

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

.nav-links a {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 28px;
    height: 2.5px;
    background: #fff;
    border-radius: 4px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 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(59, 130, 246, 0.15), transparent 60%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.1), transparent 50%);
    animation: heroGlow 15s ease-in-out infinite alternate;
}

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

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

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto 40px;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
}

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

.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-title p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ===== Grid Layouts ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

/* ===== Stats ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding: 40px 0;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-top: 4px;
}

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

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

.faq-question span {
    font-size: 1.4rem;
    transition: var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 16px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 16px;
}

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

/* ===== Footer ===== */
footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 24px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
}

/* ===== Back to Top ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== Dark Mode Toggle ===== */
#darkModeToggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: var(--transition);
}

#darkModeToggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ===== Light Mode ===== */
body.light {
    --primary: #f8fafc;
    --secondary: #e2e8f0;
    --text: #0f172a;
    --card-bg: rgba(0, 0, 0, 0.02);
    --glass: rgba(255, 255, 255, 0.7);
}

body.light header {
    background: rgba(248, 250, 252, 0.85);
}

body.light .logo {
    color: #0f172a;
}

body.light .nav-links a {
    color: rgba(15, 23, 42, 0.7);
}

body.light .nav-links a:hover,
body.light .nav-links a.active {
    color: #0f172a;
    background: rgba(59, 130, 246, 0.1);
}

body.light .hero p {
    color: rgba(15, 23, 42, 0.6);
}

body.light .section-title p {
    color: rgba(15, 23, 42, 0.5);
}

body.light .stat-label {
    color: rgba(15, 23, 42, 0.5);
}

body.light .faq-answer {
    color: rgba(15, 23, 42, 0.6);
}

body.light footer {
    background: rgba(0, 0, 0, 0.05);
}

body.light .footer-col a {
    color: rgba(15, 23, 42, 0.5);
}

body.light .footer-bottom {
    color: rgba(15, 23, 42, 0.4);
}

body.light .footer-bottom a {
    color: rgba(15, 23, 42, 0.5);
}

body.light .btn-outline {
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
}

body.light .btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light #darkModeToggle {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        transform: translateY(-120%);
        transition: var(--transition);
        opacity: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 100px 16px 60px;
    }

    .stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    section {
        padding: 60px 0;
    }

    .card {
        padding: 24px;
    }

    #backToTop,
    #darkModeToggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        right: 16px;
    }

    #darkModeToggle {
        bottom: 76px;
    }
}

/* ===== Light mode mobile nav fix ===== */
body.light .nav-links {
    background: rgba(248, 250, 252, 0.98);
}