/* ============================================================
   FuSuccess Docs — 统一样式
   风格：VitePress / Docusaurus 类
   ============================================================ */

:root {
    /* 基础色 */
    --c-bg: #ffffff;
    --c-bg-soft: #f6f8fa;
    --c-bg-mute: #f2f4f7;
    --c-bg-sunken: #eef0f3;
    --c-border: #e5e7eb;
    --c-border-light: #f0f1f3;
    --c-text: #1f2328;
    --c-text-soft: #4b5563;
    --c-text-mute: #6b7280;
    --c-text-invert: #ffffff;

    /* 品牌色 */
    --c-brand: #2563eb;
    --c-brand-light: #3b82f6;
    --c-brand-dark: #1d4ed8;
    --c-brand-bg: rgba(37, 99, 235, 0.08);
    --c-brand-border: rgba(37, 99, 235, 0.2);

    /* 功能色 */
    --c-success: #16a34a;
    --c-warning: #d97706;
    --c-danger: #dc2626;
    --c-tip: #0891b2;

    /* 代码 */
    --c-code-bg: #f4f4f5;
    --c-code-text: #e11d48;
    --c-code-block-bg: #0f172a;
    --c-code-block-text: #e2e8f0;

    /* 布局 */
    --nav-height: 60px;
    --sidebar-width: 272px;
    --toc-width: 200px;
    --content-max: 820px;

    /* 圆角 */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* 深色模式 */
html.dark {
    --c-bg: #0d1117;
    --c-bg-soft: #161b22;
    --c-bg-mute: #1c2128;
    --c-bg-sunken: #090c10;
    --c-border: #30363d;
    --c-border-light: #21262d;
    --c-text: #c9d1d9;
    --c-text-soft: #9ba6b3;
    --c-text-mute: #8b949e;
    --c-text-invert: #0d1117;

    --c-brand: #58a6ff;
    --c-brand-light: #79b8ff;
    --c-brand-dark: #388bfd;
    --c-brand-bg: rgba(88, 166, 255, 0.12);
    --c-brand-border: rgba(88, 166, 255, 0.3);

    --c-code-bg: #1c2128;
    --c-code-text: #ff7b72;
    --c-code-block-bg: #0d1117;
    --c-code-block-text: #c9d1d9;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

code {
    font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    background: var(--c-code-bg);
    color: var(--c-code-text);
    border-radius: 4px;
}

pre {
    background: var(--c-code-block-bg);
    color: var(--c-code-block-text);
    padding: 1.2rem 1.4rem;
    border-radius: var(--r-md);
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.875rem;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* ============================================================
   顶部导航栏
   ============================================================ */
.docs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.docs-nav .nav-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.docs-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--c-text);
    font-size: 1rem;
}

.docs-nav .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--c-brand), #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.docs-nav .nav-divider {
    width: 1px;
    height: 22px;
    background: var(--c-border);
}

.docs-nav .nav-project {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--c-text);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: var(--r-sm);
    transition: background 0.2s;
}

.docs-nav .nav-project:hover {
    background: var(--c-bg-soft);
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    height: 36px;
    padding: 0 1rem 0 2.2rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
    color: var(--c-text);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: var(--c-brand);
    background: var(--c-bg);
    box-shadow: 0 0 0 3px var(--c-brand-bg);
}

.search-box .search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-mute);
    pointer-events: none;
    font-size: 0.9rem;
}

.search-box .search-hint {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--c-text-mute);
    background: var(--c-bg-mute);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--c-border);
    pointer-events: none;
}

/* 搜索结果下拉 */
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 101;
}

.search-results.active { display: block; }

.search-result-item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--c-border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover,
.search-result-item.active {
    background: var(--c-bg-soft);
}

.search-result-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-text);
    margin-bottom: 0.2rem;
}

.search-result-title mark {
    background: rgba(234, 179, 8, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-path {
    font-size: 0.78rem;
    color: var(--c-text-mute);
}

.search-result-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--c-text-mute);
    font-size: 0.9rem;
}

.docs-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--r-sm);
    color: var(--c-text-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.nav-icon-btn:hover {
    background: var(--c-bg-soft);
    color: var(--c-text);
}

.nav-github-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-github-btn:hover {
    border-color: var(--c-text-mute);
    background: var(--c-bg-soft);
}

.mobile-sidebar-btn {
    display: none;
}

/* ============================================================
   页面布局
   ============================================================ */
.docs-layout {
    display: flex;
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* 侧边栏 */
.docs-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    border-right: 1px solid var(--c-border);
    background: var(--c-bg);
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 1.5rem 0 2rem;
    z-index: 50;
}

.sidebar-section {
    padding: 0 1rem 1rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-mute);
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.3rem;
}

.sidebar-menu { list-style: none; }

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: var(--c-text-soft);
    border-radius: var(--r-sm);
    transition: all 0.15s;
    line-height: 1.4;
}

.sidebar-menu li a:hover {
    background: var(--c-bg-soft);
    color: var(--c-text);
    text-decoration: none;
}

.sidebar-menu li.active > a {
    color: var(--c-brand);
    background: var(--c-brand-bg);
    font-weight: 600;
}

.sidebar-menu li .submenu {
    list-style: none;
    margin-left: 0.8rem;
    border-left: 1px solid var(--c-border);
    padding-left: 0.6rem;
    margin-top: 0.2rem;
}

.sidebar-menu li .submenu a {
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
}

.sidebar-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    border-radius: var(--r-sm);
    user-select: none;
}

.sidebar-group-title:hover { background: var(--c-bg-soft); }

.sidebar-group-title .arrow {
    font-size: 0.7rem;
    color: var(--c-text-mute);
    transition: transform 0.2s;
}

.sidebar-group.collapsed .arrow { transform: rotate(-90deg); }
.sidebar-group.collapsed .submenu { display: none; }

/* 主内容区 */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
    padding: 2.5rem 2.5rem 4rem;
    max-width: calc(100% - var(--sidebar-width) - var(--toc-width));
}

.docs-content {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* 面包屑 */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--c-text-mute);
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: var(--c-text-mute);
    transition: color 0.2s;
}

.breadcrumbs a:hover { color: var(--c-brand); text-decoration: none; }

.breadcrumbs .sep { color: var(--c-border); }
.breadcrumbs .current { color: var(--c-text); font-weight: 500; }

/* 文档正文样式 */
.docs-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.3;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--c-border);
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    line-height: 1.35;
}

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--c-text);
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.docs-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.docs-content p {
    margin-bottom: 1rem;
    color: var(--c-text-soft);
}

.docs-content ul,
.docs-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--c-text-soft);
}

.docs-content li { margin-bottom: 0.4rem; }

.docs-content ul li::marker { color: var(--c-brand); }

.docs-content blockquote {
    border-left: 4px solid var(--c-brand);
    background: var(--c-brand-bg);
    padding: 0.8rem 1.2rem;
    margin: 1rem 0;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--c-text-soft);
    font-size: 0.95rem;
}

.docs-content blockquote p { margin-bottom: 0; }

/* 提示框 */
.docs-content .tip,
.docs-content .warning,
.docs-content .danger,
.docs-content .info {
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    border-radius: var(--r-md);
    border-left: 4px solid;
    font-size: 0.93rem;
}

.docs-content .tip {
    background: rgba(22, 163, 74, 0.06);
    border-color: var(--c-success);
}
.docs-content .tip .tip-title { color: var(--c-success); font-weight: 600; }

.docs-content .warning {
    background: rgba(217, 119, 6, 0.06);
    border-color: var(--c-warning);
}
.docs-content .warning .tip-title { color: var(--c-warning); font-weight: 600; }

.docs-content .danger {
    background: rgba(220, 38, 38, 0.06);
    border-color: var(--c-danger);
}
.docs-content .danger .tip-title { color: var(--c-danger); font-weight: 600; }

.docs-content .info {
    background: var(--c-brand-bg);
    border-color: var(--c-brand);
}
.docs-content .info .tip-title { color: var(--c-brand); font-weight: 600; }

.tip-title { margin-bottom: 0.3rem; font-size: 0.9rem; }

/* 安装包下载块 */
.download-block {
    background: var(--c-brand-bg);
    border: 1px solid var(--c-brand-border);
    border-radius: var(--r-md);
    padding: 1.2rem 1.3rem;
    margin: 1.2rem 0;
}

.download-block-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--c-text);
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.download-buttons--single {
    grid-template-columns: minmax(0, 240px);
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-text);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    min-width: 0;
}

.download-btn:hover {
    border-color: var(--c-brand);
    transform: translateY(-1px);
    text-decoration: none;
}

.download-btn .platform-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.download-btn .platform-info {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}

.download-btn .platform-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-text);
}

.download-btn .platform-meta {
    font-size: 0.74rem;
    color: var(--c-text-mute);
    line-height: 1.2;
}

.download-block-footer {
    margin-top: 0.9rem;
    font-size: 0.85rem;
}

/* 下载块 - 占位状态（无预编译安装包） */
.download-block.download-block-empty {
    background: var(--c-bg-soft);
    border-color: var(--c-border);
}

.download-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
}

.download-empty-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    opacity: 0.55;
    line-height: 1;
}

.download-empty-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 0.2rem;
}

.download-empty-hint {
    font-size: 0.8rem;
    color: var(--c-text-mute);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .download-buttons { grid-template-columns: 1fr; }
}

/* 法律责任 / 造假警示（高对比） */
.legal-alert {
    margin: 2rem 0 1.5rem;
    border: 2px solid var(--c-danger);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: rgba(220, 38, 38, 0.07);
    box-shadow: 0 8px 28px rgba(220, 38, 38, 0.18);
}
.legal-alert-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1.05rem 1.25rem;
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    color: #fff;
}
.legal-alert-badge {
    flex-shrink: 0;
    min-width: 52px;
    height: 52px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
}
.docs-content .legal-alert-head h2 {
    margin: 0 0 0.35rem;
    padding: 0;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.legal-alert-head h2::before { display: none; }
.docs-content .legal-alert-head .legal-alert-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.legal-alert-body {
    padding: 1.15rem 1.25rem 1.35rem;
}
.legal-alert-body > p {
    margin-bottom: 0.9rem;
}
.legal-case {
    background: var(--c-bg);
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-left: 5px solid var(--c-danger);
    border-radius: var(--r-md);
    padding: 0.95rem 1rem 0.95rem 1.05rem;
    margin: 0.7rem 0;
}
.legal-case-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--c-danger);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.docs-content .legal-case-title {
    margin: 0 0 0.4rem;
    color: var(--c-danger);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}
.legal-case p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--c-text-soft);
    line-height: 1.65;
}
.legal-case a {
    font-weight: 600;
}
.legal-alert-foot {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: rgba(220, 38, 38, 0.12);
    border: 1px dashed rgba(220, 38, 38, 0.45);
    color: var(--c-text);
    font-weight: 600;
}

html.dark .legal-alert {
    background: rgba(220, 38, 38, 0.14);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
html.dark .legal-case {
    background: var(--c-bg-soft);
}

/* 表格 */
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--c-border);
}

.docs-content th,
.docs-content td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.docs-content th {
    background: var(--c-bg-soft);
    font-weight: 600;
    color: var(--c-text);
}

.docs-content tr:last-child td { border-bottom: none; }

.docs-content tr:hover td { background: var(--c-bg-soft); }

/* 锚点链接 */
.docs-content h2 .header-anchor,
.docs-content h3 .header-anchor,
.docs-content h4 .header-anchor {
    opacity: 0;
    margin-left: 0.3rem;
    color: var(--c-text-mute);
    font-size: 0.85em;
    text-decoration: none;
    transition: opacity 0.2s;
}

.docs-content h2:hover .header-anchor,
.docs-content h3:hover .header-anchor,
.docs-content h4:hover .header-anchor { opacity: 1; }

/* ============================================================
   右侧 TOC 目录
   ============================================================ */
.docs-toc {
    width: var(--toc-width);
    flex-shrink: 0;
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    right: 0;
    padding: 2rem 1rem 2rem 0;
    overflow-y: auto;
    z-index: 40;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-mute);
    margin-bottom: 0.8rem;
    padding-left: 0.75rem;
}

.toc-list { list-style: none; border-left: 1px solid var(--c-border); }

.toc-list li a {
    display: block;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    color: var(--c-text-mute);
    border-left: 2px solid transparent;
    margin-left: -1px;
    line-height: 1.4;
    transition: all 0.15s;
}

.toc-list li a:hover {
    color: var(--c-text);
    text-decoration: none;
}

.toc-list li.active a {
    color: var(--c-brand);
    border-left-color: var(--c-brand);
    font-weight: 500;
}

.toc-list li .toc-sub { padding-left: 0.8rem; font-size: 0.78rem; }

/* ============================================================
   文档首页（项目列表）
   ============================================================ */
.docs-home {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.docs-home-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.docs-home-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.docs-home-hero .gradient {
    background: linear-gradient(135deg, var(--c-brand), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-home-hero p {
    font-size: 1.05rem;
    color: var(--c-text-mute);
    max-width: 550px;
    margin: 0 auto 1.5rem;
}

.docs-home-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.docs-home-search input {
    width: 100%;
    height: 48px;
    padding: 0 1.2rem 0 3rem;
    font-size: 1rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-bg);
    color: var(--c-text);
    outline: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.docs-home-search input:focus {
    border-color: var(--c-brand);
    box-shadow: 0 0 0 4px var(--c-brand-bg);
}

.docs-home-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-mute);
    font-size: 1.1rem;
}

.docs-home-section { margin-bottom: 3rem; }

.docs-home-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.project-card {
    display: block;
    padding: 1.3rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-bg);
    transition: all 0.2s;
}

.project-card:hover {
    border-color: var(--c-brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.project-card-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.project-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.project-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 0.1rem;
}

.project-card .project-tag {
    font-size: 0.72rem;
    color: var(--c-text-mute);
}

.project-card p {
    font-size: 0.88rem;
    color: var(--c-text-soft);
    line-height: 1.55;
}

.project-card-footer {
    display: flex;
    gap: 1rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--c-border-light);
    font-size: 0.8rem;
    color: var(--c-text-mute);
}

.project-card-footer span { display: flex; align-items: center; gap: 0.3rem; }

/* ============================================================
   上一页/下一页 导航
   ============================================================ */
.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
}

.pager-card {
    display: block;
    padding: 1rem 1.2rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    transition: all 0.2s;
}

.pager-card:hover {
    border-color: var(--c-brand);
    text-decoration: none;
}

.pager-card.next { text-align: right; grid-column: 2; }
.pager-card.prev { grid-column: 1; }

.pager-label {
    font-size: 0.78rem;
    color: var(--c-text-mute);
    margin-bottom: 0.2rem;
}

.pager-title {
    font-weight: 600;
    color: var(--c-text);
    font-size: 0.95rem;
}

.pager-card:hover .pager-title { color: var(--c-brand); }

/* ============================================================
   页脚
   ============================================================ */
.docs-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.82rem;
    color: var(--c-text-mute);
}

.docs-footer a { color: var(--c-text-mute); }
.docs-footer a:hover { color: var(--c-brand); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
    .docs-toc { display: none; }
    .docs-main {
        margin-right: 0;
        max-width: calc(100% - var(--sidebar-width));
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 260px;
    }

    .mobile-sidebar-btn { display: flex; }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: var(--sidebar-width);
        z-index: 90;
    }

    .docs-sidebar.open { transform: translateX(0); }

    .sidebar-mask {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 80;
    }

    .sidebar-mask.active { display: block; }

    .docs-main {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem 1.2rem 3rem;
    }

    .docs-nav { padding: 0 1rem; }
    .search-box { display: none; }

    .docs-home { padding: 2rem 1.2rem; }
    .docs-home-hero h1 { font-size: 1.8rem; }
    .project-cards { grid-template-columns: 1fr; }

    .docs-pager { grid-template-columns: 1fr; }
    .pager-card.next,
    .pager-card.prev { grid-column: 1; text-align: left; }
}

@media (max-width: 600px) {
    .nav-github-btn span { display: none; }
    .docs-content h1 { font-size: 1.7rem; }
    .docs-content h2 { font-size: 1.3rem; }
    .nav-project span { display: none; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-text-mute); }
