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

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.65);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --accent: #f5c518;
    --accent-hover: #ffd633;
    --accent-dark: #c9a200;
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(245, 197, 24, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 1200px;
    --nav-height: 64px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
    border-radius: 3px;
}

/* ===== 导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    transition: background var(--transition);
}

nav[aria-label="主导航"] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: center;
    align-items: center;
    max-width: var(--max-width);
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

nav[aria-label="主导航"]::-webkit-scrollbar {
    display: none;
}

nav[aria-label="主导航"] a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a[aria-current="page"] {
    color: var(--accent);
    background: rgba(245, 197, 24, 0.1);
}

nav[aria-label="主导航"] a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ===== 主内容 ===== */
main {
    padding-top: var(--nav-height);
}

section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }
section:nth-child(11) { animation-delay: 1.1s; }
section:nth-child(12) { animation-delay: 1.2s; }
section:nth-child(13) { animation-delay: 1.3s; }
section:nth-child(14) { animation-delay: 1.4s; }
section:nth-child(15) { animation-delay: 1.5s; }
section:nth-child(16) { animation-delay: 1.6s; }
section:nth-child(17) { animation-delay: 1.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent), #ff8c00, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 24px;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 12px;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.7;
}

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

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

ul, ol {
    padding-left: 20px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

li {
    margin-bottom: 8px;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Hero 区域 ===== */
#hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    position: relative;
    overflow: hidden;
    margin: 0 10px 10px;
    box-shadow: var(--shadow-card);
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(245, 197, 24, 0.08), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(255, 140, 0, 0.06), transparent 50%);
    animation: heroGlow 12s ease infinite;
    pointer-events: none;
}

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

#hero h1 {
    position: relative;
    z-index: 1;
}

#hero p {
    max-width: 700px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
    color: #d0d0e0;
}

#hero a[role="button"] {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #0f0f1a;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

#hero a[role="button"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(245, 197, 24, 0.5);
}

/* ===== 卡片通用 ===== */
section:not(#hero) {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin: 20px 10px;
    padding: 40px 24px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}

section:not(#hero):hover {
    border-color: rgba(245, 197, 24, 0.15);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateY(-2px);
}

/* ===== 区块内卡片样式 ===== */
article, div[itemscope] {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
    transition: all var(--transition);
}

article:hover, div[itemscope]:hover {
    border-color: rgba(245, 197, 24, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

blockquote {
    background: rgba(245, 197, 24, 0.06);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

blockquote p {
    margin-bottom: 8px;
    color: var(--text-primary);
}

blockquote cite {
    color: var(--accent);
    font-style: normal;
    font-weight: 500;
}

/* ===== 列表美化 ===== */
ul, ol {
    list-style: none;
    padding-left: 0;
}

ul li, ol li {
    padding: 8px 0 8px 24px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
    top: 11px;
}

ol {
    counter-reset: step;
}

ol li {
    counter-increment: step;
    padding-left: 36px;
}

ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #0f0f1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    top: 6px;
}

/* ===== 知识中心链接 ===== */
#knowledge ul li {
    padding-left: 0;
}

#knowledge ul li::before {
    display: none;
}

#knowledge ul li a {
    display: block;
    padding: 10px 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    transition: all var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
}

#knowledge ul li a:hover {
    background: rgba(245, 197, 24, 0.08);
    border-color: rgba(245, 197, 24, 0.2);
    color: var(--accent);
    transform: translateX(4px);
}

/* ===== FAQ 样式 ===== */
#faq div[itemscope] {
    margin-bottom: 12px;
    padding: 16px 20px;
    cursor: default;
}

#faq h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--accent);
}

#faq div[itemscope] p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===== HowTo 样式 ===== */
#howto ol li {
    padding-left: 44px;
}

#howto ol li span[itemprop="name"] {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

#howto ol li p {
    margin-bottom: 0;
}

/* ===== Footer ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 40px 20px 20px;
    text-align: center;
    margin-top: 40px;
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

footer nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ===== Legal 区域 ===== */
#legal article {
    margin-bottom: 16px;
}

#legal h3 {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    header {
        padding: 0 12px;
    }

    nav[aria-label="主导航"] {
        gap: 2px 8px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    nav[aria-label="主导航"] a {
        font-size: 0.78rem;
        padding: 4px 10px;
    }

    section {
        padding: 40px 16px;
        margin: 16px 8px;
    }

    #hero {
        padding: 80px 16px 60px;
        margin: 0 8px 8px;
    }

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

    #hero a[role="button"] {
        padding: 12px 32px;
        font-size: 1rem;
    }

    section:not(#hero) {
        padding: 28px 16px;
        margin: 16px 8px;
    }

    h2::after {
        width: 40px;
    }

    ul li, ol li {
        padding-left: 20px;
    }

    ol li {
        padding-left: 32px;
    }

    ol li::before {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
        top: 8px;
    }

    #howto ol li {
        padding-left: 38px;
    }

    footer {
        padding: 30px 16px 16px;
    }

    footer nav {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --nav-height: 52px;
    }

    nav[aria-label="主导航"] a {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    #hero h1 {
        font-size: 1.8rem;
    }

    section:not(#hero) {
        padding: 24px 12px;
        margin: 12px 6px;
    }

    #hero a[role="button"] {
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    blockquote {
        padding: 12px 16px;
    }
}

/* ===== 暗色模式（默认已是暗色，此处强化） ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a0a14;
        --bg-secondary: #12121e;
        --bg-card: rgba(18, 18, 30, 0.7);
    }
}

/* ===== 打印样式 ===== */
@media print {
    header { display: none; }
    #hero a[role="button"] { display: none; }
    section { break-inside: avoid; opacity: 1; transform: none; }
    body { background: white; color: black; }
    h1, h2, h3 { color: #1a1a2e; }
    p, li { color: #333; }
}