:root {
    --primary: #1a73e8;
    --primary-hover: #1765cc;
    --primary-light: #e8f0fe;
    --text-main: #202124;
    --text-muted: #5f6368;
    --text-light: #70757a;
    --bg-main: #ffffff;
    --sidebar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-md: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --shadow-lg: 0 4px 4px 0 rgba(60, 64, 67, 0.3), 0 8px 12px 6px rgba(60, 64, 67, 0.15);
    --radius: 8px;
    --sidebar-width: 280px;
    --header-height: 64px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
}

/* 布局结构 */
.layout-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* 侧边栏 (Sidebar) 优化 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    padding: 1.5rem 0.75rem;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-section {
    margin-bottom: 0.25rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.section-header:hover {
    background: rgba(0, 0, 0, 0.04);
}

.chevron {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.chevron.down {
    transform: rotate(90deg);
}

.sidebar-menu {
    list-style: none;
    display: none;
    padding-left: 0.5rem;
}

.sidebar-menu.expanded {
    display: block;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    margin: 1px 0;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* 主内容区域 (Main Content) */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem 4rem;
    min-height: 100vh;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 章节头部样式 */
.section-header-content {
    margin-bottom: 2.5rem;
}

.section-header-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* 步骤引导 (Steps) */
.step-guide {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 2rem 0;
}

.step {
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    position: relative;
}

.step-number {
    position: absolute;
    left: -13px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.step-content h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.step-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.step-image {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.step-image img {
    width: 100%;
    display: block;
}

/* 核心性能亮点 */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* 按钮 */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-button:hover {
    background: var(--primary-hover);
}

/* 版本横幅 */
.version-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.version-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 0.75rem;
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* 提示框 (Tip Box) */
.tip-box {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
}

.tip-box h4 {
    color: #856404;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 搜索框 (Sidebar Search) */
.sidebar-search {
    padding: 0 0.5rem 1rem 0.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 0.6rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 手机端菜单按钮 */
.mobile-toggle-btn {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 960px) {
    .mobile-toggle-btn {
        display: flex;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    .sidebar.mobile-active {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
    }
    .main-content {
        margin-left: 0;
        padding: 2rem 1.25rem;
    }
    .section-header-content h1 {
        font-size: 1.75rem;
    }
}
