/**
 * CSS 合并文件 - 优化加载性能
 * 将所有 CSS 模块合并为单个文件，消除 @import 串行加载
 */

/* ========================================
   1. CSS 变量定义
   ======================================== */

:root {
    /* 颜色 - 浅色主题 */
    --bg-color: #f0f4f8;
    --text-color: #1a202c;
    --text-secondary: #718096;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f7fafc;
    --code-bg: #1a202c;
    --code-text: #e2e8f0;
    --border-color: #e2e8f0;
    --highlight-bg: #fef08a;
    --link-color: #6366f1;
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glow-color: rgba(102, 126, 234, 0.4);
    
    /* 间距系统 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* 布局 */
    --sidebar-width: 280px;
    --header-height: 70px;
    --content-max-width: 1100px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --text-secondary: #8b949e;
    --sidebar-bg: #161b22;
    --sidebar-hover: #21262d;
    --code-bg: #0d1117;
    --code-text: #e6edf3;
    --border-color: #30363d;
    --highlight-bg: #fbbf24;
    --link-color: #a5b4fc;
    --header-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
    --card-shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --glow-color: rgba(139, 92, 246, 0.4);
}

/* ========================================
   2. 基础样式
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 内联代码样式 */
code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--link-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9em;
}

/* 强调文本 */
strong {
    font-weight: 600;
}

/* 提示框和警告框中的强调文本使用红色 */
.tip strong,
.warning strong {
    color: #ef4444;
}

/* 返回首页链接 */
.back-home {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-home:hover {
    background: rgba(255,255,255,0.25);
}

/* 跳转链接 */
.jump-link {
    text-decoration: none;
    transition: all 0.2s ease;
}

.jump-link:hover {
    text-decoration: underline;
}

.jump-link strong {
    color: #ef4444;
    cursor: pointer;
}

/* 搜索高亮 */
.highlight {
    background: var(--highlight-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

.highlight-current {
    background: #ff5722;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.6);
}

/* 隐藏元素 */
.hidden {
    display: none;
}

/* ========================================
   3. 布局样式
   ======================================== */

/* 头部 */
header {
    background: var(--header-bg);
    color: white;
    padding: 0 20px;
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

/* 头部左侧区域 */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 头部标题 */
.header-title {
    font-size: 1.2rem;
    white-space: nowrap;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
    margin: 0;
}

/* 头部中间区域 */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* 头部右侧区域 */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 搜索容器 */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

#searchInput {
    width: 100%;
    padding: 12px 70px 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    background: rgba(255,255,255,0.2);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

#searchInput::placeholder {
    color: rgba(255,255,255,0.7);
}

#searchInput:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 4px 15px rgba(0,0,0,0.1);
}

/* 搜索信息 - 放在搜索框内部右侧 */
.search-info {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    pointer-events: none;
}

.search-info:empty {
    display: none;
}

/* 主题切换按钮 */
.theme-toggle {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    font-size: 14px;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

/* 容器 */
.container {
    display: flex;
    margin-top: var(--header-height);
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: var(--header-height);
    overflow-y: auto;
    padding: var(--spacing-md) 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--sidebar-bg) 0%, transparent 100%);
    pointer-events: none;
    display: block;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 移动端侧边栏遮罩 */
.sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl) var(--spacing-xl);
    max-width: var(--content-max-width);
    min-height: calc(100vh - var(--header-height));
    width: calc(100% - var(--sidebar-width));
}

/* 内容区块 */
.section {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: var(--sidebar-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--header-height) + var(--spacing-lg));
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.section:hover {
    box-shadow: var(--card-shadow-hover);
}

.section h2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid;
    border-image: var(--accent-gradient) 1;
    font-size: 1.6rem;
    font-weight: 700;
}

.section h3 {
    margin: 30px 0 15px;
    padding-left: 32px;
    color: var(--link-color);
    scroll-margin-top: 90px;
    font-size: 1.25rem;
    border-left: 4px solid var(--link-color);
    font-weight: 600;
}

.section h4 {
    margin: 20px 0 10px;
    padding-left: 64px;
    font-size: 1rem;
}

.section p {
    margin: 10px 0;
    text-indent: 2em;
}

.section p:has(strong:first-child),
.section p:has(a:first-child) {
    text-indent: 0;
}

.section ul,
.section ol {
    margin: 10px 0 10px 32px;
}

/* h3下的内容缩进 */
.section h3 + p,
.section h3 + .code-block,
.section h3 + .img-container,
.section h3 + .tip,
.section h3 + .warning,
.section h3 + ol,
.section h3 + ul {
    margin-left: 32px;
}

.section h3 ~ p,
.section h3 ~ .code-block,
.section h3 ~ .img-container,
.section h3 ~ ol,
.section h3 ~ ul {
    margin-left: 32px;
}

/* 重置h2后直接内容的缩进 */
.section h2 + p,
.section h2 + .tip,
.section h2 + .warning,
.section h2 + .code-block {
    margin-left: 0;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* ========================================
   4. 导航样式
   ======================================== */

/* 第一级目录项 - 无子目录的普通项 */
.nav-item {
    padding: 0;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    margin: 2px 8px;
    border-radius: 0 8px 8px 0;
}

.nav-item:hover {
    background: var(--sidebar-hover);
}

.nav-item.active {
    border-left-color: #667eea;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

.nav-item > a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 12px 15px 12px 16px;
}

/* 第一级目录项 - 有子目录的父项 */
.nav-item.nav-parent {
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 10px 15px 10px 16px;
}

.nav-item.nav-parent > a {
    padding: 0;
    display: inline;
    flex: 1;
}

/* 所有父级目录的三角形样式 */
.nav-parent > .nav-toggle {
    display: inline-block;
    width: 16px;
    margin-right: 5px;
    transition: transform 0.2s;
    font-size: 10px;
    flex-shrink: 0;
}

.nav-parent.collapsed > .nav-toggle {
    transform: rotate(0deg);
}

.nav-parent.expanded > .nav-toggle {
    transform: rotate(90deg);
}

/* 第二级目录容器 */
.nav-children {
    display: none;
    padding-left: 0;
}

.nav-parent.expanded + .nav-children,
.nav-children.show {
    display: block;
}

/* 第二级目录项 - 无子目录的普通项（后移2个汉字=32px） */
.nav-child {
    padding: 0;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.nav-child:hover {
    background: var(--border-color);
}

.nav-child.active {
    border-left-color: var(--header-bg);
    font-weight: bold;
}

/* 不可展开的二级目录项链接 */
.nav-child:not(.nav-parent) > a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 8px 15px 8px 48px;
}

/* 第二级目录项 - 有子目录的父项 */
.nav-child.nav-parent {
    display: flex;
    align-items: center;
    padding: 8px 15px 8px 48px;
}

.nav-child.nav-parent > a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0;
    display: inline;
    flex: 1;
}

/* 第三级目录容器 */
.nav-subchildren {
    display: none;
    padding-left: 0;
}

.nav-subchildren.show {
    display: block;
}

/* 第三级目录项（后移4个汉字=64px） */
.nav-subchild {
    padding: 0;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.85;
}

.nav-subchild:hover {
    background: var(--border-color);
}

.nav-subchild.active {
    border-left-color: var(--link-color);
    font-weight: bold;
    opacity: 1;
}

.nav-subchild > a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 6px 15px 6px 80px;
}

/* ========================================
   5. 组件样式
   ======================================== */

/* 代码块 */
.code-block {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    opacity: 0.1;
}

.code-block pre {
    padding: 45px 20px 20px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.6;
}

/* 复制按钮 */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 图片容器 */
.img-container {
    margin: 25px 0;
    text-align: center;
}

.img-container img {
    max-width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.img-container img:hover {
    transform: scale(1.02);
    box-shadow: var(--card-shadow-hover);
}

/* 懒加载图片占位样式 */
.img-container img[data-src] {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--sidebar-hover) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 200px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 提示框 */
.tip {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-left: 4px solid #3b82f6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
    position: relative;
}

.tip::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 20px;
    background: var(--sidebar-bg);
    padding: 5px;
    border-radius: 50%;
}

/* 警告框 */
.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-left: 4px solid #f59e0b;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
    position: relative;
}

.warning::before {
    content: '⚠️';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 20px;
    background: var(--sidebar-bg);
    padding: 5px;
    border-radius: 50%;
}

/* 弹窗公告 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--sidebar-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.modal-body {
    text-align: center;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 10px;
}

.modal-text {
    font-size: 16px;
    color: var(--text-color);
    margin: 10px 0;
}

.modal-text strong {
    color: var(--primary-color);
}

.modal-qrcode {
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 12px;
    display: inline-block;
}

.modal-qrcode img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}

.modal-note {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.modal-footer {
    margin-top: 10px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 10px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 深色模式弹窗适配 */
[data-theme="dark"] .modal-content {
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-qrcode {
    background: #ffffff;
}

/* ========================================
   6. 响应式样式
   ======================================== */

/* 中等屏幕适配 - 平板设备 */
@media (max-width: 1024px) {
    .main-content {
        padding: var(--spacing-xl) var(--spacing-lg);
        max-width: calc(100% - var(--sidebar-width));
    }
    
    .section {
        padding: var(--spacing-lg);
    }
    
    .search-container {
        max-width: 350px;
    }
}

/* 小屏幕适配 - 手机横屏/小平板 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        max-width: 100%;
        width: 100%;
    }
    
    .section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .section h2 {
        font-size: 1.4rem;
    }
    
    .section h3 {
        font-size: 1.15rem;
        padding-left: 24px;
    }
    
    /* h3下的内容缩进调整 */
    .section h3 + p,
    .section h3 + .code-block,
    .section h3 + .img-container,
    .section h3 + .tip,
    .section h3 + .warning,
    .section h3 + ol,
    .section h3 + ul {
        margin-left: 24px;
    }
    
    .section h3 ~ p,
    .section h3 ~ .code-block,
    .section h3 ~ .img-container,
    .section h3 ~ ol,
    .section h3 ~ ul {
        margin-left: 24px;
    }
    
    .section ul,
    .section ol {
        margin-left: 24px;
    }
    
    /* 头部布局调整 */
    header {
        padding: 0 12px;
    }
    
    .header-title {
        display: none;
    }
    
    .header-center {
        flex: 1;
        padding: 0 10px;
        max-width: none;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    #searchInput {
        padding: 10px 60px 10px 15px;
        font-size: 13px;
    }
    
    .search-info {
        right: 10px;
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .theme-toggle {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* 代码块移动端优化 */
    .code-block pre {
        font-size: 12px;
        padding: 40px 15px 15px;
    }
    
    .copy-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* 提示框和警告框移动端优化 */
    .tip,
    .warning {
        padding: 15px;
        padding-left: 20px;
    }
    
    .tip::before,
    .warning::before {
        font-size: 16px;
        top: -8px;
        left: -8px;
    }
}

/* 超小屏幕适配 - 手机竖屏 */
@media (max-width: 480px) {
    header {
        padding: 0 10px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .header-center {
        padding: 0 8px;
    }
    
    #searchInput {
        padding: 8px 50px 8px 12px;
        font-size: 12px;
    }
    
    .search-info {
        right: 8px;
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .theme-toggle {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .section h3 {
        font-size: 1.1rem;
        padding-left: 20px;
        margin: 25px 0 12px;
    }
    
    .section h4 {
        padding-left: 40px;
    }
    
    /* h3下的内容缩进调整 */
    .section h3 + p,
    .section h3 + .code-block,
    .section h3 + .img-container,
    .section h3 + .tip,
    .section h3 + .warning,
    .section h3 + ol,
    .section h3 + ul {
        margin-left: 20px;
    }
    
    .section h3 ~ p,
    .section h3 ~ .code-block,
    .section h3 ~ .img-container,
    .section h3 ~ ol,
    .section h3 ~ ul {
        margin-left: 20px;
    }
    
    .section ul,
    .section ol {
        margin-left: 20px;
    }
    
    /* 代码块超小屏幕优化 */
    .code-block {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .code-block pre {
        font-size: 11px;
        padding: 35px 12px 12px;
        line-height: 1.5;
    }
    
    .copy-btn {
        padding: 4px 8px;
        font-size: 10px;
        top: 6px;
        right: 6px;
    }
    
    /* 图片容器超小屏幕优化 */
    .img-container {
        margin: 15px 0;
    }
    
    .img-container img {
        border-radius: 8px;
    }
    
    /* 提示框和警告框超小屏幕优化 */
    .tip,
    .warning {
        padding: 12px;
        padding-left: 15px;
        margin: 15px 0;
        border-radius: 0 8px 8px 0;
    }
    
    .tip::before,
    .warning::before {
        font-size: 14px;
        top: -6px;
        left: -6px;
        padding: 3px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* 超小屏幕适配 - 320px */
@media (max-width: 320px) {
    header {
        padding: 0 6px;
    }
    
    .header-left {
        gap: 6px;
    }
    
    .menu-toggle {
        padding: 8px 10px;
        font-size: 16px;
    }
    
    .header-center {
        padding: 0 6px;
    }
    
    #searchInput {
        padding: 6px 40px 6px 10px;
        font-size: 11px;
    }
    
    .search-info {
        right: 6px;
        padding: 2px 5px;
        font-size: 9px;
    }
    
    .theme-toggle {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .section {
        padding: 12px;
    }
    
    .section h2 {
        font-size: 1.1rem;
    }
    
    .section h3 {
        font-size: 1rem;
        padding-left: 16px;
    }
    
    .code-block pre {
        font-size: 10px;
        padding: 30px 10px 10px;
    }
}

/* ========================================
   7. 快速入门页面样式
   ======================================== */

.main-content-full {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.quick-config {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.quick-config h2 {
    color: white;
    -webkit-text-fill-color: white;
    border: none;
    margin-bottom: 20px;
}

.config-box {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 12px;
    font-family: 'SF Mono', monospace;
    margin: 15px 0;
}

.config-box p {
    margin: 8px 0;
    text-indent: 0;
}

.copy-all-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.copy-all-btn:hover {
    transform: scale(1.05);
}

.step-card {
    background: var(--sidebar-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    margin-right: 15px;
}

.step-title {
    font-size: 1.3em;
    font-weight: bold;
    display: inline;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.tool-card h4 {
    margin: 0 0 15px 0;
    padding: 0;
}

.tool-card img {
    width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.video-link {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 0;
}

.video-link:hover {
    background: #c0392b;
}

@media (max-width: 768px) {
    .main-content-full {
        padding: 80px 15px 30px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 20px;
    }

    .step-title {
        font-size: 1.1em;
    }
}
