:root {
  --bg: #0a0f1d;
  --bg-elevated: #111936;
  --panel: rgba(18, 25, 51, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf2ff;
  --muted: #9eb0e3;
  --primary: #5b8cff;
  --primary-hover: #7aa2ff;
  --accent: #22c55e;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "Cascadia Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 45%, #0d1428 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(91, 140, 255, 0.12);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-v2 {
  color: var(--primary);
  font-weight: 800;
}

.nav {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.35);
}

.btn-ghost {
  background: rgba(91, 140, 255, 0.12);
  color: var(--text);
  border: 1px solid rgba(91, 140, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(91, 140, 255, 0.2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: #324170;
  color: #fff;
}

.btn-secondary:hover {
  background: #3d4d86;
}

.header-cta {
  flex-shrink: 0;
}

.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 16px;
  line-height: 1.15;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 24px;
  max-width: 36em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.hero-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-bullets li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-metrics {
  display: grid;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-row strong {
  font-size: 1.1rem;
}

.metric-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: rgba(8, 12, 24, 0.45);
  border-block: 1px solid var(--line);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 10px;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 52em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 140, 255, 0.35);
}

.feature-card img {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.spec-stack {
  display: grid;
  gap: 18px;
}

.spec-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.spec-card h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--primary-hover);
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.spec-list li {
  color: var(--muted);
  padding-left: 1em;
  position: relative;
}

.spec-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.price-card.featured {
  border-color: rgba(91, 140, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.15);
}

.price-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(245, 158, 11, 0.2);
  color: #ffd27a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.price-card h3 {
  margin: 0;
  font-size: 1.05rem;
  padding-right: 72px;
}

.price-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-original {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.95rem;
}

.price-sale {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
}

.download-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 20px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.download-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.download-notes {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.88rem;
}

.download-notes li {
  margin-bottom: 6px;
}

.canvas-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  overflow: hidden;
}

#flowCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 720px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.faq-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.faq-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-inner p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-muted {
  font-size: 0.82rem !important;
  opacity: 0.9;
}

.footer-link {
  color: var(--primary-hover);
}

/* --- 首屏主图（media.js heroImage） --- */
.hero-photo-wrap {
  margin: -6px -6px 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.hero-main-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  vertical-align: middle;
}

/* --- 详情页 --- */
.detail-main .detail-hero {
  padding-top: 40px;
  padding-bottom: 32px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

@media (min-width: 720px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.media-thumb {
  display: block;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, transform 0.15s;
}

.media-thumb:hover {
  border-color: rgba(91, 140, 255, 0.45);
  transform: translateY(-2px);
}

.media-thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.media-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.media-empty {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.sku-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.sku-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sku-card-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.25);
}

.sku-card-thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.sku-card-thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
}

.sku-card-body {
  padding: 14px 16px 16px;
}

.sku-card-id {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-hover);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.sku-card-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.video-strip {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .video-strip {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.video-card video {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #000;
}

.video-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- 灯箱 --- */
body.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 16px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(3, 7, 18, 0.88);
  cursor: pointer;
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1020px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox-panel > * {
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 25, 51, 0.95);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--line);
}

.lightbox-close:hover {
  background: rgba(91, 140, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(18, 25, 51, 0.92);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.lightbox-nav:hover {
  background: rgba(91, 140, 255, 0.3);
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 860px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  max-width: 56em;
  padding: 0 8px;
}
