/* ========================================
   CSS Variables
   ======================================== */
:root {
    --color-primary: #e8833a;
    --color-primary-light: #f0a060;
    --color-primary-dark: #c76a2a;
    --color-secondary: #1a1a2e;
    --color-bg: #fafaf9;
    --color-bg-card: #ffffff;
    --color-bg-dark: #16213e;
    --color-bg-darker: #0f0f23;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-lighter: #999999;
    --color-text-white: #ffffff;
    --color-border: #e8e8e8;
    --color-border-light: #f0f0f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Section Common
   ======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-light);
    font-weight: 400;
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition);
    padding: 16px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    transition: color var(--transition);
}

.header.scrolled .nav-logo {
    color: var(--color-secondary);
}

.logo-icon {
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    width: 100%;
}

.header.scrolled .nav-link {
    color: var(--color-text);
}

.header.scrolled .nav-link:hover {
    color: var(--color-primary);
}

/* 移动端汉堡菜单 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition);
}

.header.scrolled .nav-toggle span {
    background: var(--color-secondary);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #e8833a 100%);
    background-size: 400% 400%;
    animation: heroGradient 15s ease infinite;
    overflow: hidden;
}

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(232, 131, 58, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(15, 52, 96, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 8px;
    margin-bottom: 20px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
    font-weight: 400;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========================================
   Hero Badge
   ======================================== */
.hero-badge {
    margin-top: 32px;
}

.hero-badge span {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 2px;
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.hero-badge span:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   About Section
   ======================================== */
.about {
    background: var(--color-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    text-align: center;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.about-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ========================================
   Stats Section
   ======================================== */
.stats {
    background: var(--color-bg-dark);
    color: #fff;
}

.stats .section-title {
    color: #fff;
}

.stats .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 24px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* ========================================
   Forum Section
   ======================================== */
.forum-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.forum-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--color-border);
    text-align: center;
}

.forum-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.forum-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.forum-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.forum-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ========================================
   History Section
   ======================================== */
.history {
    background: var(--color-bg);
}

.history-note {
    text-align: center;
    margin-bottom: 32px;
    color: var(--color-text-lighter);
    font-style: italic;
    font-size: 0.9rem;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.history-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px 0 0 4px;
}

.history-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.history-chapter {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.history-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--color-secondary);
}

.history-card p {
    color: var(--color-text-light);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.history-card--coming {
    opacity: 0.6;
    border-style: dashed;
}

.history-card--coming::before {
    background: var(--color-text-lighter);
}

/* ========================================
   Rules Section
   ======================================== */
.rules {
    background: var(--color-bg);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.rule-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.rule-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.rule-number {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.rule-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.rule-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ========================================
   Partners Section
   ======================================== */
.partners {
    background: var(--color-bg);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.partner-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: all var(--transition);
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.partner-logo {
    font-size: 3rem;
    margin-bottom: 16px;
}

.partner-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--color-secondary);
}

.partner-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   Join Section
   ======================================== */
.join {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.join .section-title {
    color: #fff;
}

.join .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.join-info h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: #fff;
}

.join-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.join-list li {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
}

.join-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.join-cta {
    display: flex;
    justify-content: center;
}

.join-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: center;
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 360px;
}

.join-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ========================================
   Join Number Display
   ======================================== */
.join-number {
    text-align: center;
    margin-bottom: 20px;
}

.join-number-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.join-card .join-number-label {
    color: rgba(255, 255, 255, 0.5);
}

.join-number-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 131, 58, 0.4);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-bg-darker);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 交错延迟 */
.about-card:nth-child(1) { transition-delay: 0s; }
.about-card:nth-child(2) { transition-delay: 0.1s; }
.about-card:nth-child(3) { transition-delay: 0.2s; }
.about-card:nth-child(4) { transition-delay: 0.3s; }

.forum-card:nth-child(1) { transition-delay: 0s; }
.forum-card:nth-child(2) { transition-delay: 0.1s; }
.forum-card:nth-child(3) { transition-delay: 0.2s; }
.forum-card:nth-child(4) { transition-delay: 0.1s; }
.forum-card:nth-child(5) { transition-delay: 0.2s; }
.forum-card:nth-child(6) { transition-delay: 0.3s; }

.rule-card:nth-child(1) { transition-delay: 0s; }
.rule-card:nth-child(2) { transition-delay: 0.1s; }
.rule-card:nth-child(3) { transition-delay: 0.2s; }
.rule-card:nth-child(4) { transition-delay: 0.1s; }
.rule-card:nth-child(5) { transition-delay: 0.2s; }
.rule-card:nth-child(6) { transition-delay: 0.3s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .forum-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .join-content {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 3rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-desc {
        font-size: 0.9rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .forum-grid {
        grid-template-columns: 1fr;
    }

    .history-grid {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端导航 */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        background: var(--color-bg-card);
        padding: 80px 32px 32px;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--color-text) !important;
        font-size: 1.05rem;
    }

    .nav-link:hover {
        color: var(--color-primary) !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .join-card {
        padding: 28px 20px;
    }

    .join-number-value {
        font-size: 2rem;
    }
}