:root {
    --orange: #FF5A1B;
    --orange-light: #ff8c5a;
    --orange-dark: #e55a2b;
    --bg-dark: #fafbfc;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    overflow-x: hidden;
}

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

a:hover {
    text-decoration: underline;
}

/* ===== 导航 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--orange);
}

.nav-links a.active {
    color: var(--orange);
    font-weight: 600;
}

.nav-cta {
    background: #FF5A1B;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.3s;
}

.nav-cta:hover {
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    padding: 150px 24px 40px;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.hero .tag {
    display: inline-block;
    font-size: 13px;
    color: var(--orange-dark);
    border: 1px solid rgba(255, 90, 27, 0.3);
    background: rgba(255, 107, 53, 0.08);
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #0f172a 30%, var(--orange-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .sub {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 12px;
}

/* ===== 搜索框 ===== */
.search-box {
    max-width: 560px;
    margin: 26px auto 0;
    position: relative;
}

.search-box input {
    width: 100%;
    height: 50px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    padding: 0 22px 0 48px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 27, 0.12);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box svg {
    position: absolute;
    left: 18px;
    top: 16px;
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

/* ===== 快速分类 ===== */
.quick-cats {
    max-width: 1180px;
    margin: 22px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-card:hover {
    border-color: var(--orange);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.cat-card .ico {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 10px;
    background: rgba(255, 90, 27, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card .ico svg {
    width: 20px;
    height: 20px;
    stroke: var(--orange);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cat-card .name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.cat-card .count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== 文档布局 ===== */
.doc {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px 40px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 0;
}

.toc-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 20px 10px;
    letter-spacing: 2px;
}

.toc a {
    display: block;
    padding: 7px 20px;
    font-size: 13.5px;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.toc a:hover {
    color: var(--orange);
    background: var(--bg-card-hover);
    text-decoration: none;
}

.toc a.active {
    color: var(--orange);
    border-left-color: var(--orange);
    background: rgba(255, 90, 27, 0.06);
}

.content {
    min-width: 0;
}

.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
    scroll-margin-top: 100px;
}

.section h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2 .num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section .desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* ===== FAQ 手风琴 ===== */
details {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--bg-card-hover);
    overflow: hidden;
    transition: border-color 0.2s;
}

details[open] {
    border-color: rgba(255, 90, 27, 0.45);
}

details summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 16px 48px 16px 18px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

details summary .q {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(255, 90, 27, 0.15);
    color: var(--orange);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

details summary::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}

details[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

details summary:hover {
    color: var(--orange);
}

.faq-body {
    padding: 2px 18px 18px 48px;
    color: var(--text-secondary);
    font-size: 14px;
}

.faq-body p {
    margin-bottom: 8px;
}

.faq-body ul,
.faq-body ol {
    margin: 6px 0 8px;
    padding-left: 20px;
}

.faq-body li {
    margin-bottom: 4px;
}

.faq-body .tag-inline {
    display: inline-block;
    background: rgba(255, 90, 27, 0.12);
    color: var(--orange-dark);
    border-radius: 4px;
    padding: 0 6px;
    font-size: 12px;
    margin-right: 4px;
}

.faq-body strong {
    color: var(--text);
}

/* ===== 无结果 ===== */
.no-result {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.no-result.show {
    display: block;
}

/* ===== Footer ===== */
footer {
    background: #0b1020;
    padding: 60px 24px 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    color: #f1f5f9;
}

.footer-brand p {
    color: rgba(241, 245, 249, 0.6);
    font-size: 14px;
    line-height: 1.7;
}

.footer-contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
    color: rgba(241, 245, 249, 0.6);
    font-size: 14px;
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-contact a {
    color: inherit;
    font-size: 15px;
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 150px;
}

.footer-col h5 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #f1f5f9;
}

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

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

.footer-col a {
    color: rgba(241, 245, 249, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    color: rgba(241, 245, 249, 0.4);
    font-size: 13px;
}

.footer-bottom p a {
    color: rgba(241, 245, 249, 0.4);
    font-size: 13px;
}

.footer-bottom p a:hover {
    color: #ffffff;
}

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

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

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .doc {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .toc {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        padding: 10px;
    }

    .toc-title {
        width: 100%;
        padding: 4px 10px;
    }

    .toc a {
        padding: 6px 12px;
        border-left: none;
        border-radius: 6px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .section {
        padding: 22px;
    }

    .faq-body {
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding-top: 140px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}
