/* 现代化文档中心样式 */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* 重置和基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

/* 文档布局 */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 72px);
    background-color: var(--bg-secondary);
}

/* 左侧导航栏 */
.docs-sidebar {
    width: 280px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 72px;
    left: 0;
    height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.docs-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.docs-logo h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-logo i {
    color: var(--primary-color);
    font-size: 20px;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background-color: var(--bg-secondary);
    transition: all 0.2s ease;
}

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

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* 导航菜单 */
.sidebar-nav {
    padding: 16px 0;
}

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

.nav-section {
    margin-bottom: 8px;
}

/* 分类切换按钮样式 */
.category-toggle,
.sub-category-toggle {
    margin: 0;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    user-select: none;
}

.category-toggle:hover,
.sub-category-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.category-toggle.active,
.sub-category-toggle.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.category-toggle .toggle-icon,
.sub-category-toggle .toggle-icon {
    transition: transform 0.2s ease;
    font-size: 12px;
    margin-left: auto;
}

.category-toggle.active .toggle-icon,
.sub-category-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* 子分类样式 */
.sub-category {
    border-left: 2px solid var(--border-light);
    margin-left: 20px;
}

.sub-category-toggle {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}

.sub-submenu {
    margin-left: 16px;
}

.nav-section h4 {
    margin: 0 0 12px 0;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section i {
    color: var(--primary-color);
    font-size: 16px;
}

.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-submenu li {
    margin: 0;
}

.nav-submenu a {
    display: block;
    padding: 8px 20px 8px 44px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-submenu a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-left-color: var(--border-color);
}

.nav-submenu a.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    border-left-color: var(--primary-color);
}

.nav-submenu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

/* 子分类文档链接样式 */
.sub-submenu a {
    padding-left: 60px;
    font-size: 13px;
}

/* 主内容区 */
.docs-main {
    flex: 1;
    margin-left: 20px;
    background-color: var(--bg-secondary);
    min-height: calc(100vh - 72px);
}

/* 顶部导航栏 */
.docs-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    list-style: none;
}

.breadcrumb-item {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin: 0 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.header-actions button {
    display: none;
}

/* 文档内容 */
.docs-content {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero 区域 */
.hero-section {
    text-align: center;
    padding: 48px 0 64px 0;
    margin-bottom: 48px;
}

.docs-main-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.docs-main-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quick-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-actions .btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* 区域标题 */
.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 24px 0;
}

/* 热门文档网格 */
.popular-docs {
    margin-bottom: 64px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.doc-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.doc-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.doc-icon i {
    color: var(--primary-color);
    font-size: 24px;
}

.doc-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.doc-card p {
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    flex: 1;
    line-height: 1.5;
}

.doc-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.doc-link:hover {
    color: var(--primary-hover);
}

.doc-link i {
    transition: transform 0.2s ease;
}

.doc-link:hover i {
    transform: translateX(2px);
}

/* 最新更新 */
.recent-updates {
    margin-bottom: 48px;
}

.update-list {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.update-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.update-item:last-child {
    border-bottom: none;
}

.update-date {
    flex-shrink: 0;
    width: 100px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.update-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.update-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.update-content h4 a:hover {
    color: var(--primary-color);
}

.update-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .docs-sidebar {
        transform: translateX(-100%);
    }
    
    .docs-sidebar.collapsed {
        transform: translateX(0);
    }
    
    .docs-main {
        margin-left: 0;
    }
    
    .header-actions button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .docs-layout {
        min-height: calc(100vh - 64px);
    }
    
    .docs-sidebar {
        top: 64px;
        height: calc(100vh - 64px);
    }
    
    .docs-main {
        min-height: calc(100vh - 64px);
    }
    
    .docs-content {
        padding: 24px 16px;
    }
    
    .docs-main-title {
        font-size: 36px;
    }
    
    .docs-main-subtitle {
        font-size: 18px;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .update-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .update-date {
        width: auto;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* 移动端侧边栏调整 */
    .category-toggle,
    .sub-category-toggle {
        padding: 10px 16px;
    }
    
    .nav-submenu a {
        padding: 6px 16px 6px 32px;
    }
    
    .sub-submenu a {
        padding-left: 48px;
    }
}

@media (max-width: 480px) {
    .docs-header {
        padding: 12px 16px;
    }
    
    .docs-content {
        padding: 16px 12px;
    }
    
    .hero-section {
        padding: 32px 0 48px 0;
    }
    
    .docs-main-title {
        font-size: 28px;
    }
    
    .docs-main-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .doc-card {
        padding: 20px;
    }
}

/* 滚动条样式 */
.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-card {
    animation: fadeIn 0.5s ease forwards;
}

.doc-card:nth-child(1) { animation-delay: 0.1s; }
.doc-card:nth-child(2) { animation-delay: 0.2s; }
.doc-card:nth-child(3) { animation-delay: 0.3s; }
.doc-card:nth-child(4) { animation-delay: 0.4s; }
.doc-card:nth-child(5) { animation-delay: 0.5s; }
.doc-card:nth-child(6) { animation-delay: 0.6s; }

/* 展开动画 */
.nav-submenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.nav-submenu[style*="display: none"] {
    max-height: 0;
    opacity: 0;
}

.nav-submenu[style*="display: block"] {
    max-height: 1000px;
    opacity: 1;
}

/* 文档中心样式 */
.docs-container {
    min-height: 80vh;
    background-color: #f8f9fa;
}

/* 侧边栏样式 */
.docs-sidebar {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.docs-sidebar .nav-link {
    color: #495057;
    padding: 8px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.docs-sidebar .nav-link:hover {
    color: #007bff;
    background-color: #f1f8ff;
    padding-left: 5px;
}

.docs-sidebar .nav-link.active {
    color: #007bff;
    font-weight: 600;
    background-color: #e7f3ff;
    padding-left: 10px;
}

/* 内容区样式 */
.docs-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.docs-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.docs-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 30px;
}

/* 文档详情页样式 */
.doc-meta {
    color: #6c757d;
    margin-bottom: 20px;
}

.doc-meta span {
    margin-right: 15px;
}

.doc-meta i {
    margin-right: 5px;
}

.doc-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.doc-content h1, 
.doc-content h2, 
.doc-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.doc-content p {
    margin-bottom: 1em;
}

.doc-content pre {
    background-color: #f5f7f9;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 1.5em;
    overflow-x: auto;
}

.doc-content code {
    background-color: #eef2f7;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.doc-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.doc-tags .badge {
    font-size: 0.9rem;
    padding: 6px 12px;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .docs-sidebar {
        margin-bottom: 20px;
        position: static;
    }
    
    .docs-content {
        padding: 15px;
    }
} 
 