:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e3e8f2;
  --text: #0f172a;
  --muted: #5f6b7c;
  --primary: #0ea5e9;
  --primary-dark: #2563eb;
  --gradient: linear-gradient(120deg, #0ea5e9, #3b82f6);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-soft: 0 25px 80px rgba(15, 23, 42, 0.08);
  --shell-width: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.help-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.help-nav-inner {
  width: min(var(--shell-width), calc(100% - 64px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-nav a.brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.help-nav a.primary-link {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.help-shell {
  width: min(var(--shell-width), calc(100% - 64px));
  margin: 48px auto 96px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
}

.help-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 120px;
  align-self: start;
}

.sidebar-group + .sidebar-group {
  margin-top: 28px;
}

.sidebar-group h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8091a7;
}

.sidebar-link {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  color: var(--text);
  transition: background 0.2s, transform 0.2s;
}

.sidebar-link small {
  display: block;
  color: #8091a7;
  margin-top: 4px;
  font-size: 12px;
}

.sidebar-link[data-active="true"] {
  background: rgba(14, 165, 233, 0.18);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-link:hover {
  background: rgba(14, 165, 233, 0.12);
  transform: translateX(4px);
}

.sidebar-support-card {
  margin-top: 26px;
  padding: 16px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.support-card-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.support-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.support-card-qr img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  background: #fff;
}

.support-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #0f172a;
}

.support-card-desc {
  color: #4b5563;
  font-size: 13px;
  text-align: center;
}

.support-id-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.support-id-text {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
}

.support-id-text strong {
  color: var(--primary-dark);
}

.support-copy-icon {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(14, 165, 233, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.support-copy-icon:hover {
  background: rgba(14, 165, 233, 0.22);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.18);
}

.support-copy-icon:active {
  transform: translateY(1px);
}

.help-main {
  width: 100%;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-soft);
  line-height: 1.8;
  counter-reset: section;
}

.article-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.article-card h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 42px);
  line-height: 1.2;
}

.article-card h2,
.article-card h3 {
  position: relative;
  padding-top: 32px;
  margin-top: 72px;
  margin-bottom: 22px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  scroll-margin-top: 140px;
}

.article-card h2 {
  font-size: clamp(30px, 3.6vw, 36px);
  counter-reset: subsection;
  counter-increment: section;
}

.article-card h2:first-of-type {
  counter-increment: none;
}

.article-card h2::before,
.article-card h3::before {
  display: inline-block;
  min-width: 42px;
  color: var(--text);
  font-weight: 600;
  margin-right: 8px;
}

.article-card h2::before {
  content: counter(section) ".";
}

.article-card h2:first-of-type::before {
  content: "";
  margin-right: 0;
}

.article-card h3 {
  font-size: 24px;
  counter-increment: subsection;
  margin-top: 48px;
}

.article-card h3::before {
  content: counter(section) "." counter(subsection);
  margin-right: 8px;
}

.article-card h4,
.article-card h5 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-card p {
  margin: 18px 0;
  color: #1f2933;
}

.article-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.article-card a:hover {
  text-decoration: underline;
}

.article-card ul,
.article-card ol {
  margin: 18px 0 18px 24px;
}

.article-card li + li {
  margin-top: 6px;
}

.article-card pre {
  position: relative;
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 68px 36px 32px;
  color: #e2e8f0;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre-wrap;
}

.article-card pre::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding-left: 16px;
  background-image:
    radial-gradient(circle at 18px 23px, #ff5f56 5px, transparent 5px),
    radial-gradient(circle at 34px 23px, #ffbd2e 5px, transparent 5px),
    radial-gradient(circle at 50px 23px, #27c93f 5px, transparent 5px);
  background-color: rgba(255, 255, 255, 0.05);
}

.article-card pre::after {
  content: 'terminal';
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 12px;
  color: #8b9bb5;
}

.article-card code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 14px;
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 7px;
  border-radius: 6px;
}

.article-card pre code {
  background: transparent;
  padding: 0;
}

/* 代码语法高亮 */
.article-card pre .comment,
.article-card pre .hljs-comment { color: #64748b; }

.article-card pre .keyword,
.article-card pre .hljs-keyword,
.article-card pre .hljs-built_in,
.article-card pre .hljs-selector-tag { color: #60a5fa; }

.article-card pre .string,
.article-card pre .hljs-string,
.article-card pre .hljs-attr { color: #34d399; }

.article-card pre .variable,
.article-card pre .hljs-variable,
.article-card pre .hljs-title,
.article-card pre .hljs-params { color: #a78bfa; }

.article-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-card th,
.article-card td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 15px;
}

.article-card tr:nth-child(even) td {
  background: #f9fbff;
}

.article-card blockquote {
  margin: 28px 0;
  padding: 18px 26px;
  border-left: 5px solid var(--primary);
  background: rgba(14, 165, 233, 0.08);
  border-radius: var(--radius-lg);
  color: #0f172a;
}

dl.faq-list {
  margin: 24px 0;
  padding: 22px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #f8fbff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
}

dl.faq-list + dl.faq-list {
  margin-top: 20px;
}

dl.faq-list dt {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

dl.faq-list dt::before {
  content: "Q";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.18);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

dl.faq-list dd {
  margin: 0;
  color: #1f2635;
  line-height: 1.75;
}

dl.faq-list dd p {
  margin: 0 0 10px;
}

dl.faq-list dd p:last-child,
dl.faq-list dd ul:last-child,
dl.faq-list dd ol:last-child,
dl.faq-list dd pre:last-child {
  margin-bottom: 0;
}

.article-card hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 36px 0;
}

.article-card img {
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

@media (max-width: 1024px) {
  .help-shell {
    grid-template-columns: 1fr;
  }
  .help-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .help-nav-inner,
  .help-shell {
    width: calc(100% - 32px);
  }
  .article-card {
    padding: 32px 24px;
  }
}
