:root {
  --bg: #0b0f17;
  --bg-elev: #121824;
  --bg-card: #161e2e;
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef3fa;
  --text-muted: #9aa9bf;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --good: #22c55e;
  --code-bg: #0d131f;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: #60a5fa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.version-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.topbar-center {
  flex: 1;
  max-width: 440px;
}

#searchInput {
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

#searchInput:focus {
  border-color: var(--accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.pill-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pill-btn.ghost {
  background: transparent;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
}

.mobile-only {
  display: none;
}

.layout {
  display: flex;
  max-width: 1340px;
  margin: 0 auto;
  min-height: calc(100vh - 57px);
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px 10px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: var(--accent-soft);
  color: #93c5fd;
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 12px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.content-wrap {
  flex: 1;
  min-width: 0;
  padding: 32px 44px 56px;
}

.article {
  max-width: 900px;
}

.article h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.article .lead {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.article h2 {
  font-size: 20px;
  margin: 30px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article h3 {
  font-size: 16px;
  margin: 20px 0 8px;
  color: #dbeafe;
}

.article p, .article li {
  color: #d6e0ef;
}

.article ul, .article ol {
  padding-left: 22px;
}

.article li {
  margin-bottom: 6px;
}

.callout {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  margin: 18px 0;
}

.callout.warn {
  border-left-color: #f59e0b;
}

.callout strong {
  color: #fff;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  color: #fff;
}

tr:last-child td {
  border-bottom: none;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 18px 0 26px;
}

.shot-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.14s, border-color 0.14s;
}

.shot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.45);
}

.shot-card img {
  width: 100%;
  height: auto;
  display: block;
}

.shot-card figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.search-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.search-hit {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
}

.search-hit:hover {
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.article-footer {
  max-width: 900px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pager a {
  padding: 10px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.disclaimer {
  font-size: 12.5px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 7, 13, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img {
  max-width: min(94vw, 1280px);
  max-height: 82vh;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 22px;
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-caption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 880px) {
  .mobile-only {
    display: inline-flex;
  }
  .topbar-center {
    display: none;
  }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 57px;
    z-index: 50;
    background: var(--bg);
    transition: left 0.18s ease;
  }
  .sidebar.open {
    left: 0;
  }
  .content-wrap {
    padding: 22px 18px 44px;
  }
  .hero-card {
    padding: 28px 18px;
  }
  .quickstart-strip,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.article.home-page {
  max-width: 1020px;
}

.hero-card {
  position: relative;
  text-align: center;
  padding: 42px 32px 36px;
  margin-bottom: 28px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background:
    radial-gradient(640px 260px at 50% 0%, rgba(59, 130, 246, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(22, 30, 46, 0.96), rgba(14, 20, 31, 0.98));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.hero-logo {
  display: block;
  max-width: 310px;
  width: 72%;
  height: auto;
  margin: 0 auto 14px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: #f8fbff;
}

.hero-subtitle {
  max-width: 660px;
  margin: 0 auto 18px;
  font-size: 15.5px;
  color: var(--text-muted);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #d6e4f7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: #eef3fa;
  transition: transform 0.12s, background 0.12s, border-color 0.12s;
}

.hero-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

.hero-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.32);
}

.hero-btn.primary:hover {
  background: #2563eb;
}

.hero-btn.secondary {
  background: var(--accent-soft);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

.quickstart-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 30px;
}

.qs-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.qs-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #93c5fd;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.qs-step h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #f3f7fd;
}

.qs-step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 30px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.feature-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 10px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: #f3f7fd;
}

.feature-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.dl-dropdown {
  position: relative;
  display: inline-block;
}

.dl-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  background: #141c2b;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
  z-index: 80;
  text-align: left;
}

.hero-actions .dl-menu {
  left: 0;
  right: auto;
}

.dl-dropdown.open .dl-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dl-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
}

.dl-menu a:hover {
  background: rgba(59, 130, 246, 0.14);
  text-decoration: none;
}

.dl-menu a strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f7fd;
}

.dl-menu a span {
  font-size: 12px;
  color: var(--text-muted);
}
