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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #0f0f23;
    color: #e0e0f0;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* 暗色模式（默认深色，亮色主题通过媒体查询切换） */
@media (prefers-color-scheme: light) {
    body {
        background: #f4f6fb;
        color: #1a1a2e;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #4a4a7a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6a6a9a;
}

/* 通用容器 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 导航栏（毛玻璃 + 渐变边框） ========== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 10px 20px;
    transition: background 0.3s;
}

@media (prefers-color-scheme: light) {
    header {
        background: rgba(244, 246, 251, 0.7);
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
}

nav[aria-label="主导航"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    max-width: 1200px;
    margin: 0 auto;
}

nav[aria-label="主导航"] a {
    text-decoration: none;
    color: #b0b0d0;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 20px;
    transition: all 0.25s ease;
    position: relative;
}

nav[aria-label="主导航"] a:hover {
    color: #ffffff;
    background: rgba(46, 204, 113, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

nav[aria-label="主导航"] a[aria-current="page"] {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.12);
    font-weight: 600;
}

@media (prefers-color-scheme: light) {
    nav[aria-label="主导航"] a {
        color: #3a3a5a;
    }
    nav[aria-label="主导航"] a:hover {
        color: #1a1a2e;
        background: rgba(46, 204, 113, 0.12);
    }
    nav[aria-label="主导航"] a[aria-current="page"] {
        color: #1a7a4a;
        background: rgba(46, 204, 113, 0.15);
    }
}

/* ========== Hero 渐变Banner ========== */
#hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 40%, #2a2a5a 100%);
    border-radius: 32px;
    margin: 30px 0 50px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(46,204,113,0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(52,152,219,0.06) 0%, transparent 50%);
    pointer-events: none;
}

#hero h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #2ecc71, #27ae60, #1abc9c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(46,204,113,0.2);
    position: relative;
    z-index: 1;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 12px;
    color: #c0c0e0;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

#hero p:last-of-type {
    font-weight: 600;
    color: #2ecc71;
}

@media (prefers-color-scheme: light) {
    #hero {
        background: linear-gradient(135deg, #e8f0fe 0%, #d4e8f8 40%, #c0e0f0 100%);
    }
    #hero h1 {
        background: linear-gradient(135deg, #1a7a4a, #27ae60, #16a085);
        -webkit-background-clip: text;
        background-clip: text;
    }
    #hero p {
        color: #2a3a4a;
    }
}

/* 通用 section 卡片圆角 + 毛玻璃效果 */
section {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px;
    padding: 40px 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

@media (prefers-color-scheme: light) {
    section {
        background: rgba(255,255,255,0.6);
        border: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    }
    section:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    }
}

/* 标题 */
h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(46,204,113,0.3);
    color: #2ecc71;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #2ecc71;
    border-radius: 2px;
}

@media (prefers-color-scheme: light) {
    h2 {
        color: #1a7a4a;
        border-bottom-color: rgba(26, 122, 74, 0.3);
    }
    h2::after {
        background: #1a7a4a;
    }
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #d0d0f0;
}

@media (prefers-color-scheme: light) {
    h3 { color: #2a3a4a; }
}

/* 列表与文本 */
ul, ol {
    padding-left: 24px;
    margin: 12px 0;
}

li {
    margin-bottom: 8px;
    color: #c8c8e0;
}

@media (prefers-color-scheme: light) {
    li { color: #3a4a5a; }
}

p {
    margin-bottom: 14px;
    color: #c8c8e0;
}

@media (prefers-color-scheme: light) {
    p { color: #3a4a5a; }
}

/* 卡片内文章 */
article {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

article:hover {
    background: rgba(46,204,113,0.04);
    border-color: rgba(46,204,113,0.15);
    transform: scale(1.01);
}

@media (prefers-color-scheme: light) {
    article {
        background: rgba(0,0,0,0.02);
        border: 1px solid rgba(0,0,0,0.04);
    }
    article:hover {
        background: rgba(46,204,113,0.06);
        border-color: rgba(46,204,113,0.2);
    }
}

/* 常见问题 details 样式 */
details {
    background: rgba(255,255,255,0.02);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.25s ease;
}

details:hover {
    border-color: rgba(46,204,113,0.15);
    background: rgba(46,204,113,0.03);
}

details[open] {
    background: rgba(46,204,113,0.05);
    border-color: rgba(46,204,113,0.2);
}

summary {
    font-weight: 600;
    cursor: pointer;
    color: #d0d0f0;
    font-size: 1.05rem;
    padding: 4px 0;
    transition: color 0.2s;
}

summary:hover {
    color: #2ecc71;
}

details p {
    margin-top: 12px;
    padding-left: 8px;
    border-left: 3px solid #2ecc71;
    padding-left: 16px;
}

@media (prefers-color-scheme: light) {
    details {
        background: rgba(0,0,0,0.02);
        border-color: rgba(0,0,0,0.04);
    }
    summary { color: #2a3a4a; }
    summary:hover { color: #1a7a4a; }
    details p { border-left-color: #1a7a4a; }
}

/* 侧边栏 aside */
aside {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 24px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.05);
}

aside ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

aside a {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

aside a:hover {
    color: #27ae60;
    border-bottom-color: #2ecc71;
}

@media (prefers-color-scheme: light) {
    aside { background: rgba(255,255,255,0.5); }
    aside a { color: #1a7a4a; }
    aside a:hover { color: #145a35; }
}

/* Footer */
footer {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 40px 20px 30px;
    margin-top: 60px;
    text-align: center;
}

footer p {
    color: #8888aa;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

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

footer nav a {
    color: #6a6a8a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

footer nav a:hover {
    color: #2ecc71;
}

#legal {
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}

#legal h2 {
    font-size: 1.2rem;
    border: none;
    margin-bottom: 12px;
}

#legal p {
    font-size: 0.85rem;
    color: #7a7a9a;
    margin-bottom: 8px;
}

@media (prefers-color-scheme: light) {
    footer {
        background: rgba(240, 242, 248, 0.8);
        border-top: 1px solid rgba(0,0,0,0.04);
    }
    footer p { color: #6a7a8a; }
    footer nav a { color: #5a6a7a; }
    footer nav a:hover { color: #1a7a4a; }
    #legal p { color: #6a7a8a; }
}

/* 联系 section 特殊处理 */
#contact ul {
    list-style: none;
    padding: 0;
}

#contact li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

@media (prefers-color-scheme: light) {
    #contact li { border-bottom-color: rgba(0,0,0,0.04); }
}

/* 知识中心链接 */
#knowledge a {
    color: #2ecc71;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

#knowledge a:hover {
    border-bottom-color: #2ecc71;
    color: #27ae60;
}

@media (prefers-color-scheme: light) {
    #knowledge a { color: #1a7a4a; }
    #knowledge a:hover { color: #145a35; border-bottom-color: #1a7a4a; }
}

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

/* 为每个 section 增加交错延迟 */
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; }

/* 响应式布局 */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    header {
        padding: 8px 12px;
    }

    nav[aria-label="主导航"] {
        gap: 4px 10px;
    }

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

    #hero {
        padding: 50px 16px 40px;
        margin: 20px 0 30px;
    }

    section {
        padding: 28px 18px;
        margin-bottom: 28px;
        border-radius: 20px;
    }

    h2 {
        font-size: 1.4rem;
    }

    article {
        padding: 16px;
    }

    details {
        padding: 12px 16px;
    }

    aside {
        padding: 20px;
    }

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

    footer nav {
        gap: 12px;
    }

    #legal p {
        font-size: 0.8rem;
    }
}

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

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

    nav[aria-label="主导航"] {
        gap: 3px 6px;
    }

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

    section {
        padding: 20px 14px;
        border-radius: 16px;
    }

    h2 {
        font-size: 1.2rem;
    }
}

/* 工具：禁用动画（减少运动偏好） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}