/* ===== Shared Styles for Help Center ===== */
:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg-alt);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.site-logo { display: flex; align-items: center; gap: 10px; color: #0f172a; text-decoration: none; }
.site-logo img { height: 36px; width: auto; }
.site-logo span { font-weight: 700; font-size: 1.15rem; }
.header-back {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    font-size: 0.92rem; font-weight: 500; color: var(--primary);
    border: 1.5px solid var(--primary); border-radius: 8px;
    text-decoration: none; transition: var(--transition);
}
.header-back:hover { background: var(--primary); color: #fff; }

/* Layout */
.kb-layout { max-width: 1200px; margin: 0 auto; padding: 100px 24px 64px; display: flex; gap: 32px; }
.kb-sidebar {
    width: 260px; flex-shrink: 0;
    position: sticky; top: 88px; align-self: flex-start;
    max-height: calc(100vh - 120px); overflow-y: auto;
}
.kb-main { flex: 1; min-width: 0; }

/* Sidebar Nav */
.sidebar-nav {
    list-style: none; padding: 0; margin: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.sidebar-nav li { border-bottom: 1px solid var(--border); }
.sidebar-nav li:last-child { border-bottom: none; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px;
    font-size: 0.92rem; font-weight: 500; color: var(--text-secondary);
    text-decoration: none; transition: var(--transition); cursor: pointer;
}
.sidebar-nav a:hover { background: #fffbeb; color: #d97706; }
.sidebar-nav a.active { background: #ecfdf5; color: #059669; font-weight: 600; border-left: 3px solid #059669; }
.sidebar-nav a .nav-icon { font-size: 1.1rem; }

/* Article */
.article-section {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px; margin-bottom: 0;
}
.article-section h2 { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.article-section .section-desc { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-section h3 { font-size: 1.1rem; font-weight: 600; color: #0f172a; margin: 24px 0 10px; }
.article-section h3:first-of-type { margin-top: 0; }
.article-section h4 { font-size: 0.95rem; font-weight: 600; color: #334155; margin: 16px 0 8px; }
.article-section p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 12px; line-height: 1.8; }
.article-section ul, .article-section ol { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 16px; padding-left: 20px; }
.article-section li { margin-bottom: 6px; line-height: 1.7; }

/* Tip boxes */
.tip-box {
    padding: 14px 18px; border-radius: 10px; margin: 16px 0;
    font-size: 0.9rem; line-height: 1.6;
    display: flex; align-items: flex-start; gap: 10px;
}
.tip-box.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.tip-box.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.tip-box.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.tip-box .tip-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

/* Step list */
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li {
    counter-increment: step; padding: 14px 14px 14px 48px;
    position: relative; margin-bottom: 12px;
    background: var(--bg-alt); border-radius: 10px;
    font-size: 0.93rem; color: var(--text-secondary); line-height: 1.7;
}
.step-list li::before {
    content: counter(step);
    position: absolute; left: 12px; top: 12px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 700;
}

/* Image figure */
.article-figure { text-align: center; margin: 24px 0; }
.article-figure img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.article-figure figcaption { font-size: 0.85rem; color: var(--text-light); margin-top: 8px; }

/* Side-by-side screenshots in article */
.article-figure .screenshot-row { display: flex; gap: 12px; justify-content: center; }
.article-figure .screenshot-row img { flex: 1; min-width: 0; max-width: 49%; }
@media (max-width: 640px) {
    .article-figure .screenshot-row { flex-direction: column; }
    .article-figure .screenshot-row img { max-width: 100%; }
}

/* Sidebar FAQ shortcut */
.sidebar-faq-shortcut { margin-top: 16px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.sidebar-faq-shortcut h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.sidebar-faq-shortcut a { display: block; padding: 6px 0; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; border-bottom: 1px dashed #f1f5f9; transition: var(--transition); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-faq-shortcut a:last-child { border-bottom: none; }
.sidebar-faq-shortcut a:hover { color: var(--primary); }

/* Submenu Groups */
.nav-group { border-bottom: 1px solid var(--border); }
.nav-group:last-child { border-bottom: none; }
.nav-group-toggle {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; font-size: 0.92rem; font-weight: 600; color: var(--text);
    background: var(--bg-alt); border: none; cursor: pointer; text-align: left;
    transition: var(--transition);
}
.nav-group-toggle:hover { background: #fffbeb; color: #d97706; }
.nav-group-toggle .group-arrow {
    margin-left: auto; font-size: 0.75rem; transition: transform 0.25s;
    color: var(--text-light);
}
.nav-group.open .nav-group-toggle { color: var(--primary); background: #eff6ff; }
.nav-group.open .nav-group-toggle .group-arrow { transform: rotate(180deg); }
.nav-sub {
    list-style: none; padding: 0; margin: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
}
.nav-group.open .nav-sub { max-height: 500px; }
.nav-sub li { border-bottom: none; }
.nav-sub a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px 10px 40px; font-size: 0.87rem; font-weight: 500;
    color: var(--text-secondary); text-decoration: none; transition: var(--transition);
    border-left: 3px solid transparent;
}
.nav-sub a:hover { background: #fffbeb; color: #d97706; }
.nav-sub a.active {
    background: #ecfdf5; color: #059669; font-weight: 600;
    border-left-color: #059669;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none; width: 100%; padding: 12px 18px; margin-bottom: 16px;
    font-size: 0.95rem; font-weight: 600; color: var(--primary);
    background: #fff; border: 1.5px solid var(--primary); border-radius: 10px;
    cursor: pointer; text-align: left; transition: var(--transition);
}
.sidebar-toggle:hover { background: #eff6ff; }
.sidebar-toggle .toggle-arrow { float: right; transition: transform 0.25s; }
.sidebar-toggle.open .toggle-arrow { transform: rotate(180deg); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-light); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-secondary); font-size: 1.1rem; }

/* Footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: 32px 0; text-align: center; }
.site-footer .footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-footer a { color: #64748b; font-size: 0.88rem; text-decoration: none; }
.site-footer a:hover { color: #94a3b8; }

/* Back to top */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 99;
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    cursor: pointer; border: none; opacity: 0; visibility: hidden;
    transition: var(--transition); box-shadow: var(--shadow-lg);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Responsive */
@media (max-width: 992px) {
    .kb-layout { flex-direction: column; }
    .kb-sidebar { width: 100%; position: static; max-height: none; overflow: visible; }
    .sidebar-nav { display: none; }
    .sidebar-nav.open { display: block; }
    .sidebar-toggle { display: block; }
    .sidebar-faq-shortcut { display: none; }
}
@media (max-width: 768px) {
    .kb-hero h1 { font-size: 1.6rem; }
    .article-section { padding: 20px; }
}
