* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1a2c3e;
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* 自定义滚动条 - 轻量优雅 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 全局过渡辅助 */
a,
button {
    transition: all 0.2s ease;
}

a {
    text-decoration: none;
}

/* 容器实用类 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 40px;
    padding: 12px 28px;
    font-size: 1rem;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    background: #1e4f8a;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #0f3b66;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -12px rgba(30, 79, 138, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: #cbd5e1;
    color: #1e4f8a;
}

.btn-outline:hover {
    border-color: #1e4f8a;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e2f3e;
}

.btn-secondary:hover {
    background: #ffffff;
    border-color: #b9c8e8;
    box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.1);
}

/* 卡片通用样式 */
.feature-card {
    background: white;
    border-radius: 28px;
    padding: 1.8rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eff3f8;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #dce5f0;
    box-shadow: 0 24px 36px -12px rgba(0, 0, 0, 0.12);
}

/* 动画淡入上浮 (滚动触发) */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

.section {
    opacity: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .feature-card {
        padding: 1.4rem;
    }

    h1 {
        font-size: 2.2rem !important;
        letter-spacing: -0.02em;
    }
}

/* 导航栏响应式 */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 640px) {
    .nav-links {
        gap: 1.2rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .navbar .container {
        flex-direction: column;
        text-align: center;
    }
}

.nav-link.active {
    background: #eef2ff;
    padding: 6px 14px;
    border-radius: 40px;
}

/* 辅助 */
.badge {
    background: #eef4ff;
    color: #1e4f8a;
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.screenshot-float {
    transform: translateY(-8px) translateX(4px);
    box-shadow: 20px 20px 30px -10px rgba(0, 0, 0, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.5);
}


.version-history-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e4f8a;
    margin: 0 auto;
}

/* 版本历史表格 —— 融入沉稳风格 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

table thead tr {
    background: #f0f6fd;
    /* 浅蓝灰，与模板badge背景呼应 */
}

table th,
table td {
    border: 1px solid #e2e8f0;
    /* 更柔和的边框色 */
    padding: 12px 16px;
    vertical-align: top;
    text-align: left;
}

table th {
    font-weight: 600;
    color: #1e4f8a;
    background-color: #f0f6fd;
}

table td {
    background-color: #ffffff;
}

ul,
ol {
    margin: 0 0 0 1.2rem;
    padding-left: 0;
}

table li {
    margin-bottom: 6px;
    line-height: 1.45;
}

/* 可选：为不同版本系列添加分隔（非表格，只是视觉） */
.version-series-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e4f8a;
    margin: 2rem 0 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid #1e4f8a;
}

/* 文档侧边栏 */
.doc-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid #eff3f8;
    padding: 1.2rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    align-self: start;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 1.2rem 0.8rem;
    border-bottom: 1px solid #eef2f8;
    margin-bottom: 0.8rem;
    color: #1e4f8a;
}

/* 树形菜单基础样式 */
.tree,
.tree ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.tree li {
    margin: 0;
    padding: 0;
}

/* 文件夹/分类行 */
.folder-toggle {
    display: block;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
    user-select: none;
}

.folder-toggle:hover {
    background: #f0f6fd;
}

/* 子菜单项 */
.tree ul {
    padding-left: 1.8rem;
}

.tree ul li a {
    display: block;
    padding: 0.4rem 1.2rem 0.4rem 1rem;
    color: #4a627a;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.tree ul li a:hover {
    color: #1e4f8a;
    background: #f0f6fd;
}

/* 折叠/展开箭头（使用伪元素） */
.folder-toggle::before {
    content: "▶";
    display: inline-block;
    font-size: 0.7rem;
    margin-right: 8px;
    transition: transform 0.2s;
    color: #7b9ec0;
}

.folder-toggle.open::before {
    transform: rotate(90deg);
}

/* 右侧内容区样式 */
.doc-content {
    flex: 1;
    min-width: 0;
    /* 防止溢出 */
}

.doc-section {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid #eff3f8;
    padding: 1.8rem;
    margin-bottom: 2rem;
    scroll-margin-top: 80px;
    /* 锚点偏移避免被固定导航挡住 */
}

.doc-section h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1e3b5c;
    border-left: 4px solid #1e4f8a;
    padding-left: 1rem;
}

.doc-section h3 {
    font-size: 1.2rem;
    margin: 1.2rem 0 0.6rem;
    color: #2c5f8a;
}

/* 移动端响应式：侧边栏折叠为抽屉菜单 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .doc-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 1.5rem;
    }

    /* 可再添加一个汉堡按钮来控制侧边栏显示隐藏，这里简化处理，始终显示 */
}

.tree ul li a.active {
    background: #eef4ff;
    color: #1e4f8a;
    font-weight: 500;
}