/* 帮助文档 - 左大类目、右小类目，PC 端字号加大 */

:root {
    --help-primary: #11D6BB;
    --help-text: #333;
    --help-text-light: #666;
    --help-border: #e8e8e8;
}

/* 帮助页导航栏搜索 - 仅 PC 端显示 */
.nav-help-search {
    position: relative;
    margin-left: 16px;
}

.nav-help-search-results {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 320px;
    max-width: 420px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1001;
}

.nav-help-search-results.show {
    display: block;
}

.nav-help-search-results-item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--help-text);
    text-decoration: none;
    text-align: left;
    border-bottom: 1px solid var(--help-border);
    cursor: pointer;
    transition: background 0.15s;
}

.nav-help-search-results-item:last-child {
    border-bottom: none;
}

.nav-help-search-results-item:hover {
    background: rgba(17, 214, 187, 0.08);
}

.nav-help-search-results-item-title {
    font-weight: 600;
    color: var(--help-text);
    margin-bottom: 4px;
}

.nav-help-search-results-item-snippet {
    font-size: 13px;
    color: var(--help-text-light);
    line-height: 1.5;
}

.nav-help-search-results-empty {
    padding: 20px 16px;
    font-size: 14px;
    color: var(--help-text-light);
    text-align: center;
}

.help-search-highlight {
    background: rgba(17, 214, 187, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.nav-help-search input {
    width: 180px;
    padding: 8px 12px 8px 32px;
    font-size: 14px;
    border: 1px solid var(--help-border);
    border-radius: 6px;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}

.nav-help-search input:focus {
    outline: none;
    border-color: var(--help-primary);
    background-color: #fff;
}

.nav-help-search input::placeholder {
    color: #999;
}

@media (max-width: 767px) {
    .nav-help-search {
        display: none;
    }
}

.help-page {
    display: flex;
    margin-top: var(--header-height, 70px);
    min-height: calc(100vh - var(--header-height, 70px));
}

/* 左侧大类目 - 固定，底部留白 */
.help-sidebar {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--help-border);
    position: sticky;
    top: var(--header-height, 70px);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-height, 70px));
    overflow-y: auto;
    z-index: 10;
    transition: transform 0.3s ease;
    padding-bottom: 24px;
}

.help-sidebar-search {
    position: relative;
    padding: 14px;
    border-bottom: 1px solid var(--help-border);
}

.help-sidebar-search-results {
    display: none;
    padding: 0 14px 14px;
    max-height: 50vh;
    overflow-y: auto;
}

.help-sidebar-search-results.show {
    display: block;
}

.help-sidebar-search-results-item {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--help-text);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.help-sidebar-search-results-item:hover {
    background: rgba(17, 214, 187, 0.08);
}

.help-sidebar-search-results-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.help-sidebar-search-results-item-snippet {
    font-size: 12px;
    color: var(--help-text-light);
    line-height: 1.4;
}

.help-sidebar-search-results-empty {
    padding: 16px 0;
    font-size: 13px;
    color: var(--help-text-light);
    text-align: center;
}

@media (min-width: 769px) {
    .help-sidebar-search-results {
        display: none !important;
    }
}

.help-sidebar-search input {
    width: 100%;
    padding: 10px 12px 10px 32px;
    font-size: 15px;
    border: 1px solid var(--help-border);
    border-radius: 4px;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}

.help-sidebar-search input:focus {
    outline: none;
    border-color: var(--help-primary);
    background-color: #fff;
}

.help-nav {
    padding: 12px 0 20px;
}

.help-nav-item {
    display: block;
    padding: 10px 16px;
    color: var(--help-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.help-nav-item:hover,
.help-nav-item.active {
    color: var(--help-primary);
}

.help-nav-item.active {
    background: rgba(17, 214, 187, 0.08);
}

/* 中间内容 - 铺满剩余空间 */
.help-main {
    flex: 1;
    padding: 48px 56px 80px;
    min-width: 0;
    background: #fff;
}

.help-page.help-toc-empty .help-main {
    padding-left: 72px;
    padding-right: 72px;
}

.help-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--help-text);
    margin-bottom: 32px;
    line-height: 1.4;
}

.help-title.help-title-intro {
    font-size: 32px;
    text-align: center;
    margin-bottom: 48px;
}

/* 内容区块 - 默认只显示选中项 */
.help-main .help-anchor { display: none; }
.help-main .section .help-anchor { display: block; }
.help-main .section { display: none; }
.help-main .help-anchor#intro { display: block; }
.help-main .help-anchor#intro + .section { display: block; }

.help-main .section {
    padding: 0 0 56px;
    margin-bottom: 56px;
    border-bottom: 1px solid var(--help-border);
}

.help-main .section:last-of-type {
    border-bottom: none;
}

.help-main .section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--help-text);
    margin-bottom: 32px;
    line-height: 1.4;
}

.help-main .section-title .icon {
    display: none;
}

.help-main .subsection-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--help-text);
    margin: 40px 0 20px;
    padding-left: 16px;
    border-left: 4px solid var(--help-primary);
    scroll-margin-top: 100px;
}

.help-main .subsection-title:first-of-type {
    margin-top: 0;
}

.help-main .subsubsection-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--help-text);
    margin: 28px 0 16px;
}

.help-main .section p {
    margin-bottom: 20px;
    color: var(--help-text-light);
    line-height: 2;
    font-size: 17px;
}

.help-main .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0;
}

@media (max-width: 900px) {
    .help-main .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .help-main .feature-grid .feature-card:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .help-main .feature-grid {
        grid-template-columns: 1fr;
    }
}

.help-main .feature-card {
    padding: 24px 20px;
    background: #fafbfc;
    border-radius: 8px;
    border-left: 4px solid var(--help-primary);
    transition: box-shadow 0.2s, background 0.2s;
}

.help-main .feature-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.help-main .feature-card .icon {
    display: none;
}

.help-main .feature-card h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--help-text);
}

.help-main .feature-card p {
    font-size: 15px;
    margin: 0;
    line-height: 1.75;
    color: var(--help-text-light);
}

@media (min-width: 769px) {
    .help-main .feature-grid .feature-card:nth-child(5) {
        grid-column: 2;
    }
}

.help-main .step-list {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.help-main .step-list li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.8;
}

.help-main .step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    background: var(--help-primary);
    color: white;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-main .section table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
}

.help-main .section th {
    background: #fafafa;
    padding: 18px 24px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--help-border);
}

.help-main .section td {
    padding: 18px 24px;
    border: 1px solid var(--help-border);
    color: var(--help-text-light);
    line-height: 1.7;
}

.help-main .tip-box {
    background: #f6f8fa;
    border-left: 4px solid var(--help-primary);
    padding: 24px 28px;
    margin: 28px 0;
}

.help-main .tip-box.warning {
    border-left-color: #faad14;
}

.help-main .tip-box.success {
    border-left-color: #52c41a;
}

.help-main .tip-box h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
}

.help-main .tip-box p,
.help-main .tip-box li {
    font-size: 15px;
    line-height: 1.9;
}

.help-main .tip-box ul {
    margin: 12px 0 0;
    padding-left: 24px;
}

.help-main .section blockquote {
    background: #fafafa;
    border-left: 4px solid var(--help-border);
    padding: 24px 28px;
    margin: 28px 0;
    color: var(--help-text-light);
    font-size: 16px;
    line-height: 1.9;
}

.help-main .faq-item {
    border: 1px solid var(--help-border);
    margin-bottom: 20px;
}

.help-main .faq-question {
    padding: 20px 28px;
    background: #fafafa;
    font-weight: 500;
    font-size: 16px;
}

.help-main .faq-answer {
    padding: 24px 28px;
    font-size: 16px;
    line-height: 1.9;
}

.help-main .faq-answer p {
    margin-bottom: 16px;
}

.help-main .faq-answer ul,
.help-main .faq-answer ol {
    margin: 12px 0 16px;
    padding-left: 24px;
}

.help-main .faq-answer li {
    margin-bottom: 8px;
}

.help-main .help-channel-wrap {
    margin: 24px 0;
}

.help-main .help-channel-wrap .contact-grid {
    margin-bottom: 24px;
}

.help-main .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 28px 0;
}

@media (max-width: 600px) {
    .help-main .contact-grid {
        grid-template-columns: 1fr;
    }
}

.help-main .contact-card {
    padding: 24px 20px;
    background: #fafbfc;
    border-radius: 8px;
    border-left: 4px solid var(--help-primary);
    text-align: left;
    transition: box-shadow 0.2s, background 0.2s;
}

.help-main .contact-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.help-main .contact-card .icon {
    display: none;
}

.help-main .contact-card h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--help-text);
}

.help-main .contact-card p {
    font-size: 15px;
    margin: 0;
    line-height: 1.75;
    color: var(--help-text-light);
}

.help-main .service-category {
    margin: 28px 0;
}

.help-main .service-category h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
}

.help-main .service-category ul {
    margin: 12px 0 0;
    padding-left: 24px;
}

.help-main .service-category li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.help-main .qr-section {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 32px 0;
    padding: 28px;
    background: #fafbfc;
    border-radius: 8px;
}

.help-main .qr-item {
    text-align: center;
    padding: 20px 24px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--help-border);
    min-width: 160px;
}

.help-main .qr-item img {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
}

.help-main .qr-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.help-main .qr-item p {
    font-size: 14px;
    color: var(--help-text-light);
    margin: 0;
}

.help-main .image-container {
    text-align: center;
    margin: 32px 0;
    padding: 24px;
    background: #fafafa;
}

.help-main .badge-success { background: #f6ffed; color: #389e0d; }
.help-main .badge-danger { background: #fff2f0; color: #cf1322; }

.help-main .highlight {
    background: #fffbe6;
    padding: 0 2px;
}

.help-main .section ul,
.help-main .section ol {
    font-size: 17px;
    margin: 16px 0;
    padding-left: 24px;
    line-height: 2;
    list-style: disc;
}

.help-main .section ul li,
.help-main .section ol li {
    margin-bottom: 8px;
}

.help-main .section ol {
    padding-left: 28px;
    list-style: decimal;
}

.help-main .section ol.step-list {
    list-style: none;
    padding-left: 0;
}

.help-search-hidden {
    display: none !important;
}

/* 上一篇/下一篇 分页 */
.help-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--help-border);
}

@media (max-width: 768px) {
    .help-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .help-pagination-prev,
    .help-pagination-next {
        text-align: center;
    }
}

.help-pagination-prev,
.help-pagination-next {
    color: var(--help-primary);
    font-size: 16px;
    cursor: pointer;
}

.help-pagination-prev:hover,
.help-pagination-next:hover {
    text-decoration: underline;
}

.help-anchor {
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}

/* 右侧小类目 - 悬挂式，仅在有子章节时显示 */
.help-toc {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid var(--help-border);
    padding: 18px 0;
    position: sticky;
    top: var(--header-height, 70px);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-height, 70px));
    overflow-y: auto;
}

.help-toc.help-toc-empty {
    display: none;
}

.help-toc-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--help-text);
    padding: 0 18px 14px;
    border-bottom: 1px solid var(--help-border);
}

.help-toc-nav {
    padding: 14px 0;
}

.help-toc-nav a {
    display: block;
    padding: 10px 18px;
    font-size: 15px;
    color: var(--help-text-light);
    text-decoration: none;
    line-height: 1.6;
}

.help-toc-nav a:hover {
    color: var(--help-primary);
}

.help-toc-nav a.active {
    color: var(--help-primary);
    background: rgba(17, 214, 187, 0.08);
}

/* 悬浮菜单 - 仅移动端显示，PC 端隐藏 */
.help-menu-fab {
    display: none;
    position: fixed;
    bottom: 56px;
    right: 20px;
    padding: 12px 18px;
    gap: 8px;
    background: var(--help-primary);
    color: #fff;
    border: none;
    border-radius: 24px;
    z-index: 9999;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(17, 214, 187, 0.4);
    transition: box-shadow 0.2s, transform 0.2s;
}

.help-menu-fab:hover {
    box-shadow: 0 6px 20px rgba(17, 214, 187, 0.5);
}

.help-menu-fab:active {
    transform: scale(0.98);
}

.help-menu-fab-icon {
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

.help-menu-fab-text {
    font-size: 15px;
    font-weight: 500;
}

.help-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
}

.help-sidebar-overlay.active {
    display: block;
}

.help-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 13px;
    color: #999;
    border-top: 1px solid var(--help-border);
    background: #fff;
}

.help-footer p {
    margin: 0;
}

@media (max-width: 1200px) {
    .help-toc {
        display: none;
    }
}

/* 移动端：显示悬浮菜单、侧边栏改为右侧抽屉 */
@media (max-width: 768px) {
    .help-menu-fab {
        display: flex !important;
        bottom: 56px;
    }
    .help-page {
        flex-direction: column;
    }
    .help-main {
        padding: 20px 16px 100px;
        width: 100%;
        max-width: none;
    }
    .help-page.help-toc-empty .help-main {
        padding-left: 16px;
        padding-right: 16px;
    }
    .help-sidebar {
        position: fixed;
        top: var(--header-height, 70px);
        right: 0;
        bottom: 0;
        left: auto;
        width: min(320px, 85vw);
        max-width: 320px;
        transform: translateX(100%);
        box-shadow: -4px 0 24px rgba(0,0,0,0.12);
        transition: transform 0.3s ease;
        z-index: 160;
    }
    .help-sidebar.open {
        transform: translateX(0);
    }
    body.help-drawer-open .help-menu-fab {
        display: none !important;
    }
    .help-title {
        font-size: 22px;
        margin-bottom: 32px;
    }
    .help-main .section {
        padding-bottom: 40px;
        margin-bottom: 40px;
    }
    .help-main .section-title {
        font-size: 19px;
        margin-bottom: 24px;
    }
    .help-main .subsection-title {
        font-size: 17px;
        margin: 32px 0 16px;
    }
    .help-main .section p {
        font-size: 15px;
        margin-bottom: 16px;
    }
    .help-main .qr-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px 16px;
        margin: 24px 0;
    }
    .help-main .qr-item {
        width: 100%;
        max-width: 280px;
        min-width: unset;
        padding: 20px 16px;
    }
    .help-main .qr-item img {
        width: 160px;
        height: 160px;
    }
    .help-main .feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 24px 0;
    }
    .help-main .feature-grid .feature-card:nth-child(5) {
        grid-column: 1;
    }
    .help-main .feature-card {
        padding: 16px 18px;
        min-width: 0;
    }
    .help-main .feature-card h4 {
        font-size: 16px;
    }
    .help-main .feature-card p {
        font-size: 14px;
    }
}

/* PC 端：强制隐藏悬浮菜单 */
@media (min-width: 769px) {
    .help-menu-fab {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .help-main .feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .help-main .feature-card {
        padding: 14px 16px;
    }
}
