:root {
  --bg: #0b0f14;
  --panel: #121821;
  --panel2: #0f141c;
  --panel-hover: #161f2c;
  --border: #1f2937;
  --border-glow: rgba(52, 211, 153, 0.35);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #34d399;
  --accent2: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --radius: 14px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tap-min: 40px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 560px at 15% -8%, rgba(16, 185, 129, 0.16) 0%, transparent 60%),
    radial-gradient(900px 520px at 88% 8%, rgba(52, 211, 153, 0.09) 0%, transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 15%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 15%, #000 35%, transparent 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: #a7f3d0;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

.skip-link {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #04120c;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* ---------- 顶部导航 ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 15, 20, 0.8);
  border-bottom: 1px solid rgba(31, 41, 55, 0.75);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

header.scrolled {
  background: rgba(11, 15, 20, 0.95);
  border-bottom-color: rgba(52, 211, 153, 0.22);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: var(--tap-min);
}

.logo:hover {
  text-decoration: none;
  color: var(--text);
}

.logo-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulseDot 2.4s infinite ease-in-out;
}

.logo span {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--accent);
  background: rgba(5, 46, 26, 0.65);
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}

.badge-live {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s infinite;
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

nav a {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.22s var(--ease);
}

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

nav a:hover::after {
  width: 100%;
}

.spacer {
  flex: 1 1 auto;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 语言切换 ---------- */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--border);
}

.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 11px;
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-switch button:hover {
  color: var(--text);
}

.lang-switch button.active {
  background: rgba(52, 211, 153, 0.16);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 10px 16px;
  min-height: var(--tap-min);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  border-color: #3b4c63;
  background: var(--panel-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #04120c;
  border: none;
  box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.45);
}

.btn.primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 28px -6px rgba(52, 211, 153, 0.6);
  text-decoration: none;
}

.btn.lg {
  padding: 13px 22px;
  min-height: 46px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn .arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 28px;
  align-items: center;
}

.hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #6ee7b7, var(--accent), #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 16px);
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

.metric-box {
  background: rgba(18, 24, 33, 0.65);
  border: 1px solid rgba(31, 41, 55, 0.9);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.metric-box:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.metric-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.metric-lbl {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, rgba(22, 30, 42, 0.78) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.card:hover {
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: 0 14px 34px -18px rgba(16, 185, 129, 0.35);
}

.card.lift:hover {
  transform: translateY(-4px);
}

.hero-card {
  animation: floatCard 6s ease-in-out infinite;
}

.hero-card:hover {
  animation-play-state: paused;
  transform: translateY(-3px);
}

.card-title {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.16);
  font-size: 14px;
  min-width: 0;
}

.kv:last-child {
  border-bottom: none;
}

.kv .k {
  color: var(--muted);
  flex: 0 1 auto;
}

.kv .v {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}

.kv .v.good {
  color: var(--accent);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

/* ---------- 区块 ---------- */
section.block {
  padding: 40px 0;
  scroll-margin-top: 76px;
}

.section-head {
  margin-bottom: 20px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 68ch;
}

.brand-p1 {
  margin: 0 0 12px;
}

.brand-p2 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.products-grid {
  margin-bottom: 20px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.25);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.card:hover .icon-badge {
  transform: scale(1.06) rotate(-2deg);
  background: rgba(52, 211, 153, 0.2);
}

.feat-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.feat-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 交互预览 ---------- */
.playground {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  align-items: start;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--panel2);
  border: 1px solid #2b3748;
  border-radius: 11px;
  padding: 4px 6px 4px 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}

.input-group input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px; /* 防止 iOS 聚焦自动放大 */
  padding: 9px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.suffix-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(52, 211, 153, 0.12);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  font-size: 12.5px;
  padding: 6px 11px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: all 0.18s var(--ease);
}

.chip:hover,
.chip.active {
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.1);
}

.preview-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.preview-cta-wrap {
  margin-top: 14px;
}

.preview-screen {
  background: var(--panel2);
  border: 1px solid #243041;
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}

.preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 12px;
}

.domain-hero-name {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 800;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.domain-hero-name span {
  color: var(--accent);
}

.status-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
  max-width: 100%;
}

.status-pill.warn {
  background: rgba(251, 191, 36, 0.14);
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.35);
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.col-stage { width: 20%; }
.col-state { width: 38%; }
.col-tip { width: 42%; }

th, td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.85);
  vertical-align: top;
}

th {
  background: var(--panel2);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}

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

tbody tr {
  transition: background 0.18s var(--ease);
}

tbody tr:hover {
  background: rgba(52, 211, 153, 0.04);
}

/* ---------- 步骤 ---------- */
.step-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #04120c;
  background: var(--accent);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* ---------- 文档链接 ---------- */
.doc-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  min-height: 52px;
  border-radius: 10px;
  background: var(--panel2);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  min-width: 0;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.doc-info {
  min-width: 0;
}

.doc-item:hover {
  border-color: rgba(52, 211, 153, 0.42);
  background: var(--panel-hover);
  transform: translateX(3px);
  text-decoration: none;
}

.doc-item .sub {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-top: 2px;
}

.doc-item .go {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

details.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 18px;
  transition: border-color 0.2s var(--ease);
}

details.faq-item[open] {
  border-color: rgba(52, 211, 153, 0.35);
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  min-height: 48px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary .plus {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  flex: 0 0 auto;
  transition: transform 0.25s var(--ease);
}

details.faq-item[open] summary .plus {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  animation: fadeSlideIn 0.25s var(--ease);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-dot, .badge-live, .hero-card { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .card, .doc-item, details.faq-item summary .plus { transition: none !important; }
}

footer {
  margin-top: 44px;
  border-top: 1px solid var(--border);
  padding: 24px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 平板与手机端适配 ---------- */
@media (max-width: 960px) {
  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .playground,
  .grid3,
  .grid2,
  .grid4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-card {
    animation: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .nav-inner {
    gap: 8px;
  }

  .spacer {
    display: none;
  }

  .header-controls {
    margin-left: auto;
  }

  nav {
    order: 5;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 14px;
    padding: 4px 2px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-cta {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero-actions .btn.lg {
    width: 100%;
  }

  .card,
  .preview-screen {
    padding: 16px;
  }

  .kv {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 8px 0;
  }

  .kv .v {
    text-align: left;
  }

  /* 移动端表格转为卡片式堆叠，避免横向挤压 */
  .table-wrap {
    border: none;
    background: transparent;
    overflow-x: visible;
  }

  table, thead, tbody, tr, th, td {
    display: block;
    width: 100%;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  tbody tr {
    background: linear-gradient(180deg, rgba(22, 30, 42, 0.78) 0%, var(--panel) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
  }

  tbody tr:last-child {
    margin-bottom: 0;
  }

  td {
    border-bottom: 1px dashed rgba(148, 163, 184, 0.14);
    padding: 8px 0;
    font-size: 13.5px;
  }

  td:first-child {
    padding-top: 0;
    font-size: 15px;
    color: var(--accent);
  }

  td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  td[data-label]::before {
    content: attr(data-label) "：";
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 2px;
  }

  td:first-child[data-label]::before {
    display: none;
  }
}
