:root {
  --bg: #0d0d0f;
  --bg-alt: #16161a;
  --bg-card: #1c1c22;
  --border: #2a2a32;
  --text: #e8e6e3;
  --text-muted: #9a9690;
  --accent: #c42b2b;
  --accent-hover: #e03838;
  --accent-soft: rgba(196, 43, 43, 0.15);
  --max: 1120px;
  --radius: 10px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.logo:hover {
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 3.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 43, 43, 0.22), transparent),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-meta strong {
  color: var(--text);
  display: block;
  font-size: 1.15rem;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  margin: 0 auto;
  max-height: 480px;
  width: auto;
  object-fit: contain;
  background: #000;
}

.hero-visual-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hero-visual-pair img {
  max-height: 420px;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 42em;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.section-head p {
  color: var(--text-muted);
}

.section-label {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* Feature cards / grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #000;
}

.card-wide img {
  aspect-ratio: 4 / 5;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.feature-row:nth-child(even) {
  grid-template-columns: 1.15fr 1fr;
}

.feature-row:nth-child(even) .feature-text {
  order: 2;
}

.feature-row:nth-child(even) .feature-media {
  order: 1;
}

.feature-text h3 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.feature-text p {
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.feature-media img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 520px;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #000;
}

.media-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.media-duo img {
  max-height: 460px;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

/* Prose content */
.prose {
  max-width: 48em;
}

.prose h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.85rem;
  padding-top: 0.5rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.65rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.prose p strong,
.prose li strong {
  color: var(--text);
}

.prose ul,
.prose ol {
  margin-bottom: 1.15rem;
  color: var(--text-muted);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-page {
  padding: 2.5rem 0 4rem;
}

.content-page .page-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.5rem;
}

.content-page .page-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(ellipse at center, rgba(196, 43, 43, 0.18), transparent 70%),
    var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta-band h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 36em;
  margin-inline: auto;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Tags / keyword chips */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-cloud a,
.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 28em;
}

/* TOC */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.toc ol {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--accent);
}

.highlight-box {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .feature-row,
  .feature-row:nth-child(even),
  .footer-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .feature-row:nth-child(even) .feature-text,
  .feature-row:nth-child(even) .feature-media {
    order: unset;
  }

  .grid-3,
  .grid-4,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-visual {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-visual-pair {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .grid-3,
  .grid-4,
  .steps,
  .media-duo,
  .hero-visual-pair {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.5rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card img {
    aspect-ratio: 3 / 4;
    max-height: 420px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
