/* ============================================================
 * 悦互动官网 - 帮助文档详情页样式（紧凑版）
 * 文件: skin/css/pages/view_article_help.css
 * 悦多网络版权所有 © YueDuo Network. All Rights Reserved.
 * ------------------------------------------------------------
 * 布局：左侧目录 fixed 置顶悬浮跟随 + 右侧紧凑 Markdown 风格文档
 * 移动端：不显示文本目录，主栏占满
 * 悦多网络版权所有
 * ============================================================ */

/* 悦多网络版权所有 · 页面底色 */
body.help-page {
    background: #F5F7FA;
}

/* 悦多网络版权所有 · 整体布局（紧凑）；顶部边距=固定头部64px+留白，避免被导航遮盖 */
.help-wrap {
    max-width: 1220px;
    margin: 92px auto 48px;
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* ============================================================
 * 悦多网络版权所有 · 左侧目录：fixed 固定悬浮，滚动全程置顶可见
 * ============================================================ */
.help-sidebar {
    width: 240px;
    flex-shrink: 0;
}
/* 悦多网络版权所有 · 目录卡片 fixed：left 与内容区左缘对齐公式
   = max(页面padding, (视口宽-内容宽)/2+padding)，不遮挡正文 */
.help-toc-box {
    position: fixed;
    top: 92px; /* 悦多网络版权所有：与右侧文章卡片顶边平齐（同 .help-wrap 上边距） */
    left: 24px;
    left: max(24px, calc(50vw - 586px));
    width: 240px;
    z-index: 80;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
    background: #fff;
    border: 1px solid #E8EDF3;
    border-radius: 14px;
    padding: 14px 12px;
    box-shadow: 0 4px 18px -6px rgba(15, 23, 42, 0.06);
}
.help-toc-box::-webkit-scrollbar {
    width: 4px;
}
.help-toc-box::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
.help-toc-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #94A3B8;
    padding: 0 8px 9px;
    margin-bottom: 8px;
    border-bottom: 1px solid #F1F5F9;
}
.help-toc-title svg {
    width: 15px;
    height: 15px;
    color: #3B82F6;
}
.help-toc a {
    position: relative;
    display: block;
    font-size: 13.5px;
    color: #64748B;
    line-height: 1.5;
    padding: 6px 10px 6px 14px;
    margin: 1px 0;
    border-radius: 7px;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.help-toc a::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px;
    background: linear-gradient(180deg, #3B82F6, #8B5CF6);
    transform: translateY(-50%);
    transition: height 0.25s ease;
}
.help-toc a:hover {
    color: #2563EB;
    background: #F8FAFC;
}
.help-toc a.active {
    color: #1D4ED8;
    font-weight: 600;
    background: #EFF6FF;
}
.help-toc a.active::before {
    height: 14px;
}
.help-toc a.toc-sub {
    padding-left: 28px;
    font-size: 12.5px;
    color: #94A3B8;
}
.help-toc a.toc-sub::before {
    left: 17px;
}
.help-toc a.toc-sub:hover,
.help-toc a.toc-sub.active {
    color: #2563EB;
}
/* 悦多网络版权所有 · 正文无标题时隐藏目录，主栏占满 */
.help-wrap.no-toc .help-sidebar {
    display: none;
}

/* ============================================================
 * 悦多网络版权所有 · 文档主栏（紧凑）
 * ============================================================ */
.help-main {
    position: relative;
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #E8EDF3;
    border-radius: 18px;
    padding: 34px 38px 22px;
    box-shadow: 0 6px 24px -8px rgba(15, 23, 42, 0.07);
}

/* 悦多网络版权所有 · 文档头 */
.article-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #EEF2F7;
}
.article-tag {
    display: inline-block;
    padding: 3px 12px;
    font-size: 12px;
    color: #2563EB;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 999px;
    margin-bottom: 12px;
}
.article-title {
    font-size: 26px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
    margin: 0;
}

/* ============================================================
 * 悦多网络版权所有 · Markdown 风格正文排版（紧凑）
 * ============================================================ */
.help-content {
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
    word-break: break-word;
}
.help-content h2,
.help-content h3,
.help-content h4 {
    scroll-margin-top: 96px; /* 悦多网络版权所有：锚点跳转避让吸顶头部 */
}
.help-content h2 {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.45;
    margin: 34px 0 12px;
    padding: 0 0 9px 14px;
    border-bottom: 1px solid #EEF2F7;
}
.help-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 13px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3B82F6, #8B5CF6);
}
.help-content h2:first-child {
    margin-top: 0;
}
.help-content h3 {
    font-size: 16.5px;
    font-weight: 600;
    color: #1E293B;
    margin: 24px 0 9px;
}
.help-content h3::before {
    content: "#";
    color: #60A5FA;
    margin-right: 7px;
    font-weight: 700;
}
.help-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin: 20px 0 8px;
}
.help-content p {
    margin: 0 0 13px;
}
.help-content strong {
    color: #0F172A;
    font-weight: 600;
}
.help-content a {
    color: #2563EB;
    text-decoration: none;
    border-bottom: 1px dashed #93C5FD;
    transition: color 0.2s ease;
}
.help-content a:hover {
    color: #1D4ED8;
    border-bottom-style: solid;
}

/* 悦多网络版权所有 · 列表 */
.help-content ul,
.help-content ol {
    margin: 0 0 13px;
    padding-left: 24px;
}
.help-content li {
    margin: 5px 0;
}
.help-content ul li::marker {
    color: #3B82F6;
}

/* 悦多网络版权所有 · 引用块 */
.help-content blockquote {
    margin: 16px 0;
    padding: 12px 18px;
    background: #F8FAFF;
    border-left: 3px solid #93C5FD;
    border-radius: 0 10px 10px 0;
    color: #475569;
}
.help-content blockquote p:last-child {
    margin-bottom: 0;
}

/* 悦多网络版权所有 · 代码 */
.help-content code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    background: #F1F5F9;
    color: #DB2777;
    padding: 2px 7px;
    border-radius: 5px;
}
.help-content pre {
    margin: 16px 0;
    padding: 15px 18px;
    background: #0F172A;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15),
                0 10px 26px -12px rgba(15, 23, 42, 0.35);
}
.help-content pre code {
    background: none;
    color: #E2E8F0;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
}

/* 悦多网络版权所有 · 表格 */
.help-content table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 14px;
    overflow: hidden;
    border-radius: 10px;
}
.help-content th,
.help-content td {
    padding: 9px 14px;
    border: 1px solid #E2E8F0;
    text-align: left;
}
.help-content th {
    background: #F1F5F9;
    color: #1E293B;
    font-weight: 600;
}
.help-content tr:nth-child(even) td {
    background: #F8FAFC;
}

/* 悦多网络版权所有 · 分隔线 */
.help-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #CBD5E1, transparent);
    margin: 26px 0;
}

/* 悦多网络版权所有 · 正文图片：平铺展示，点击弹出灯箱 */
.help-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 12px;
    border: 1px solid #E8EDF3;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.14);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.help-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px -12px rgba(15, 23, 42, 0.22);
}

/* 悦多网络版权所有 · 上一篇/下一篇 */
.article-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #EEF2F7;
}
.article-nav a {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #E8EDF3;
    border-radius: 12px;
    text-decoration: none;
    background: #FBFCFE;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.article-nav a:hover {
    border-color: #93C5FD;
    box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.22);
    transform: translateY(-1px);
}
.article-nav .next {
    text-align: right;
}
.article-nav-label {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 3px;
}
.article-nav-title {
    font-size: 13.5px;
    color: #1E293B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.article-nav a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
 * 悦多网络版权所有 · 移动端：隐藏文本目录，主栏占满
 * ============================================================ */
@media (max-width: 768px) {
    .help-sidebar {
        display: none; /* 悦多网络版权所有：手机端不显示文本目录 */
    }
    .help-wrap {
        display: block;
        margin: 80px auto 36px; /* 悦多网络版权所有：避让64px固定头部 */
        padding: 0 12px;
    }
    .help-main {
        padding: 20px 16px 16px;
        border-radius: 14px;
    }
    .article-header {
        margin-bottom: 16px;
        padding-bottom: 13px;
    }
    .article-title {
        font-size: 19px;
    }
    .help-content {
        font-size: 14px;
        line-height: 1.85;
    }
    .help-content h2 {
        font-size: 17px;
        margin: 26px 0 10px;
        padding-bottom: 8px;
    }
    .help-content h3 {
        font-size: 15.5px;
        margin: 20px 0 8px;
    }
    .help-content h2,
    .help-content h3,
    .help-content h4 {
        scroll-margin-top: 76px; /* 悦多网络版权所有：移动端仅避让吸顶头部 */
    }
    .help-content img {
        margin: 14px auto;
        border-radius: 10px;
    }
    .help-content pre {
        padding: 12px 14px;
        border-radius: 10px;
    }
    .help-content blockquote {
        padding: 10px 14px;
    }
    .article-nav {
        flex-direction: column;
        gap: 8px;
        margin-top: 24px;
    }
    .article-nav .next {
        text-align: left;
    }
}

/* 悦多网络版权所有 */
