:root {
  --bg: #f7fbf8;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(7, 46, 40, 0.12);
  --line-strong: rgba(10, 118, 94, 0.24);
  --text: #071815;
  --muted: #58706a;
  --soft-text: #24423c;
  --panel-text: #f4fffb;
  --panel-muted: #a9c7bf;
  --cyan: #1088da;
  --green: #0eb77f;
  --amber: #b47621;
  --danger: #c9322b;
  --grid-vertical: rgba(18, 117, 95, 0.06);
  --grid-horizontal: rgba(16, 136, 218, 0.045);
  --page-gradient: linear-gradient(180deg, #ffffff 0%, #f7fbf8 44%, #eef8f3 100%);
  --header-bg: rgba(255, 255, 255, 0.86);
  --button-primary-text: #031510;
  --shadow: 0 22px 70px rgba(9, 45, 39, 0.13);
  --shadow-strong: 0 34px 90px rgba(8, 34, 31, 0.2);
  --dashboard-bg: linear-gradient(145deg, rgba(9, 22, 24, 0.98), rgba(8, 48, 43, 0.94));
  --dark-panel: rgba(2, 8, 7, 0.58);
  --chip-bg: rgba(14, 183, 127, 0.08);
  --poster-bg: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] {
  --bg: #05100f;
  --bg-2: #071817;
  --surface: rgba(11, 30, 29, 0.82);
  --surface-strong: rgba(10, 39, 36, 0.96);
  --line: rgba(117, 255, 216, 0.18);
  --line-strong: rgba(117, 255, 216, 0.38);
  --text: #f4fffb;
  --muted: #9ab7b0;
  --soft-text: #d8eee8;
  --panel-text: #f4fffb;
  --panel-muted: #a9c7bf;
  --cyan: #19b6ff;
  --green: #26dc9a;
  --amber: #f2c46d;
  --danger: #ff827a;
  --grid-vertical: rgba(38, 220, 154, 0.045);
  --grid-horizontal: rgba(25, 182, 255, 0.045);
  --page-gradient: linear-gradient(180deg, #020807 0%, var(--bg) 46%, #061514 100%);
  --header-bg: rgba(2, 8, 7, 0.86);
  --button-primary-text: #041310;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  --shadow-strong: 0 36px 90px rgba(0, 0, 0, 0.5);
  --dashboard-bg: linear-gradient(145deg, rgba(10, 22, 24, 0.96), rgba(9, 46, 43, 0.84));
  --dark-panel: rgba(2, 8, 7, 0.42);
  --chip-bg: rgba(38, 220, 154, 0.08);
  --poster-bg: #061413;
  --input-bg: rgba(1, 9, 8, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(var(--grid-vertical) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-horizontal) 1px, transparent 1px),
    var(--page-gradient);
  background-size: 64px 64px, 64px 64px, auto;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  transition: background 220ms ease, color 220ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.header-actions,
.trust-row,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 20px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #02120f;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: 8px;
  font-weight: 950;
}

.nav {
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft-text);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(8, 34, 31, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.theme-toggle-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--green);
}

.theme-toggle-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle-sun {
  display: none;
}

body[data-theme="dark"] .theme-toggle-moon {
  display: none;
}

body[data-theme="dark"] .theme-toggle-sun {
  display: grid;
}

.header-cta,
.button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-weight: 850;
}

.header-cta {
  padding: 10px 16px;
  color: var(--button-primary-text);
  background: var(--green);
}

.section-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 52px;
  align-items: center;
  min-height: 760px;
  padding: 56px 0 48px;
}

.product-name {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 10px 16px;
  color: var(--green);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(38, 220, 154, 0.08);
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 20px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  color: var(--soft-text);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.45;
}

.hero-actions {
  gap: 14px;
  margin: 34px 0 22px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.header-cta:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--button-primary-text);
  background: linear-gradient(135deg, #38e8aa, #19b6ff);
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(38, 220, 154, 0.18);
}

.button.secondary {
  color: var(--text);
  background: var(--surface);
}

.hero-micro,
.section-heading p,
.source-note,
.feature-card p,
.purchase-card p,
.faq p,
.delivery-success p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 610px;
  margin-top: 28px;
}

.hero-stats div,
.trend-metric,
.feature-card,
.purchase-card,
.package-item,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-stats div {
  padding: 18px;
}

.hero-stats strong,
.trend-metric strong {
  display: block;
  color: var(--green);
  font-size: 28px;
}

.hero-stats span,
.trend-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.mock-window {
  overflow: hidden;
  border: 1px solid rgba(117, 255, 216, 0.28);
  border-radius: 8px;
  background: var(--dashboard-bg);
  box-shadow: var(--shadow-strong);
  transform: perspective(1000px) rotateY(-7deg) rotateX(3deg);
}

.window-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--panel-text);
}

.window-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.window-top span:nth-child(2) {
  background: var(--amber);
}

.window-top span:nth-child(3) {
  background: var(--cyan);
}

.window-top strong {
  margin-left: auto;
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.chart-panel,
.metric-panel,
.queue-panel {
  border: 1px solid rgba(117, 255, 216, 0.14);
  border-radius: 8px;
  background: var(--dark-panel);
}

.chart-panel {
  min-height: 190px;
  padding: 18px;
}

.chart-panel.wide {
  grid-column: 1 / -1;
}

.mini-label {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric-panel {
  padding: 22px;
}

.metric-panel b {
  display: block;
  font-size: 42px;
  color: var(--panel-text);
}

.metric-panel span {
  color: var(--panel-muted);
}

.queue-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.queue-panel span {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--panel-text);
  background: rgba(38, 220, 154, 0.1);
}

.code-pack {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 220px;
  padding: 20px;
  border: 1px solid rgba(242, 196, 109, 0.42);
  border-radius: 8px;
  color: var(--panel-text);
  background: #0d1918;
  box-shadow: var(--shadow);
}

.code-pack span {
  color: var(--amber);
  font-weight: 850;
}

.code-pack strong {
  display: block;
  margin-top: 8px;
}

.poster-strip {
  width: min(1280px, calc(100% - 24px));
  margin: -18px auto 60px;
}

.poster-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--poster-bg);
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.poster figcaption {
  padding: 12px 14px;
  color: var(--soft-text);
  font-size: 14px;
  font-weight: 750;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.chain-section h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.trend,
.features,
.purchase,
.package,
.faq,
.chain-section {
  padding: 72px 0;
  border-top: 1px solid rgba(117, 255, 216, 0.1);
}

.trend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.china-map {
  position: relative;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(38, 220, 154, 0.08), rgba(25, 182, 255, 0.08)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(117, 255, 216, 0.05) 35px 36px);
  overflow: hidden;
}

.china-map::before {
  content: "";
  position: absolute;
  inset: 52px 100px 54px 76px;
  border: 2px solid rgba(25, 182, 255, 0.5);
  clip-path: polygon(12% 48%, 22% 22%, 42% 28%, 53% 12%, 67% 22%, 80% 16%, 92% 36%, 84% 64%, 66% 72%, 56% 88%, 38% 74%, 22% 80%);
  background: rgba(25, 182, 255, 0.06);
}

.node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 20px var(--green);
}

.n1 { left: 28%; top: 44%; }
.n2 { left: 46%; top: 36%; }
.n3 { left: 61%; top: 54%; }
.n4 { left: 74%; top: 42%; }

.answer-card {
  position: absolute;
  right: 26px;
  bottom: 24px;
  width: 260px;
  padding: 18px;
  border: 1px solid rgba(25, 182, 255, 0.34);
  border-radius: 8px;
  color: var(--panel-text);
  background: rgba(2, 8, 7, 0.78);
}

.answer-card strong,
.answer-card span {
  display: block;
}

.answer-card span {
  margin-top: 9px;
  color: var(--muted);
}

.trend-metrics {
  display: grid;
  gap: 14px;
}

.trend-metric {
  padding: 28px;
}

.trend-metric strong {
  font-size: clamp(36px, 5vw, 56px);
}

.source-note {
  margin-top: 18px;
  font-size: 13px;
}

.chain {
  display: grid;
  grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr 32px 1fr;
  gap: 12px;
  align-items: center;
}

.chain-step {
  min-height: 118px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 250, 246, 0.88));
}

body[data-theme="dark"] .chain-step {
  background: linear-gradient(180deg, rgba(17, 49, 45, 0.92), rgba(8, 24, 23, 0.9));
}

.chain-step span {
  color: var(--green);
  font-weight: 900;
}

.chain-step strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
}

.chain-arrow {
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.chain-arrow::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin-left: auto;
  transform: translateY(-4px) rotate(45deg);
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
}

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

.feature-card {
  padding: 24px;
}

.feature-icon,
.package-item svg {
  width: 38px;
  height: 38px;
  color: var(--green);
}

.feature-icon svg,
.package-item svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
}

.purchase {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
}

.purchase-card {
  padding: clamp(24px, 4vw, 40px);
}

.purchase-card h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3vw, 38px);
}

.qr-link {
  display: block;
  width: min(320px, 100%);
  margin: 26px auto 22px;
  padding: 14px;
  border: 1px solid rgba(242, 196, 109, 0.5);
  border-radius: 8px;
  background: #fff;
}

.trust-row {
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trust-row span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft-text);
  font-size: 13px;
}

.unlock-form {
  margin-top: 26px;
}

.unlock-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--soft-text);
  font-weight: 850;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  background: var(--input-bg);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 220, 154, 0.12);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-message {
  min-height: 28px;
  margin: 16px 0 0;
  font-weight: 800;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--green);
}

.delivery-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.delivery-success h3 {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 24px;
}

.delivery-success ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--soft-text);
  line-height: 1.7;
}

.delivery-links {
  display: grid;
  gap: 10px;
}

.delivery-link {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.delivery-link strong {
  color: var(--text);
}

.delivery-link span {
  color: var(--muted);
}

.delivery-link em {
  color: var(--cyan);
  font-size: 13px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.package-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px;
  font-weight: 850;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq details {
  padding: 20px;
}

.faq summary {
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.faq p {
  margin: 14px 0 0;
}

.footer {
  justify-content: center;
  gap: 16px;
  padding: 34px 20px 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.config-error::before {
  content: "配置读取失败，请通过 npm start 启动页面，并检查 config/site-config.json";
  position: fixed;
  inset: 20px 20px auto;
  z-index: 100;
  padding: 16px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: #fff;
  background: #35100d;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero,
  .trend-layout,
  .purchase {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-visual {
    min-height: 440px;
  }

  .chain {
    grid-template-columns: 1fr;
  }

  .chain-arrow {
    width: 2px;
    height: 24px;
    margin: 0 auto;
  }

  .chain-arrow::after {
    margin: 17px 0 0 -4px;
    transform: rotate(135deg);
  }

  .feature-grid,
  .package-grid,
  .poster-rail,
  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .header-cta {
    display: none;
  }

  .section-band {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding-top: 48px;
    gap: 30px;
  }

  .hero-stats,
  .input-row {
    grid-template-columns: 1fr;
  }

  .mock-window {
    transform: none;
  }

  .hero-visual {
    min-height: auto;
  }

  .code-pack {
    position: static;
    width: 100%;
    margin-top: 14px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-panel.wide {
    grid-column: auto;
  }

  .answer-card {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .china-map::before {
    inset: 44px 28px 92px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
