:root {
  --bg: #f6f9ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.09);
  --blue: #0066ff;
  --blue-dark: #0050cc;
  --blue-soft: rgba(0, 102, 255, 0.1);
  --accent: #0ea5e9;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, #60a5fa, transparent 70%);
}

.orb-2 {
  width: 460px;
  height: 460px;
  bottom: -140px;
  right: -120px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
}

.topbar {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.25);
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lang-btn:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.container {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hero {
  text-align: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid rgba(0, 102, 255, 0.16);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

h1 {
  margin: 18px auto 14px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(120deg, var(--blue), #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  max-width: 650px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 16px;
}

.code-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  text-align: left;
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.code-card-header .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.quota-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.16);
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f1f5ff;
  border: 1.5px dashed rgba(0, 102, 255, 0.35);
}

.code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--blue-dark);
  user-select: all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.actions-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.btn-cta {
  background: #0f172a;
  color: #fff;
}

.btn-cta:hover {
  background: #1e293b;
}

.btn-ghost {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--blue);
}

.urgency-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.urgency-note code,
.step-card code {
  background: rgba(15, 23, 42, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.features-section,
.steps-section,
.spread-section,
.faq-section {
  margin-top: 52px;
}

h2 {
  text-align: center;
  font-size: 24px;
  margin: 0 0 22px;
}

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

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.step-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.step-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.spread-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.spread-title {
  text-align: left;
  font-size: 22px;
  margin: 12px 0 8px;
}

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

.template-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.template-preview {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.spread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.spread-right {
  display: flex;
  justify-content: center;
}

.qr-frame {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-frame img {
  display: block;
  border-radius: 10px;
}

.qr-code-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--blue-dark);
  background: var(--blue-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

.qr-caption {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}

summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 18px 20px 34px;
  font-size: 13px;
  color: var(--muted);
}

.footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .steps-grid,
  .spread-card,
  .actions-row {
    grid-template-columns: 1fr;
  }
  .code-box {
    justify-content: center;
    text-align: center;
  }
}
