/* 文档页面专用样式 */

/* 文档容器布局 */
.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 80px auto 0;
    min-height: calc(100vh - 80px);
}

/* 侧边栏导航 */
.docs-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    background: var(--light-gray);
    padding: 30px 20px;
    border-right: 1px solid #e0e0e0;
}

.docs-nav h3 {
    color: var(--dark-blue);
    margin-bottom: 20px;
    font-size: 18px;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav ul li {
    margin-bottom: 10px;
}

.docs-nav ul li a {
    display: block;
    padding: 8px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.docs-nav ul li a:hover,
.docs-nav ul li a.active {
    background: var(--primary-blue);
    color: white;
}

/* 主文档内容 */
.docs-main {
    padding: 40px 60px;
    background: white;
}

.docs-article {
    max-width: 900px;
}

.docs-section {
    margin-bottom: 60px;
}

.docs-section h1 {
    font-size: 36px;
    color: var(--dark-blue);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-blue);
}

.docs-section h2 {
    font-size: 28px;
    color: var(--dark-blue);
    margin-top: 40px;
    margin-bottom: 20px;
}

.docs-section h3 {
    font-size: 22px;
    color: var(--dark-blue);
    margin-top: 30px;
    margin-bottom: 15px;
}

.docs-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.docs-section p.lead {
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.docs-section ul,
.docs-section ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.docs-section li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 10px;
}

/* 代码块 */
.docs-section code {
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: var(--primary-blue);
}

.code-block {
    background: var(--text-dark);
    color: #52C41A;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    margin: 20px 0;
    overflow-x: auto;
    line-height: 1.6;
}

/* 信息框 */
.info-box,
.warning-box,
.success-box {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.info-box {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.warning-box {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.success-box {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

/* 表格 */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.docs-table thead {
    background: var(--primary-blue);
    color: white;
}

.docs-table th,
.docs-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.docs-table tbody tr:nth-child(even) {
    background: var(--light-gray);
}

.docs-table tbody tr:hover {
    background: var(--light-blue);
}

/* FAQ项目 */
.faq-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.faq-item h3,
.faq-item h4 {
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.faq-item p {
    margin-bottom: 0;
}

/* 列表样式优化 */
.docs-section ul ul {
    margin-top: 10px;
}

.docs-section h3 + p {
    margin-top: 15px;
}

.docs-section h3 + ol,
.docs-section h3 + ul {
    margin-top: 15px;
}

/* 底部导航 */
.docs-footer-nav {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid var(--light-gray);
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .docs-container {
        grid-template-columns: 240px 1fr;
    }
    
    .docs-main {
        padding: 30px 40px;
    }
}

@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
        margin-top: 70px;
    }
    
    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .docs-main {
        padding: 30px 20px;
    }
    
    .docs-section h1 {
        font-size: 28px;
    }
    
    .docs-section h2 {
        font-size: 24px;
    }
    
    .docs-section h3 {
        font-size: 20px;
    }
}

