/* ================= 设计令牌 ================= */
:root {
  /* 品牌色：现代靛蓝主色 + 暖橙强调 */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-soft: #eef2ff;
  --color-accent: #f97316;
  --color-accent-hover: #ea580c;

  /* 中性色 */
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-text-2: #475569;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-code-bg: #f1f5f9;

  /* 状态色 */
  --color-success: #10b981;
  --color-warn: #f59e0b;
  --color-error: #ef4444;

  /* 渐变 */
  --grad-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4f46e5 100%);
  --grad-cta: linear-gradient(135deg, #f97316 0%, #ef4444 100%);

  /* 阴影 / 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 8px 32px rgba(79, 70, 229, 0.35);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ================= 基础 ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--color-accent); }

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-primary);
  font-size: 0.85em;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--color-muted); font-size: 14px; }

/* ================= 导航 ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
}
.brand:hover { color: var(--color-primary); }
.brand-logo {
  width: 32px; height: 32px;
  background: var(--grad-hero);
  border-radius: 8px;
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow-glow);
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--color-text-2);
  font-size: 14px; font-weight: 500;
}
.nav-links a:hover { color: var(--color-primary); }
.nav-cta {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white !important;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover {
  background: var(--color-primary-hover);
  color: white !important;
  transform: translateY(-1px);
}

/* ================= Hero ================= */
.hero {
  position: relative;
  background: var(--grad-hero);
  color: white;
  padding: 80px 0 100px;
  overflow: hidden;
  isolation: isolate;
}
/* 网格点阵背景 */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  z-index: -1;
}
/* 顶部光晕 */
.hero::after {
  content: "";
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.25) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero-eyebrow .dot {
  width: 8px; height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero h1 .highlight {
  background: linear-gradient(120deg, #fbbf24 0%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-cta);
  color: white;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.5);
  color: white;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
}
.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(120deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 13px;
  opacity: 0.75;
}

/* QR 卡片 */
.qr-card {
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  backdrop-filter: blur(20px);
}
.qr-card-tag {
  position: absolute;
  top: -10px; left: 24px;
  background: var(--grad-cta);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.qr-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--color-text);
}
.qr-card .qr-hint {
  color: var(--color-muted);
  font-size: 13px;
  margin-bottom: 18px;
}
.qr-card .qr-image {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  padding: 12px;
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.qr-card .qr-image img {
  display: block;
  width: 200px; height: 200px;
  border-radius: 6px;
  background: white;
  padding: 4px;
}
.qr-card ol {
  margin: 0; padding-left: 22px;
  font-size: 14px;
  color: var(--color-text-2);
  line-height: 1.9;
}
.qr-card ol li::marker { color: var(--color-primary); font-weight: 700; }
.qr-card ol kbd {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  padding: 1px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* ================= Section 通用 ================= */
section.block {
  padding: 72px 0;
}
section.block.alt { background: var(--color-bg-alt); }
.section-head {
  text-align: center;
  margin-bottom: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  color: var(--color-text);
}
.section-head p {
  font-size: 16px;
  color: var(--color-text-2);
  line-height: 1.6;
}

/* ================= 核心功能（双栏） ================= */
.feature-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.tool-panel {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  position: relative;
}
.tool-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 3px;
  background: var(--grad-hero);
  border-radius: 0 0 4px 4px;
}
.tool-panel h2 {
  font-size: 22px;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.tool-panel .panel-sub {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* 表单 */
.form-grid {
  display: grid;
  gap: 16px;
}
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-2);
  margin-bottom: 6px;
}
.form-field label .label-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: var(--color-muted);
  font-weight: 500;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-mono);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
  color: var(--color-text);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.form-field .input-row {
  display: flex;
  gap: 8px;
}
.form-field .input-row input { flex: 1; }

.token-status {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
}
.token-status.ok { color: var(--color-success); }
.token-status.err { color: var(--color-error); }
.token-status::before {
  content: "•";
  font-size: 16px;
  line-height: 1;
}
.token-status.ok::before { color: var(--color-success); }
.token-status.err::before { color: var(--color-error); }

.form-actions {
  display: flex; gap: 12px; margin-top: 8px;
}
.form-actions .btn-primary { flex: 1; }

/* 步骤引导 */
.steps {
  display: grid;
  gap: 16px;
}
.step {
  display: flex;
  gap: 16px;
  padding: 18px;
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--color-primary-soft);
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad-hero);
  color: white;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.step-body h4 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--color-text);
}
.step-body p {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}
.step-body code {
  margin-top: 6px;
  display: inline-block;
  word-break: break-all;
}

/* 结果区 */
.result-panel {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border-radius: var(--radius);
  border: 1.5px solid var(--color-primary-soft);
}
.result-panel .result-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.copy-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.copy-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--color-primary-soft);
  border-radius: 8px;
  background: white;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-2);
}
.btn-icon {
  padding: 0 16px;
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  font-size: 14px;
  transition: all 0.15s;
}
.btn-icon:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-block { width: 100%; }

/* ================= 优势特性 ================= */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-soft);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature-icon.gradient-1 { background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%); }
.feature-icon.gradient-2 { background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%); }
.feature-icon.gradient-3 { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.feature-icon.gradient-4 { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--color-text);
}
.feature-card p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.55;
}

/* ================= 适用场景 ================= */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.usecase {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-text-2);
  transition: all 0.15s;
}
.usecase:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateX(2px);
}
.usecase-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-success);
  color: white;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}

/* ================= FAQ ================= */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item.open {
  border-color: var(--color-primary-soft);
  box-shadow: var(--shadow-sm);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  font-family: inherit;
  transition: color 0.15s;
}
.faq-q:hover { color: var(--color-primary); }
.faq-q::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--color-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); color: var(--color-primary); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner {
  padding: 0 22px 20px;
  color: var(--color-text-2);
  font-size: 14px;
  line-height: 1.7;
}

/* ================= CTA 横幅 ================= */
.cta-banner {
  background: var(--grad-hero);
  color: white;
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.1) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.5;
}
.cta-banner > * { position: relative; }
.cta-banner h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.cta-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ================= 页脚 ================= */
footer.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 56px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.15s;
}
.footer-col a:hover { color: white; }
.footer-brand p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 16px;
  max-width: 280px;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================= Trending 弹窗（共用） ================= */
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-content h2 { margin-bottom: 12px; font-size: 20px; }
.modal-content input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  margin-top: 12px;
  font-family: inherit;
  font-size: 14px;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-muted);
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--color-border); color: var(--color-text); }

/* ================= 响应式 ================= */
@media (max-width: 900px) {
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 36px; }
  .hero p.lead { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 28px; }
  section.block { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-banner { padding: 40px 24px; }
  .cta-banner h2 { font-size: 24px; }
  .hero-stats { gap: 24px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 30px; }
  .tool-panel { padding: 20px; }
  .input-row, .copy-row, .form-actions { flex-direction: column; }
  .form-actions .btn-primary { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
}
