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

:root {
    --bg-primary: #0b0e1a;
    --bg-secondary: #12162a;
    --bg-card: rgba(18, 22, 42, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f0f4ff;
    --text-secondary: #b0b8d0;
    --accent-gold: #f0b429;
    --accent-gold-hover: #ffc84a;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #60a5fa;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-card: 16px;
    --radius-btn: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #2a2f4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b4260; }

/* ===== 基础动画 ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(240, 180, 41, 0.3); }
    50% { box-shadow: 0 0 40px rgba(240, 180, 41, 0.6); }
}

/* ===== 滚动动画 ===== */
section {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

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

/* ===== 星星背景 ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 180px 20px, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 220px 90px, rgba(255,255,255,0.12), transparent),
        radial-gradient(2px 2px at 300px 50px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 350px 110px, rgba(255,255,255,0.18), transparent),
        radial-gradient(2px 2px at 420px 30px, rgba(255,255,255,0.08), transparent),
        radial-gradient(1px 1px at 480px 70px, rgba(255,255,255,0.15), transparent);
    background-size: 500px 200px;
    pointer-events: none;
    z-index: 0;
}

/* ===== 通用容器 ===== */
header, main, footer {
    position: relative;
    z-index: 1;
}

/* ===== Header / 导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

header:hover {
    background: rgba(11, 14, 26, 0.95);
}

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

nav > div > a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--accent-gold), #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav > div > a:hover {
    transform: scale(1.03);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

nav ul li a:hover {
    color: var(--text-primary);
    background: rgba(240, 180, 41, 0.08);
}

nav ul li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== Hero Section (渐变Banner) ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, #0b0e1a 0%, #1a1040 40%, #0f1a3a 70%, #0b0e1a 100%);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(240, 180, 41, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    animation: pulse-glow 6s ease-in-out infinite;
    pointer-events: none;
}

#hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-gold), #ff8c00, var(--accent-gold));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
    position: relative;
    z-index: 2;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 36px;
    position: relative;
    z-index: 2;
}

#hero a[role="button"] {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--accent-gold), #e6a020);
    color: #0b0e1a;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-btn);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(240, 180, 41, 0.3);
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

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

/* ===== 通用Section ===== */
section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px;
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

section > p {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
}

/* ===== Download Section (圆角卡片) ===== */
#download > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

#download article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-card);
    padding: 40px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

#download article:nth-child(1) { animation-delay: 0.2s; }
#download article:nth-child(2) { animation-delay: 0.4s; }

#download article:hover {
    transform: translateY(-8px);
    border-color: rgba(240, 180, 41, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#download article h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--accent-gold);
}

#download article p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

#download article a {
    display: inline-block;
    padding: 12px 36px;
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: #fff;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

#download article a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, var(--accent-blue-hover), #3b82f6);
}

/* ===== Features Section ===== */
#features > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

#features article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-card);
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

#features article:nth-child(1) { animation-delay: 0.1s; }
#features article:nth-child(2) { animation-delay: 0.2s; }
#features article:nth-child(3) { animation-delay: 0.3s; }
#features article:nth-child(4) { animation-delay: 0.4s; }
#features article:nth-child(5) { animation-delay: 0.5s; }
#features article:nth-child(6) { animation-delay: 0.6s; }

#features article:hover {
    transform: translateY(-6px);
    border-color: rgba(240, 180, 41, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

#features article h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

#features article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== About Section ===== */
#about {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-card);
    padding: 60px 32px;
    margin: 0 24px 40px;
    max-width: calc(var(--max-width) - 48px);
}

#about p {
    text-align: left;
    max-width: 100%;
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

#about p:last-child {
    margin-bottom: 0;
}

/* ===== FAQ Section (毛玻璃效果) ===== */
#faq > div {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

#faq details {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-card);
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    overflow: hidden;
}

#faq details:hover {
    border-color: rgba(240, 180, 41, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

#faq details[open] {
    border-color: rgba(240, 180, 41, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#faq summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    transition: var(--transition);
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-gold);
    transition: transform 0.3s ease;
    font-weight: 300;
}

#faq details[open] summary::after {
    transform: rotate(45deg);
}

#faq details p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

/* ===== HowTo Section ===== */
#howto {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-card);
    padding: 60px 32px;
    margin: 0 24px 40px;
    max-width: calc(var(--max-width) - 48px);
}

#howto ol {
    max-width: 700px;
    margin: 0 auto 24px;
    padding-left: 24px;
    list-style: none;
    counter-reset: step;
}

#howto ol li {
    counter-increment: step;
    padding: 14px 0 14px 48px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 12px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-gold), #e6a020);
    color: #0b0e1a;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

#howto ol li strong {
    color: var(--accent-gold);
}

#howto > p:last-child {
    text-align: center;
    margin-top: 16px;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Knowledge Section ===== */
#knowledge > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

#knowledge article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-card);
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

#knowledge article:nth-child(1) { animation-delay: 0.1s; }
#knowledge article:nth-child(2) { animation-delay: 0.2s; }
#knowledge article:nth-child(3) { animation-delay: 0.3s; }
#knowledge article:nth-child(4) { animation-delay: 0.4s; }
#knowledge article:nth-child(5) { animation-delay: 0.5s; }
#knowledge article:nth-child(6) { animation-delay: 0.6s; }

#knowledge article:hover {
    transform: translateY(-6px);
    border-color: rgba(240, 180, 41, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

#knowledge article h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

#knowledge article p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Contact Section ===== */
#contact {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-card);
    padding: 60px 32px;
    margin: 0 24px 40px;
    max-width: calc(var(--max-width) - 48px);
}

#contact address {
    font-style: normal;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#contact address p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== Footer ===== */
footer {
    background: rgba(11, 14, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 24px;
}

footer > div {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

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

footer nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

footer nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 4px;
}

footer nav ul li a:hover {
    color: var(--accent-gold);
    background: rgba(240, 180, 41, 0.08);
}

/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
    nav {
        height: 64px;
        padding: 0 16px;
    }

    nav ul {
        gap: 4px;
    }

    nav ul li a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    nav > div > a {
        font-size: 1.2rem;
    }

    #hero {
        padding: 100px 16px 60px;
        min-height: 90vh;
    }

    #hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

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

    section {
        padding: 60px 16px;
    }

    #about, #howto, #contact {
        margin: 0 8px 32px;
        padding: 40px 20px;
    }

    #download > div {
        grid-template-columns: 1fr;
    }

    #features > div {
        grid-template-columns: 1fr;
    }

    #knowledge > div {
        grid-template-columns: 1fr;
    }

    footer > div {
        flex-direction: column;
        text-align: center;
    }

    footer nav ul {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    nav ul li a {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

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

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

    section h2 {
        font-size: 1.5rem;
    }

    #download article, #features article, #knowledge article {
        padding: 24px 16px;
    }

    #faq summary {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    #faq details p {
        padding: 0 18px 16px;
        font-size: 0.9rem;
    }

    #howto ol li {
        padding: 12px 0 12px 44px;
        font-size: 0.9rem;
    }

    #howto ol li::before {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        top: 10px;
    }

    #contact address p {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

/* ===== 暗色模式支持 (已默认暗色，此处补充高对比) ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #0b0e1a;
        --bg-secondary: #12162a;
        --text-primary: #f0f4ff;
        --text-secondary: #b0b8d0;
    }
    /* 保持暗色，覆盖系统浅色 */
    body {
        background: var(--bg-primary) !important;
        color: var(--text-primary) !important;
    }
    header {
        background: rgba(11, 14, 26, 0.85) !important;
    }
}

/* ===== 打印优化 ===== */
@media print {
    header { position: static; }
    #hero { min-height: auto; padding: 40px 0; }
    section { animation: none !important; opacity: 1 !important; }
    #download article, #features article, #knowledge article {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}