/* ========================================
   帮助文档页面样式
   ======================================== */

/* 使用主题颜色变量 */
:root {
    --help-primary: #FF6A00;
    --help-primary-dark: #E65F00;
    --help-primary-light: #FF8533;
    --help-bg-light: #fff5f0;
}

/* 页面容器 */
.help-documentation-page {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.help-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   页面标题区域
   ======================================== */
.help-header {
    text-align: center;
    margin-bottom: 40px;
}

.help-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, var(--help-primary) 0%, var(--help-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.help-subtitle {
    font-size: 16px;
    color: #595959;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   搜索框区域
   ======================================== */
.help-search-section {
    margin-bottom: 40px;
}

.help-search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.help-search-box:focus-within {
    box-shadow: 0 6px 24px rgba(255, 106, 0, 0.15);
    transform: translateY(-2px);
}

.help-search-box svg {
    flex-shrink: 0;
    color: #8c8c8c;
    margin-right: 12px;
}

.help-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1a1a1a;
    background: transparent;
}

.help-search-input::placeholder {
    color: #bfbfbf;
}

/* ========================================
   内容区域布局
   ======================================== */
.help-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ========================================
   侧边栏导航
   ======================================== */
.help-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-nav {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.help-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.help-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.help-nav-item:hover {
    background: var(--help-bg-light);
}

.help-nav-item.active {
    background: linear-gradient(135deg, var(--help-primary) 0%, var(--help-primary-light) 100%);
    color: #ffffff;
}

.help-nav-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.help-nav-item span {
    font-size: 14px;
    font-weight: 500;
}

/* 联系支持卡片 */
.help-contact-card {
    background: linear-gradient(135deg, var(--help-primary) 0%, var(--help-primary-light) 100%);
    border-radius: 12px;
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 106, 0, 0.2);
}

.help-contact-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.help-contact-card p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    opacity: 0.95;
}

.btn-contact-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #ffffff;
    color: var(--help-primary);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-contact-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-contact-support svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   主要内容区域
   ======================================== */
.help-main-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: 600px;
}

.help-section {
    display: none;
}

.help-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--help-primary);
    display: inline-block;
}

/* ========================================
   文章样式
   ======================================== */
.help-article {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
}

.help-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--help-primary) 0%, var(--help-primary-light) 100%);
    border-radius: 2px;
}

.article-content {
    font-size: 15px;
    color: #595959;
    line-height: 1.8;
}

.article-content p {
    margin: 0 0 16px 0;
}

.article-content ul,
.article-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.article-content li:last-child {
    margin-bottom: 0;
}

.article-content strong {
    color: #1a1a1a;
    font-weight: 600;
}

.article-content code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--help-primary);
}

/* ========================================
   FAQ 样式
   ======================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
}

.faq-question svg {
    flex-shrink: 0;
    color: #8c8c8c;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--help-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px 24px;
    margin: 0;
    font-size: 14px;
    color: #595959;
    line-height: 1.8;
}

/* ========================================
   搜索结果高亮
   ======================================== */
.search-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #8c8c8c;
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.no-results p {
    font-size: 14px;
    margin: 0;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .help-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .help-sidebar {
        position: static;
        order: -1;
    }
    
    .help-nav {
        padding: 20px;
    }
    
    .help-nav-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .help-contact-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .help-documentation-page {
        padding: 20px 0;
    }
    
    .help-header {
        margin-bottom: 30px;
    }
    
    .help-title {
        font-size: 32px;
    }
    
    .help-subtitle {
        font-size: 14px;
    }
    
    .help-search-section {
        margin-bottom: 30px;
    }
    
    .help-search-box {
        padding: 12px 16px;
    }
    
    .help-main-content {
        padding: 24px 20px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .article-content {
        font-size: 14px;
    }
    
    .help-nav-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .help-title {
        font-size: 28px;
    }
    
    .help-main-content {
        padding: 20px 16px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .article-title {
        font-size: 16px;
    }
    
    .faq-question {
        padding: 16px 20px;
    }
    
    .faq-question h3 {
        font-size: 15px;
    }
}

/* ========================================
   打印样式
   ======================================== */
@media print {
    .help-sidebar,
    .help-search-section,
    .help-header {
        display: none;
    }
    
    .help-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .help-section {
        display: block !important;
        page-break-after: always;
    }
    
    .help-main-content {
        box-shadow: none;
        padding: 0;
    }
}
