/* Help / FAQ page — layout and components (navbar/footer from shared main.css) */

/* Breadcrumb */
.page-help .breadcrumb-nav {
    max-width: 1300px;
    margin: 0 auto;
    padding: 140px 5% 0;
    position: relative;
    z-index: 2;
}

.page-help .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--help-text-muted);
}

.page-help .breadcrumb-item a {
    color: var(--help-text-muted);
    transition: color 0.2s;
}

.page-help .breadcrumb-item a:hover {
    color: #ff6b6b;
}

.page-help .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    opacity: 0.4;
}

.page-help .breadcrumb-current {
    color: var(--help-text-main);
    font-weight: 500;
}

body.page-help {
    --help-bg: #f4f5f7;
    --help-text-main: #0f0f14;
    --help-text-muted: #5c5c6b;
    --help-card-bg: rgba(255, 255, 255, 0.65);
    --help-shadow-card: 0 24px 48px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 1);
    --help-shadow-card-hover: 0 32px 64px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);

    background-color: var(--help-bg);
    color: var(--help-text-main);
}

.page-help .bg-orbs .orb {
    filter: blur(160px);
}

.page-help .orb-1 {
    top: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: rgba(255, 107, 107, 0.6);
}

.page-help .orb-2 {
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: rgba(102, 126, 234, 0.5);
}

.page-help #main-content h1,
.page-help #main-content h2,
.page-help #main-content h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Hero */
.page-help .docs-hero {
    padding: 48px 5% 80px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.page-help .docs-hero h1 {
    font-size: 3.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--help-text-main);
}

.page-help .docs-hero p {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--help-text-muted);
    line-height: 1.8;
    margin: 0 auto 40px;
    max-width: 700px;
}

.page-help .search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 100px;
    box-shadow: var(--help-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.page-help .search-container:focus-within {
    box-shadow: var(--help-shadow-card-hover);
    border-color: #ff9a44;
}

.page-help .search-mag-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0b0;
    font-size: 1.1rem;
    pointer-events: none;
}

.page-help .search-container input {
    width: 100%;
    padding: 20px 56px 20px 60px;
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-family: var(--font-body);
    color: var(--help-text-main);
    outline: none;
}

/* Hide the native browser search cancel button */
.page-help .search-container input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.page-help .search-container input[type="search"]::-ms-clear {
    display: none;
}

/* Clear button */
.page-help .search-clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.07);
    border: none;
    cursor: pointer;
    color: #888899;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.82rem;
    flex-shrink: 0;
    padding: 0;
}

.page-help .search-clear:hover {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
}

/* [hidden] 默认会被上面的 display:flex 覆盖，需显式隐藏 */
.page-help .search-clear[hidden] {
    display: none;
}

/* Search results dropdown */
.page-help .search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: -4px;
    right: -4px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.07);
    max-height: 440px;
    overflow-y: auto;
    z-index: 200;
    padding: 8px;
    text-align: left;
}

.page-help .search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.18s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.page-help .search-result-item:hover,
.page-help .search-result-item:focus {
    background: rgba(255, 107, 107, 0.05);
    outline: none;
}

.page-help .search-result-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(102, 126, 234, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 1px;
}

.page-help .search-result-body {
    flex: 1;
    min-width: 0;
}

.page-help .search-result-cat {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #ff9a44;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.page-help .search-result-question {
    display: block;
    font-size: 0.93rem;
    font-weight: 600;
    color: #0f0f14;
    line-height: 1.4;
    margin-bottom: 3px;
}

.page-help .search-result-snippet {
    display: block;
    font-size: 0.8rem;
    color: #888899;
    line-height: 1.5;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-help .search-result-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.04);
    margin: 4px 6px;
}

.page-help .search-no-results {
    padding: 32px 20px;
    text-align: center;
    color: #888899;
    font-size: 0.92rem;
}

.page-help .search-no-results i {
    font-size: 2rem;
    opacity: 0.25;
    display: block;
    margin-bottom: 12px;
}

mark.search-hl {
    background: rgba(255, 154, 68, 0.22);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
    font-style: normal;
}

/* Two-column layout */
.page-help .docs-layout {
    display: flex;
    gap: 60px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5% 120px;
    position: relative;
    z-index: 2;
    align-items: flex-start;
}

.page-help .docs-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 120px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.02);
}

.page-help .sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888899;
    margin-bottom: 20px;
    padding-left: 12px;
}

.page-help .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-help .sidebar-link {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--help-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid transparent;
}

.page-help .sidebar-link i {
    font-size: 1.1rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.page-help .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--help-text-main);
}

.page-help .sidebar-link.active {
    background: #fff;
    color: var(--help-text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.page-help .sidebar-link.active i {
    opacity: 1;
    color: #ff6b6b;
}

.page-help .docs-content {
    flex: 1;
    min-width: 0;
}

.page-help .faq-group {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}

.page-help .faq-group-title {
    font-size: 2rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 16px;
}

.page-help .faq-group-title i {
    color: #8a65b8;
}

/* Accordion (overrides index .faq-* for this page) */
.page-help .faq-item {
    background: var(--help-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-help .faq-item:hover {
    border-color: #fff;
    box-shadow: var(--help-shadow-card);
}

.page-help .faq-question {
    padding: 24px 30px;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--help-text-main);
    line-height: 1.4;
}

.page-help .faq-question i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-help .faq-answer {
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-help .faq-answer p {
    margin-bottom: 16px;
}

.page-help .faq-answer p:last-child {
    margin-bottom: 0;
}

.page-help .highlight-tag {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
    color: #ff6b6b;
}

.page-help .faq-item.active {
    background: #fff;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: var(--help-shadow-card-hover);
    margin: 24px 0;
}

.page-help .faq-item.active .faq-question {
    color: #ff6b6b;
}

.page-help .faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #ff6b6b;
}

.page-help .faq-item.active .faq-answer {
    padding: 0 30px 30px;
    max-height: 800px;
}

/* CTA band */
.page-help .help-cta {
    background: linear-gradient(135deg, #1a1a24, #0b0c10);
    color: #fff;
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.page-help .help-cta::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: linear-gradient(135deg, #ff6b6b, #ff9a44);
    filter: blur(100px);
    opacity: 0.3;
    border-radius: 50%;
}

.page-help .help-cta h3 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.page-help .help-cta p {
    font-size: 1.1rem;
    color: #a0a0b0;
    margin-bottom: 30px;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.page-help .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    border-radius: 100px;
    background: #fff;
    color: #111;
    font-weight: 500;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    border: none;
    font-family: var(--font-body);
}

.page-help .btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
}

.page-help .btn-cta--secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.page-help .btn-cta--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.page-help .help-cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.page-help .help-cta p a {
    color: #ff9a44;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.page-help .help-cta p a:hover {
    color: #fff;
}

/* Quick nav cards */
.page-help .help-quick-nav {
    margin-bottom: 48px;
}

.page-help .quick-nav-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888899;
    margin-bottom: 14px;
}

.page-help .quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.page-help .quick-nav-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--help-text-main);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.page-help .quick-nav-card i {
    font-size: 1.1rem;
    color: #ff6b6b;
    flex-shrink: 0;
    opacity: 0.85;
}

.page-help .quick-nav-card:hover {
    background: #fff;
    border-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
    color: #ff6b6b;
}

@media (max-width: 768px) {
    .page-help .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-help .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-help .quick-nav-card {
        font-size: 0.82rem;
        padding: 12px;
    }
}

/* Hero meta (last updated + count) */
.page-help .docs-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.9rem;
    color: #a0a0b0;
    font-weight: 400;
    margin: -16px auto 32px;
}

.page-help .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.page-help .docs-hero-meta i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.page-help .hero-meta-divider {
    opacity: 0.4;
}

/* Related reading */
.page-help .help-related {
    margin-top: 48px;
}

.page-help .help-related-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--help-text-muted);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.page-help .help-related-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-help .help-related-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    color: var(--help-text-main);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.page-help .help-related-card:hover {
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
    border-color: rgba(255, 107, 107, 0.2);
}

.page-help .related-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(102, 126, 234, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ff6b6b;
}

.page-help .related-card-body strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.page-help .related-card-body p {
    font-size: 0.88rem;
    color: var(--help-text-muted);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Inline code in FAQ answers */
.page-help .faq-answer code {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
    font-size: 0.88em;
    color: #667eea;
}

/* Internal links within FAQ answers */
.page-help .faq-answer a {
    color: #ff6b6b;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.page-help .faq-answer a:hover {
    color: #ff9a44;
}

@media (max-width: 1024px) {
    .page-help .docs-layout {
        flex-direction: column;
        gap: 40px;
    }

    .page-help .docs-sidebar {
        position: static;
        width: 100%;
        padding: 24px;
    }

    .page-help .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .page-help .sidebar-link {
        flex: 1;
        min-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-help .breadcrumb-nav {
        padding-top: 140px;
    }

    .page-help .docs-hero {
        padding-top: 32px;
    }

    .page-help .docs-hero h1 {
        font-size: 2.5rem;
    }

    .page-help .sidebar-link {
        min-width: 100%;
        justify-content: flex-start;
    }

    .page-help .faq-question {
        font-size: 1.05rem;
        padding: 20px;
    }

    .page-help .faq-item.active .faq-answer {
        padding: 0 20px 24px;
    }

    .page-help .help-cta {
        padding: 40px 20px;
    }

    .page-help .help-cta h3 {
        font-size: 1.8rem;
    }
}
