/* ============ 字体 ============ */
@font-face {
    font-family: "PT Mono";
    src: url("pt-mono-regular-2.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --code-bg: #404246;
    --code-text: #e2e8f0;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.08);

    /* 全站字体栈：PT Mono 优先，中文回退 */
    --font-sans: "PT Mono", -apple-system, BlinkMacSystemFont,
                "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                "Microsoft YaHei", "微软雅黑", sans-serif;
    --font-mono: "PT Mono", "SFMono-Regular", Consolas,
                "Liberation Mono", Menlo, monospace;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.65;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

pre {
    position: relative;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px 18px;
    padding-top: 40px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    font-family: var(--font-mono);
}

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

/* ============ 复制按钮 ============ */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.copy-btn.copied {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

/* ============ Header ============ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo img {
    height: 28px;
    width: auto;
    display: block;
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
    text-decoration: none;
}

.nav-links a.gh {
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 8px;
}

.nav-links a.gh:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============ Hero ============ */
.hero {
    text-align: center;
    height: 420px;
    padding: 88px 0 72px;
    background:
        radial-gradient(600px 300px at 50% 0%, var(--primary-light), transparent 70%);
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .slogan {
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.hero .sub-slogan {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.hero .sub-slogan .dot {
    margin: 0 8px;
    color: var(--border);
}

.buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: top;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    line-height: 1.4;
    height: 48px;
}

/* 版本号文字 */
.version-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}

.version-text:empty {
    display: none;
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ============ 下载下拉菜单 ============ */
.download-dropdown {
    position: relative;
    display: inline-block;
}

.download-dropdown .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
}

.download-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    padding: 6px;
    z-index: 50;
    text-align: left;
}

.download-menu.open {
    display: block;
}

.download-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    transition: background 0.15s;
}

.download-menu a:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

.download-menu a em {
    margin-left: auto;
    font-style: normal;
    color: var(--text-light);
    font-size: 12px;
}

/* ============ 安装命令条 ============ */
.install-bar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
}

.install-bar code {
    background: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
}

.install-bar button {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.install-bar button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ============ Section ============ */
section {
    padding: 72px 0;
}

section.alt {
    background: var(--bg-alt);
}

/* 首页 section 里的 h2 才居中 */
section > .container > h2 {
    text-align: center;
}

h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-sub {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ============ 下载区 ============ */
.downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 48px;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    text-align: center;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.download-card .dl-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 2px;
}

.download-card strong {
    color: var(--text);
    font-size: 15px;
}

.download-card .dl-meta {
    color: var(--text-light);
    font-size: 12px;
}

/* ============ Features ============ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature {
    display: grid;
    grid-template-columns: auto 1fr;   /* 左列图标自适应，右列标题占满 */
    grid-template-rows: auto auto;     /* 第一行图标+标题，第二行说明 */
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;               /* 图标和标题垂直居中对齐 */
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: all 0.25s;
}

/* 图标：固定在左列第一行 */
.feature .icon {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 0;    /* 覆盖原来的 margin-bottom: 14px */
}

/* 标题：右列第一行 */
.feature h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;           /* 去掉默认 margin，否则会影响行高对齐 */
}

/* 说明：跨两列，第二行 */
.feature p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    color: var(--text-light);
    font-size: 15px;
}

/* ============ Steps ============ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.step {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-light);
    font-size: 15px;
}

/* ============ Commands ============ */
.commands {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.command-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: all 0.25s;
}

.command-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.command-card h3 {
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 8px;
}

.command-card > p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 12px;
}

.command-card pre {
    padding: 14px;
    padding-top: 14px;
    font-size: 13px;
}

/* ============ Docs links ============ */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.doc-link {
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    transition: all 0.25s;
    box-shadow: var(--shadow);
}

.doc-link:hover {
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.doc-link strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 16px;
}

.doc-link span {
    font-size: 14px;
    color: var(--text-light);
}

/* ============ CTA ============ */
.cta {
    text-align: center;
    padding: 64px 0;
}

.cta h2 {
    margin-bottom: 16px;
}

.cta p {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 16px;
}

/* ============ Footer ============ */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

footer a {
    color: var(--text-light);
}

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

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 38px;
    }

    .hero .slogan {
        font-size: 17px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a:not(.gh) {
        display: none;
    }

    h2 {
        font-size: 26px;
    }

    section {
        padding: 56px 0;
    }

    .hero {
        padding: 64px 0 56px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    /* 按钮组顶部对齐 */
    .buttons {
        display: flex;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
        align-items: top;   /* 关键：顶部对齐 */
    }

    /* 只给 hero 区按钮组里的按钮固定高度 */
    .buttons .btn {
        height: 48px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .download-dropdown {
        position: relative;
        display: inline-block;
    }

    .download-dropdown .btn {
        width: 100%;
    }

    .download-menu {
        left: 0;
        transform: none;
        width: 100%;
        min-width: 0;
    }

    /* 版本号文字 */
    .version-text {
        margin-top: 6px;
        font-size: 12px;
        color: var(--text-light);
        text-align: center;
        line-height: 1.4;
        white-space: nowrap;
    }

    .version-text:empty {
        display: none;
    }

    .install-bar {
        font-size: 12px;
        max-width: 100%;
        overflow-x: auto;
    }

    .downloads {
        grid-template-columns: repeat(2, 1fr);
    }
}

.version-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 999px;
    /*background: rgba(255, 255, 255, 0.2);*/
    color: #fff;
    line-height: 1.6;
    vertical-align: middle;
}

.version-badge:empty {
    display: none;
}

/* ============================================================
   文档页
   ============================================================ */
.docs-page {
    --sidebar-w: 240px;
    --header-h: 61px;
    --content-max: 760px;
}

.docs-page header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.docs-page .logo img {
    height: 28px;
    display: block;
}

.docs-page .docs-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    line-height: 1;
    margin-right: 12px;
}

/* 整体布局：左右两栏 */
.docs-layout {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.docs-sidebar {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    padding: 10px 0 16px 0;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 32px 0 120px;
    font-size: 14.5px;
    line-height: 1.7;
}

/* 中屏：侧边栏收窄 */
@media (max-width: 1024px) {
    .docs-layout {
        gap: 28px;
    }

    .docs-sidebar {
        width: 190px;
        min-width: 190px;
    }
}

/* 小屏：侧边栏变抽屉 */
@media (max-width: 900px) {
    .docs-layout {
        padding: 0 20px;
        gap: 0;
    }

    .docs-sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        bottom: 0;
        width: 260px;
        min-width: 260px;
        background: var(--bg);
        border-right: 1px solid var(--border);
        padding: 24px 16px 48px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 99;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.1);
        max-height: none;
    }

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

    .docs-content {
        max-width: 100%;
        margin-left: 0;
        padding: 24px 0 100px;
    }
}

/* 超小屏：进一步收紧 */
@media (max-width: 480px) {
    .container,
    .docs-layout {
        padding: 0 16px;
    }

    .docs-content h1 {
        font-size: 21px;
    }
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* 每个分组：块级，纵向堆叠 */
.docs-sidebar .nav-group {
    display: block;
    margin-bottom: 16px;
}

.docs-sidebar .nav-group-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-light);
    padding: 0 10px;
    margin-bottom: 4px;
}

/* 列表：纵向 */
.docs-sidebar .docs-nav-list {
    display: block;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.docs-sidebar .docs-nav-list li {
    display: block;
    margin: 2px 0;
}

.docs-sidebar .docs-nav-list a {
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.5;
}

.docs-sidebar .docs-nav-list a:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    text-decoration: none;
}

.docs-sidebar .docs-nav-list a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}


.docs-content h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
    line-height: 1.25;
}

.docs-content .lead {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.docs-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.3px;
    scroll-margin-top: 20px;
}

.docs-content h2:first-of-type {
    margin-top: 0;
}

.docs-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 8px;
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.docs-content h4 {
    font-size: 14.5px;
    font-weight: 600;
    margin: 18px 0 6px;
}

.docs-content p {
    margin-bottom: 12px;
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 12px 20px;
}

.docs-content li {
    margin-bottom: 4px;
}

/* 提示框 */
.callout {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    /* border-left: 3px solid var(--primary); */
    background: var(--primary-light);
    margin: 0 0 16px;
    font-size: 13.5px;
}

.callout .co-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1.7;
}

.callout p {
    margin: 0;
}

.callout.warn {
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.callout.danger {
    border-left-color: #ef4444;
    background: #fee2e2;
}

.callout.tip {
    border-left-color: #16a34a;
    background: #dcfce7;
}

/* 表格 */
.docs-content .table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.docs-content th,
.docs-content td {
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--border);
    vertical-align: top;
}

.docs-content th {
    background: var(--bg-alt);
    font-weight: 600;
    white-space: nowrap;
}

.docs-content td code {
    white-space: nowrap;
}

/* 锚点偏移 */
.docs-content .anchor {
    display: block;
    position: relative;
    top: calc(-1 * (var(--header-h) + 20px));
    visibility: hidden;
}

/* 返回顶部 */
.back-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 90;
    font-family: inherit;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 移动端遮罩 */
.docs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 98;
}

.docs-overlay.show {
    display: block;
}

/* 响应式 */
@media (max-width: 1024px) {
    .docs-content {
        margin-left: 24px;
        padding: 32px 0 100px;
    }
}

@media (max-width: 900px) {
    .docs-page .docs-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .docs-layout {
        padding: 0 20px;
    }

    .docs-sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        bottom: 0;
        width: 260px;
        min-width: 260px;
        max-width: 260px;
        background: var(--bg);
        border-right: 1px solid var(--border);
        padding: 24px 16px 48px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 99;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.1);
        max-height: none;
    }

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

    .docs-content {
        margin-left: 0;
        padding: 24px 0 100px;
        max-width: 100%;
    }

    .docs-content h1 {
        font-size: 24px;
    }

    .docs-content h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .docs-content h1 {
        font-size: 21px;
    }

    .docs-content th,
    .docs-content td {
        padding: 6px 8px;
        font-size: 12.5px;
    }

    .back-top {
        right: 16px;
        bottom: 16px;
    }
}

/* 文档页侧边栏内的 nav 必须回到块级纵向 */
.docs-sidebar nav {
    display: block !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

/* ============ Prism 集成 ============ */
/* 让 Prism 高亮融入现有代码块样式 */

pre[class*="language-"],
code[class*="language-"] {
    background: none;
    text-shadow: none;
    font-family: var(--font-mono);
    font-size: inherit;
    line-height: inherit;
}

pre[class*="language-"] {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px 18px;
    padding-top: 40px;   /* 给复制按钮留位置 */
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

code[class*="language-"] {
    color: var(--code-text);
    white-space: pre;
}

/* ============ 对比表格 ============ */
.table-wrap {
    overflow-x: auto;
    margin: 0 0 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 640px;
}

.table-wrap th,
.table-wrap td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.table-wrap th {
    background: var(--bg-alt);
    font-weight: 600;
    white-space: nowrap;
    color: var(--text);
    position: sticky;
    top: 0;
}

.table-wrap tbody tr:last-child td {
    border-bottom: none;
}

.table-wrap tbody tr:hover {
    background: var(--bg-alt);
}

.table-wrap td code {
    white-space: nowrap;
}

/* 移动端收紧 */
@media (max-width: 768px) {
    .table-wrap {
        border-radius: 8px;
    }

    .table-wrap th,
    .table-wrap td {
        padding: 8px 10px;
        font-size: 12.5px;
    }
}