 /**
 * 柠檬主题 - 单个文档页面样式
 * 商业化、专业的文档阅读体验
 *
 * @package Software_Sales_Theme
 */

/* ===== CSS变量定义 ===== */
:root {
    --docs-primary: #4f46e5;
    --docs-primary-light: #6366f1;
    --docs-primary-dark: #3730a3;
    --docs-secondary: #10b981;
    --docs-accent: #f59e0b;
    --docs-danger: #ef4444;

    --docs-bg-primary: #ffffff;
    --docs-bg-secondary: #f8fafc;
    --docs-bg-tertiary: #f1f5f9;
    --docs-bg-muted: #e2e8f0;

    --docs-text-primary: #1e293b;
    --docs-text-secondary: #475569;
    --docs-text-muted: #64748b;
    --docs-text-light: #94a3b8;

    --docs-border-primary: #e2e8f0;
    --docs-border-secondary: #cbd5e1;
    --docs-border-light: #f1f5f9;

    --docs-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --docs-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --docs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --docs-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --docs-radius-sm: 0.375rem;
    --docs-radius-md: 0.5rem;
    --docs-radius-lg: 0.75rem;
    --docs-radius-xl: 1rem;
    --docs-radius-2xl: 1.5rem;

    --docs-space-1: 0.25rem;
    --docs-space-2: 0.5rem;
    --docs-space-3: 0.75rem;
    --docs-space-4: 1rem;
    --docs-space-6: 1.5rem;
    --docs-space-8: 2rem;
    --docs-space-10: 2.5rem;
    --docs-space-12: 3rem;
    --docs-space-16: 4rem;
    --docs-space-20: 5rem;
    --docs-space-24: 6rem;

    --docs-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --docs-font-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;

    --docs-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --docs-transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局样式重置 ===== */
.lemon-docs-single {
    font-family: var(--docs-font-sans);
    background: var(--docs-bg-secondary);
    min-height: 100vh;
    color: var(--docs-text-primary);
    line-height: 1.6;
}

.lemon-docs-single * {
    box-sizing: border-box;
}

/* ===== 面包屑导航 ===== */
.breadcrumb-nav {
    background: var(--docs-bg-primary);
    border-bottom: 1px solid var(--docs-border-primary);
    padding: var(--docs-space-4) 0;
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--docs-text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 var(--docs-space-2);
    color: var(--docs-text-light);
}

.breadcrumb a {
    color: var(--docs-text-muted);
    text-decoration: none;
    transition: var(--docs-transition);
    padding: var(--docs-space-1) var(--docs-space-2);
    border-radius: var(--docs-radius-sm);
}

.breadcrumb a:hover {
    color: var(--docs-primary);
    background: var(--docs-bg-tertiary);
}

.breadcrumb .current {
    color: var(--docs-text-primary);
    font-weight: 500;
}

/* ===== 文档头部 ===== */
.docs-header {
    background: linear-gradient(135deg, var(--docs-primary) 0%, var(--docs-primary-light) 100%);
    color: white;
    padding: var(--docs-space-16) 0 var(--docs-space-12);
    position: relative;
    overflow: hidden;
}

.docs-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--docs-space-8);
}

.header-main {
    flex: 1;
}

.docs-title {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--docs-space-4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docs-description {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--docs-space-2);
}

.product-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--docs-space-2) var(--docs-space-4);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--docs-radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-badge.general {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

/* ===== 主要内容区域 ===== */
.docs-main {
    padding: var(--docs-space-16) 0;
}

.docs-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--docs-space-16);
    align-items: start;
}

/* ===== 侧边栏 ===== */
.docs-sidebar {
    position: sticky;
    top: calc(var(--docs-space-16) + 60px);
    background: var(--docs-bg-primary);
    border-radius: var(--docs-radius-xl);
    box-shadow: var(--docs-shadow-md);
    border: 1px solid var(--docs-border-primary);
    overflow: hidden;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: var(--docs-space-6);
    border-bottom: 1px solid var(--docs-border-primary);
    background: var(--docs-bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    margin: 0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--docs-text-secondary);
    cursor: pointer;
    padding: var(--docs-space-2);
    border-radius: var(--docs-radius-sm);
    transition: var(--docs-transition);
}

.sidebar-toggle:hover {
    background: var(--docs-bg-muted);
    color: var(--docs-text-primary);
}

.docs-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--docs-space-4);
}

/* 菜单树样式 - 改进的层级展示 */
.menu-tree-level {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-tree-level.level-0 {
    padding: 0;
}

.menu-tree-level:not(.level-0) {
    margin-left: var(--docs-space-6);
    position: relative;
}

.menu-tree-level:not(.level-0)::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--docs-space-6) + var(--docs-space-2));
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--docs-border-primary) 0%, transparent 100%);
    opacity: 0.6;
}

.menu-item {
    margin-bottom: var(--docs-space-1);
    position: relative;
}

.menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: var(--docs-space-2);
    padding: var(--docs-space-2) var(--docs-space-3);
    border-radius: var(--docs-radius-lg);
    transition: var(--docs-transition);
    position: relative;
    min-height: 36px;
}

/* 层级缩进线 */
.menu-indent-line {
    position: absolute;
    left: calc(-1 * var(--docs-space-6));
    top: 50%;
    width: calc(var(--docs-space-6) - var(--docs-space-2));
    height: 2px;
    background: var(--docs-border-primary);
    opacity: 0.4;
}

.menu-indent-line::before {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--docs-border-primary);
    opacity: 0.6;
}

/* 不同层级的样式 */
.menu-item-wrapper[data-level="0"] {
    background: var(--docs-bg-tertiary);
    border: 1px solid var(--docs-border-primary);
    font-weight: 600;
}

.menu-item-wrapper[data-level="1"] {
    background: rgba(var(--docs-primary), 0.05);
    border-left: 3px solid var(--docs-primary);
    margin-left: var(--docs-space-1);
}

.menu-item-wrapper[data-level="2"] {
    background: rgba(var(--docs-secondary), 0.05);
    border-left: 3px solid var(--docs-secondary);
    margin-left: var(--docs-space-2);
}

.menu-item-wrapper[data-level="3"] {
    background: rgba(var(--docs-accent), 0.05);
    border-left: 3px solid var(--docs-accent);
    margin-left: var(--docs-space-3);
}

/* 当前选中项样式 */
.menu-item.current .menu-item-wrapper {
    background: linear-gradient(135deg, var(--docs-primary) 0%, var(--docs-primary-light) 100%) !important;
    color: white !important;
    box-shadow: var(--docs-shadow-md);
    border: none !important;
    transform: translateX(4px);
}

.menu-item.current .menu-item-wrapper::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--docs-primary);
}

.menu-item:not(.current) .menu-item-wrapper:hover {
    background: var(--docs-bg-primary);
    box-shadow: var(--docs-shadow-sm);
    transform: translateX(2px);
}

/* 展开/收起按钮 */
.toggle-children {
    background: var(--docs-bg-primary);
    border: 1px solid var(--docs-border-primary);
    color: var(--docs-text-secondary);
    cursor: pointer;
    padding: var(--docs-space-1);
    border-radius: var(--docs-radius-sm);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--docs-transition);
    flex-shrink: 0;
}

.toggle-children:hover {
    background: var(--docs-primary);
    color: white;
    border-color: var(--docs-primary);
    transform: scale(1.1);
}

.toggle-icon {
    font-size: 0.75rem;
    transition: var(--docs-transition);
}

.menu-spacer {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* 菜单图标 */
.menu-icon {
    font-size: 1.1rem;
    opacity: 0.8;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.menu-icon[data-level="0"] {
    font-size: 1.2rem;
    opacity: 1;
}

.menu-icon[data-level="1"] {
    font-size: 1rem;
    opacity: 0.9;
}

.menu-icon[data-level="2"] {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 菜单文本 */
.menu-link,
.menu-title {
    flex: 1;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--docs-space-2);
}

.menu-text {
    flex: 1;
}

.menu-link[data-level="0"] .menu-text,
.menu-title[data-level="0"] .menu-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.menu-link[data-level="1"] .menu-text,
.menu-title[data-level="1"] .menu-text {
    font-weight: 500;
    font-size: 0.875rem;
}

.menu-link[data-level="2"] .menu-text,
.menu-title[data-level="2"] .menu-text {
    font-weight: 400;
    font-size: 0.8rem;
}

/* 层级标识 */
.menu-level-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--docs-text-muted);
    padding: 2px 6px;
    border-radius: var(--docs-radius-sm);
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.menu-item.current .menu-level-badge {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

/* 子项数量 */
.children-count {
    background: var(--docs-bg-muted);
    color: var(--docs-text-muted);
    padding: 2px 6px;
    border-radius: var(--docs-radius-sm);
    font-size: 0.65rem;
    font-weight: 500;
    flex-shrink: 0;
}

.menu-item.no-content .menu-title {
    opacity: 0.8;
}

/* 展开/收起动画 */
.menu-item.expanded > .menu-tree-level {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.menu-item:not(.expanded) > .menu-tree-level {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-menu {
    text-align: center;
    padding: var(--docs-space-8);
    color: var(--docs-text-muted);
}

/* ===== 文档内容区域 ===== */
.docs-content {
    background: var(--docs-bg-primary);
    border-radius: var(--docs-radius-xl);
    box-shadow: var(--docs-shadow-md);
    border: 1px solid var(--docs-border-primary);
    overflow: hidden;
}

.content-header {
    padding: var(--docs-space-6) var(--docs-space-8);
    border-bottom: 1px solid var(--docs-border-primary);
    background: var(--docs-bg-tertiary);
}

.content-header .doc-title,
.overview-header .doc-title {
    margin: 0 0 var(--docs-space-3) 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    line-height: 1.3;
}

.content-meta {
    display: flex;
    gap: var(--docs-space-6);
    font-size: 0.875rem;
    color: var(--docs-text-muted);
}

.content-meta span {
    display: flex;
    align-items: center;
    gap: var(--docs-space-1);
}

.view-count::before {
    content: '👁';
}

.last-updated::before {
    content: '📅';
}

.content-body {
    padding: var(--docs-space-8);
    line-height: 1.7;
    font-size: 1rem;
}

/* 文档内容排版 */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: var(--docs-text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin: var(--docs-space-8) 0 var(--docs-space-4);
}

.content-body h1:first-child,
.content-body h2:first-child,
.content-body h3:first-child {
    margin-top: 0;
}

.content-body h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid var(--docs-border-primary);
    padding-bottom: var(--docs-space-4);
}

.content-body h2 {
    font-size: 1.875rem;
    border-bottom: 1px solid var(--docs-border-light);
    padding-bottom: var(--docs-space-2);
}

.content-body h3 {
    font-size: 1.5rem;
}

.content-body h4 {
    font-size: 1.25rem;
}

.content-body h5 {
    font-size: 1.125rem;
}

.content-body h6 {
    font-size: 1rem;
}

.content-body p {
    margin: var(--docs-space-4) 0;
    color: var(--docs-text-secondary);
}

.content-body ul,
.content-body ol {
    margin: var(--docs-space-4) 0;
    padding-left: var(--docs-space-6);
}

.content-body li {
    margin: var(--docs-space-2) 0;
    color: var(--docs-text-secondary);
}

.content-body ul li::marker {
    color: var(--docs-primary);
}

.content-body ol li::marker {
    color: var(--docs-primary);
    font-weight: 600;
}

.content-body blockquote {
    margin: var(--docs-space-6) 0;
    padding: var(--docs-space-4) var(--docs-space-6);
    background: var(--docs-bg-tertiary);
    border-left: 4px solid var(--docs-primary);
    border-radius: 0 var(--docs-radius-md) var(--docs-radius-md) 0;
    font-style: italic;
    color: var(--docs-text-secondary);
}

.content-body code {
    background: var(--docs-bg-muted);
    color: var(--docs-primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: var(--docs-radius-sm);
    font-family: var(--docs-font-mono);
    font-size: 0.875em;
    font-weight: 500;
}

.content-body pre {
    background: var(--docs-text-primary);
    color: var(--docs-bg-primary);
    padding: var(--docs-space-6);
    border-radius: var(--docs-radius-lg);
    overflow-x: auto;
    margin: var(--docs-space-6) 0;
    position: relative;
    box-shadow: var(--docs-shadow-lg);
}

.content-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--docs-space-6) 0;
    background: var(--docs-bg-primary);
    border-radius: var(--docs-radius-lg);
    overflow: hidden;
    box-shadow: var(--docs-shadow-sm);
    border: 1px solid var(--docs-border-primary);
}

.content-body th,
.content-body td {
    padding: var(--docs-space-3) var(--docs-space-4);
    text-align: left;
    border-bottom: 1px solid var(--docs-border-primary);
}

.content-body th {
    background: var(--docs-bg-tertiary);
    font-weight: 600;
    color: var(--docs-text-primary);
}

.content-body tr:hover {
    background: var(--docs-bg-tertiary);
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--docs-radius-lg);
    margin: var(--docs-space-6) 0;
    box-shadow: var(--docs-shadow-md);
}

.empty-content {
    text-align: center;
    padding: var(--docs-space-16);
    color: var(--docs-text-muted);
}

.empty-content p {
    font-size: 1.125rem;
    margin: 0;
}

/* ===== 文档导航 ===== */
.content-nav {
    padding: var(--docs-space-8);
    border-top: 1px solid var(--docs-border-primary);
    background: var(--docs-bg-tertiary);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--docs-space-6);
}

.nav-prev,
.nav-next {
    display: flex;
}

.nav-next {
    justify-content: flex-end;
}

.doc-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--docs-space-2);
    padding: var(--docs-space-6);
    background: var(--docs-bg-primary);
    border: 1px solid var(--docs-border-primary);
    border-radius: var(--docs-radius-lg);
    text-decoration: none;
    transition: var(--docs-transition);
    max-width: 300px;
    box-shadow: var(--docs-shadow-sm);
}

.doc-nav-link:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-md);
    transform: translateY(-2px);
}

.nav-direction {
    font-size: 0.875rem;
    color: var(--docs-text-muted);
    font-weight: 500;
}

.nav-title {
    font-size: 1rem;
    color: var(--docs-text-primary);
    font-weight: 600;
    line-height: 1.4;
}

/* ===== 概览页面 ===== */
.category-overview,
.collection-overview {
    padding: var(--docs-space-8);
}

.overview-header {
    text-align: center;
    margin-bottom: var(--docs-space-12);
}

.overview-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin: 0 0 var(--docs-space-4);
}

.overview-header p {
    font-size: 1.125rem;
    color: var(--docs-text-secondary);
    margin: 0;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--docs-space-8);
}

.overview-card {
    background: var(--docs-bg-primary);
    border: 1px solid var(--docs-border-primary);
    border-radius: var(--docs-radius-xl);
    padding: var(--docs-space-8);
    text-align: center;
    transition: var(--docs-transition);
    box-shadow: var(--docs-shadow-sm);
}

.overview-card:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-lg);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: var(--docs-space-4);
}

.overview-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    margin: 0 0 var(--docs-space-4);
}

.overview-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: var(--docs-transition);
}

.overview-card h3 a:hover {
    color: var(--docs-primary);
}

.child-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--docs-space-3);
    margin-top: var(--docs-space-4);
}

.child-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--docs-space-2);
    padding: var(--docs-space-4);
    background: var(--docs-bg-tertiary);
    border: 1px solid var(--docs-border-primary);
    border-radius: var(--docs-radius-lg);
    text-decoration: none;
    transition: var(--docs-transition);
    text-align: center;
    min-height: 80px;
}

.child-link-card:hover {
    background: var(--docs-bg-primary);
    border-color: var(--docs-primary);
    transform: translateY(-2px);
    box-shadow: var(--docs-shadow-md);
}

.child-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.child-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--docs-text-secondary);
    line-height: 1.3;
    transition: var(--docs-transition);
}

.child-link-card:hover .child-title {
    color: var(--docs-primary);
}

.more-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--docs-space-1);
    padding: var(--docs-space-4);
    background: var(--docs-bg-muted);
    border: 1px dashed var(--docs-border-secondary);
    border-radius: var(--docs-radius-lg);
    text-align: center;
    min-height: 80px;
    justify-content: center;
}

.more-icon {
    font-size: 1.5rem;
    color: var(--docs-text-muted);
}

.more-text {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    font-style: italic;
}

/* ===== 响应式设计 ===== */

/* 平板设备 */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 280px 1fr;
        gap: var(--docs-space-12);
    }

    .header-content {
        flex-direction: column;
        gap: var(--docs-space-6);
    }

    .header-meta {
        align-items: flex-start;
    }

    .docs-sidebar {
        top: calc(var(--docs-space-12) + 60px);
        /* max-height: calc(100vh - 100px); */
    }

    /* 平板设备菜单优化 */
    .menu-item-wrapper {
        padding: var(--docs-space-2);
        min-height: 32px;
    }

    .toggle-children {
        width: 20px;
        height: 20px;
    }

    .menu-level-badge {
        display: none;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .docs-layout {
        display: block;
    }

    .docs-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 50;
        transition: var(--docs-transition-slow);
        border-radius: 0;
        max-height: none;
    }

    .docs-sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .docs-header {
        padding: var(--docs-space-12) 0 var(--docs-space-8);
    }

    .docs-title {
        font-size: 2rem;
    }

    .docs-description {
        font-size: 1rem;
    }

    .content-body {
        padding: var(--docs-space-6);
    }

    .content-header {
        padding: var(--docs-space-4) var(--docs-space-6);
    }

    .content-nav {
        padding: var(--docs-space-6);
    }

    .nav-links {
        grid-template-columns: 1fr;
        gap: var(--docs-space-4);
    }

    .nav-next {
        justify-content: flex-start;
    }

    .doc-nav-link {
        max-width: none;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: var(--docs-space-6);
    }

    .overview-card {
        padding: var(--docs-space-6);
    }

    /* 手机设备菜单优化 */
    .menu-tree-level:not(.level-0) {
        margin-left: var(--docs-space-4);
    }

    .menu-item-wrapper {
        padding: var(--docs-space-2);
        min-height: 28px;
        gap: var(--docs-space-1);
    }

    .toggle-children {
        width: 18px;
        height: 18px;
    }

    .menu-spacer {
        width: 18px;
        height: 18px;
    }

    .menu-icon {
        font-size: 0.9rem;
        width: 16px;
    }

    .menu-text {
        font-size: 0.8rem !important;
    }

    .menu-level-badge,
    .children-count {
        display: none;
    }

    .menu-indent-line {
        display: none;
    }

    .menu-item-wrapper[data-level="1"],
    .menu-item-wrapper[data-level="2"],
    .menu-item-wrapper[data-level="3"] {
        margin-left: 0;
        border-left-width: 2px;
    }

    .child-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: var(--docs-space-2);
    }

    .child-link-card {
        min-height: 70px;
        padding: var(--docs-space-3);
    }

    .child-icon {
        font-size: 1.25rem;
    }

    .child-title {
        font-size: 0.7rem;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .breadcrumb-nav {
        padding: var(--docs-space-3) 0;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .docs-header {
        padding: var(--docs-space-10) 0 var(--docs-space-6);
    }

    .docs-title {
        font-size: 1.75rem;
    }

    .docs-main {
        padding: var(--docs-space-12) 0;
    }

    .content-body {
        padding: var(--docs-space-4);
        font-size: 0.9375rem;
    }

    .content-body h1 {
        font-size: 1.75rem;
    }

    .content-body h2 {
        font-size: 1.5rem;
    }

    .content-body h3 {
        font-size: 1.25rem;
    }

    .content-meta {
        flex-direction: column;
        gap: var(--docs-space-2);
    }

    .child-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--docs-space-2);
    }

    .child-link-card {
        min-height: 60px;
        padding: var(--docs-space-2);
    }

    .child-icon {
        font-size: 1rem;
    }

    .child-title {
        font-size: 0.65rem;
    }

    .more-items {
        min-height: 60px;
        padding: var(--docs-space-2);
    }

    .more-icon {
        font-size: 1rem;
    }

    .more-text {
        font-size: 0.65rem;
    }
}

/* 侧边栏遮罩层 */
@media (max-width: 768px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: var(--docs-transition);
    }

    .docs-sidebar.open ~ .sidebar-overlay,
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* 打印样式 */
@media print {
    .breadcrumb-nav,
    .docs-sidebar,
    .content-nav,
    .sidebar-toggle {
        display: none !important;
    }

    .docs-layout {
        display: block;
    }

    .docs-header {
        background: none !important;
        color: var(--docs-text-primary) !important;
        padding: var(--docs-space-8) 0;
    }

    .docs-content {
        box-shadow: none;
        border: none;
    }

    .content-body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --docs-border-primary: #000000;
        --docs-border-secondary: #333333;
        --docs-text-muted: #333333;
    }

    .menu-item.current .menu-item-wrapper {
        border: 2px solid #000000;
    }

    .doc-nav-link:hover {
        border: 2px solid var(--docs-primary);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --docs-bg-primary: #1e293b;
        --docs-bg-secondary: #0f172a;
        --docs-bg-tertiary: #334155;
        --docs-bg-muted: #475569;

        --docs-text-primary: #f8fafc;
        --docs-text-secondary: #e2e8f0;
        --docs-text-muted: #94a3b8;
        --docs-text-light: #64748b;

        --docs-border-primary: #334155;
        --docs-border-secondary: #475569;
        --docs-border-light: #475569;
    }

    .content-body pre {
        background: #000000;
        color: #f8fafc;
    }
}