/* 文档页面现代化 UI 样式 - 2026 全新设计 */

/* CSS 变量定义 */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
/* 平滑过渡 */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 顶部导航栏选中效果 - 使用最高优先级覆盖 opener.css */
body .header .nav ul.nav-pills li a.active,
.header .nav .nav-pills > li > a.active {
    color: #ffffff !important;
    background-color: #428BCA !important;
    border-radius: 5px;
}

/* 文档容器 */
.docs-container {
    min-height: calc(100vh - 70px);
    background: var(--bg-secondary);
    padding: 0;
}

/* 面包屑导航 - 现代化设计 */
.docs-breadcrumb {
    background: var(--primary-gradient);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.docs-breadcrumb .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-breadcrumb .breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.docs-breadcrumb .breadcrumb a:hover {
    color: #ffffff;
}

.docs-breadcrumb .breadcrumb .active {
    color: #ffffff;
    font-weight: 500;
}

.docs-breadcrumb .breadcrumb li + li::before {
    content: "/";
    color: rgba(255, 255, 255, 0.6);
    padding-right: 0.5rem;
}

/* 主内容区 */
.docs-main {
    padding: 2rem 0;
}

.docs-main .w {
    overflow: visible;
}

/* 侧边栏 - 悬浮卡片设计 */
.docs-sidebar {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.sidebar-wrapper {
    padding: 1.5rem;
}

.sidebar-wrapper h5 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.primary-color {
    color: var(--primary-color) !important;
}

/* 导航菜单 - 现代化设计 */
.docs-nav .menu-item {
    margin-bottom: 0.5rem;
}

.docs-nav .menu-link,
.docs-nav .menu-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.docs-nav .menu-link i,
.docs-nav .menu-title i {
    font-size: 0.875rem;
    width: 16px;
}

.docs-nav .menu-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateX(4px);
}

.docs-nav .menu-title:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.docs-nav .menu-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

/* 子菜单 - 默认展开 */
.docs-nav .submenu {
    margin-left: 10px;
}

.docs-nav .menu-title {
    position: relative;
}

.docs-nav .menu-title::after {
    content: '˅';
    position: absolute;
    right: 1rem;
    font-size: 1.2rem;
}

/* 内容区域 - 卡片设计 */
.docs-content {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.content-wrapper {
    padding: 2rem;
}

/* 文档标题 */
.content-wrapper h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* 文档内容 */
.doc-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 14px;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.doc-content h1 { font-size: 24px; }
.doc-content h2 { font-size: 20px; }
.doc-content h3 { font-size: 17px; }
.doc-content h4 { font-size: 15px; }

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

/* 代码块样式 */
.doc-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.doc-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.doc-content p code {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.doc-content pre code {
    color: var(--text-primary);
    background: transparent;
    padding: 0;
}

/* 表格样式 */
.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.doc-content th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

.doc-content td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.doc-content tr:hover {
    background: var(--bg-tertiary);
}

/* 列表样式 */
.doc-content ul,
.doc-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.doc-content li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.doc-content ul li::marker {
    color: var(--primary-color);
}

/* 空状态 */
.loading {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.loading h3 {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .docs-breadcrumb {
        padding: 0.75rem 0;
    }
    
    .docs-main {
        padding: 1rem 0;
    }
    
    .docs-sidebar {
        margin-bottom: 1rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .content-wrapper h1 {
        font-size: 1.5rem;
    }
}

/* 打印样式 */
@media print {
    .docs-breadcrumb,
    .docs-sidebar {
        display: none;
    }
    
    .docs-content {
        box-shadow: none;
    }
}

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

.docs-content {
    animation: fadeIn 0.5s ease-out;
}

/* 页脚 - 与首页保持一致 */
.modern-footer {
    background: #1a1a2e;
    color: white;
    padding: 30px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom p {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}
