/* 全局样式 */
:root {
    --primary-color: #0066FF;
    --primary-hover: #0066FF;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --sidebar-width: 280px;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    background: var(--bg-light);
}

/* 容器布局 */
.docs-container {
    display: flex;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* 侧边栏样式 */
.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: max(calc(50% - 720px), 0px);
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 1.5rem 1.5rem calc(1.5rem + 1px);
    border-bottom: 1px solid #e5e7eb;
    height: 72px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.header-logo {
    width: 10rem;
    height: 10rem;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-nav {
    padding: 1.5rem 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
}

.nav-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: #f3f4f6;
}

.nav-link.active {
    color: var(--primary-color);
    background: #eff6ff;
    font-weight: 500;
}

/* 主要内容区 */
.docs-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
}

.content-header {
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem calc(1.5rem + 1px);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    z-index: 5;
    height: 72px;
    box-sizing: border-box;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.search-box {
    flex: 1;
    max-width: none;
}

.search-box input {
    width: 100%;
    max-width: 800px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Markdown 内容样式 */
.markdown-body {
    width: 100%;
    max-width: 800px;
}

.markdown-body h1 {
    font-size: 2rem;
    font-weight: 800;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.markdown-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.markdown-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.markdown-body p {
    margin: 1rem 0;
}

.markdown-body code {
    background: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: ui-monospace, monospace;
}

.markdown-body pre {
    background: #1e1e1e;
    color: #e1e1e1;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.markdown-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 响应式调整 */
@media (max-width: 1440px) {
    .docs-sidebar {
        left: 0;
    }
}

@media (max-width: 1024px) {
    .docs-content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .docs-sidebar.active {
        transform: translateX(0);
    }
    
    .docs-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .content-header {
        padding: 1rem;
        height: 64px;
        margin-bottom: 1.5rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-box input {
        padding: 0.625rem 1rem;
    }
    
    .sidebar-header {
        padding: 1rem;
        height: 64px;
    }
} 

/* Logo 居中样式 */
.docs-sidebar .sidebar-header {
    display: flex;
    justify-content: center;  /* 水平居中 */
    align-items: center;      /* 垂直居中 */
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.docs-sidebar .home-link {
    display: flex;
    justify-content: center;  /* 链接内部居中 */
    width: 100%;             /* 占满容器宽度 */
}

.docs-sidebar .header-logo {
    width: 10rem;             /* 调整logo大小 */
    height: auto;            /* 保持宽高比 */
    object-fit: contain;     /* 保持图片比例 */
} 