/* 帮助文档页面独立样式 */
.help-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #f8fafc !important;
    height: 100vh !important;
    overflow: hidden !important;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif !important;
}

.help-page * {
    box-sizing: border-box !important;
}

/* 重置所有可能冲突的样式 */
.help-page .container,
.help-page .wrapper,
.help-page .main-content,
.help-page .section-header,
.help-page .section-title,
.help-page .section-subtitle {
    all: unset !important;
}

.help-page h1,
.help-page h2,
.help-page h3,
.help-page h4,
.help-page h5,
.help-page h6 {
    margin: 0 !important;
    padding: 0 !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.help-page ul,
.help-page ol {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.help-page a {
    text-decoration: none !important;
    color: inherit !important;
}

.help-page button {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font: inherit !important;
    cursor: pointer !important;
}

.help-container {
    display: flex !important;
    height: 100vh !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
}

/* 左侧导航栏 */
.help-sidebar {
    width: 280px !important;
    background: #f1f5f9 !important;
    color: #374151 !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid #e5e7eb !important;
    transition: transform 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 100 !important;
    height: 100vh !important;
    min-height: 100vh !important;
}

.help-sidebar-header {
    padding: 0.8rem 1.25rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.help-sidebar-header h2 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.sidebar-toggle {
    background: none !important;
    border: none !important;
    color: #6b7280 !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    display: none !important;
}

.sidebar-toggle:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

/* 导航树 */
.help-nav {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1rem 0 !important;
}

.help-nav-tree {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.help-page .nav-item {
    margin: 0 !important;
}

.help-page .nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1.25rem !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
}

.help-page .nav-link:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.help-page .nav-link.active {
    background: #dbeafe !important;
    color: #295DFC !important;
    border-left-color: #295DFC !important;
}

.help-page .nav-link i {
    margin-right: 0.75rem !important;
    width: 16px !important;
    text-align: center !important;
    font-size: 0.9rem !important;
}

/* 父级导航链接样式 */
.help-page .nav-parent {
    position: relative !important;
}

.help-page .nav-arrow {
    position: absolute !important;
    right: 1rem !important;
    margin-right: 0 !important;
    transition: transform 0.3s ease !important;
    font-size: 0.8rem !important;
}

.help-page .nav-item.collapsed .nav-arrow {
    transform: rotate(-90deg) !important;
}

.help-page .nav-item.collapsed .nav-submenu {
    display: none !important;
}

.help-page .nav-submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f8fafc !important;
}

.help-page .nav-submenu .nav-link {
    padding-left: 3rem !important;
    font-size: 0.9rem !important;
    color: #6b7280 !important;
}

.help-page .nav-submenu .nav-link:hover {
    background: #e2e8f0 !important;
    color: #374151 !important;
}

.help-page .nav-submenu .nav-link.active {
    background: #bfdbfe !important;
    color: #295DFC !important;
}

/* 右侧内容区域 */
.help-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: calc(100% - 280px) !important;
    height: 100vh !important;
    min-height: 100vh !important;
}

.help-content-header {
    padding: 1rem 2rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f8fafc !important;
}

.back-to-home {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    background: #295DFC !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 10 !important;
    min-width: 100px !important;
    justify-content: center !important;
}

.back-to-home:hover {
    background: #1e40af !important;
    transform: translateX(-2px) !important;
}

.breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
}

.breadcrumb i {
    font-size: 0.75rem !important;
}

.breadcrumb-current {
    color: #1e293b !important;
    font-weight: 500 !important;
}

/* 内容主体 */
.help-content-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 2rem !important;
}

.help-section {
    display: none !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

.help-section.active {
    display: block !important;
}

.help-section h1 {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 1rem !important;
    border-bottom: 3px solid #295DFC !important;
    padding-bottom: 0.5rem !important;
}

.help-section h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 2rem 0 1rem 0 !important;
}

.help-section h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin: 1.5rem 0 0.75rem 0 !important;
}

.help-section p {
    line-height: 1.7 !important;
    color: #475569 !important;
    margin-bottom: 1rem !important;
}

.help-section ul, .help-section ol {
    margin: 1rem 0 !important;
    padding-left: 1.5rem !important;
    list-style: disc !important;
}

.help-section ol {
    list-style: decimal !important;
}

.help-section li {
    line-height: 1.6 !important;
    color: #475569 !important;
    margin-bottom: 0.5rem !important;
}

.help-section strong {
    color: #1e293b !important;
    font-weight: 600 !important;
}

/* 功能网格 */
.feature-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 2rem 0 !important;
}

.feature-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

.feature-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    border-color: #295DFC !important;
}

.feature-card i {
    font-size: 2rem !important;
    color: #295DFC !important;
    margin-bottom: 1rem !important;
}

.feature-card h3 {
    margin: 0 0 0.5rem 0 !important;
    color: #1e293b !important;
}

.feature-card p {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
}

/* 代码块 */
.code-block {
    background: #1e293b !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
    overflow-x: auto !important;
    position: relative !important;
}

.code-block pre {
    margin: 0 !important;
    color: #e2e8f0 !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.code-block code {
    color: #e2e8f0 !important;
}

/* 复制按钮 */
.copy-code-btn {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    padding: 0.5rem !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.8rem !important;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.copy-code-btn.copied {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}

/* 配置部分 */
.config-section {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
}

.config-section h3 {
    margin-top: 0 !important;
    color: #1e293b !important;
}

/* FAQ项目 */
.faq-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin: 1rem 0 !important;
}

.faq-item h3 {
    margin-top: 0 !important;
    color: #295DFC !important;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .help-sidebar {
        width: 250px !important;
    }
    
    .help-content {
        width: calc(100% - 250px) !important;
    }
    
    .help-content-header {
        padding: 1.25rem 1.5rem !important;
    }
    
    .help-content-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .help-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
    }
    
    .help-sidebar.open {
        transform: translateX(0) !important;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    .help-content {
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    .help-content-header {
        padding: 1rem !important;
    }
    
    .help-content-body {
        padding: 1rem !important;
    }
    
    .help-section h1 {
        font-size: 2rem !important;
    }
    
    .feature-grid {
        grid-template-columns: 1fr !important;
    }
    
    .breadcrumb {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .help-content-header {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: flex-start !important;
    }
    
    .help-section h1 {
        font-size: 1.75rem !important;
    }
    
    .help-section h2 {
        font-size: 1.25rem !important;
    }
}

/* 确保返回首页按钮始终可见 */
.help-page .back-to-home {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: #295DFC !important;
    color: #fff !important;
}

.help-page .back-to-home:hover {
    background: #1e40af !important;
    opacity: 1 !important;
    visibility: visible !important;
}
