:root {
  --brand: #2b78b8;
  --brand-dark: #1e5a8a;
  --brand-light: #e8f3fb;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --text: #1a2332;
  --text-muted: #5a6a7a;
  --border: #dce6ef;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(30, 90, 138, 0.08);
  --max: 1100px;
  --header-h: 64px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-dark);
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
  background: var(--brand-light);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

/* Ads slot - sticky under header */
.ads-slot {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 4px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 10px;
  background: transparent;
  margin: 0;
  padding: 0 8px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* Hero */
.hero {
  position: relative;
  padding: 48px 0 40px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(43, 120, 184, 0.18), transparent 55%),
    radial-gradient(ellipse at 90% 40%, rgba(30, 90, 138, 0.12), transparent 50%),
    linear-gradient(180deg, #eef6fc 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.hero-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.35;
  margin-bottom: 14px;
  color: var(--text);
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 22px;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(43, 120, 184, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--brand-dark);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
}

/* Sections */
main {
  flex: 1;
}

.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  margin-bottom: 28px;
  max-width: 46em;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin-bottom: 10px;
  color: var(--text);
}

.section-head p {
  color: var(--text-muted);
}

.prose {
  max-width: 48em;
}

.prose h2,
.prose h3 {
  margin: 1.6em 0 0.7em;
  line-height: 1.4;
}

.prose h2 {
  font-size: 1.4rem;
}

.prose h3 {
  font-size: 1.15rem;
}

.prose p {
  margin-bottom: 1em;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em 1.25em;
  list-style: disc;
}

.prose li {
  margin-bottom: 0.45em;
  color: var(--text);
}

.prose strong {
  color: var(--text);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #0d1520;
}

.feature-body {
  padding: 16px 18px 20px;
}

.feature-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.show-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.show-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.show-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  margin-inline: auto;
}

.show-card .caption-box {
  padding: 16px 18px 20px;
}

.show-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.show-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  position: relative;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.shot-row img {
  width: 100%;
  border-radius: var(--radius);
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.cta-band h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.cta-band p {
  opacity: 0.92;
  margin-bottom: 20px;
  max-width: 36em;
  margin-inline: auto;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: none;
}

.cta-band .btn-primary:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.page-hero {
  padding: 36px 0 20px;
  background: linear-gradient(180deg, #eef6fc 0%, var(--bg) 100%);
}

.page-hero h1 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 40em;
}

.page-content {
  padding: 28px 0 56px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb span {
  margin: 0 6px;
  opacity: 0.6;
}

.related-links {
  margin-top: 36px;
  padding: 22px;
  background: var(--brand-light);
  border-radius: var(--radius);
}

.related-links h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0;
}

.error-page {
  text-align: center;
  padding: 60px 0 80px;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 28em;
  margin-inline: auto;
}

.site-footer {
  background: #152233;
  color: #c5d3e0;
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.site-footer p {
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.88;
}

.site-footer h4 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.site-footer a {
  color: #c5d3e0;
  display: block;
  padding: 4px 0;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.toc h2 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.toc ol {
  margin-left: 1.2em;
  list-style: decimal;
}

.toc li {
  margin-bottom: 4px;
}

.keywords-inline a {
  margin-right: 8px;
}

@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .show-grid,
  .shot-row,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 14px;
    display: none;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .hero-grid,
  .feature-grid,
  .show-grid,
  .shot-row,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual img,
  .show-card img {
    max-width: 280px;
  }

  .show-card {
    text-align: center;
  }

  .show-card .caption-box {
    text-align: left;
  }

  .shot-row img {
    max-width: 260px;
    margin-inline: auto;
  }

  .section {
    padding: 36px 0;
  }

  #ads > div {
    width: 62px;
  }

  #ads img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}
