@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:            #060610;
  --surface:       #0c0c1d;
  --card:          #0f0f22;
  --card-hover:    #131328;
  --border:        #1a1a35;
  --border-mid:    #22223f;
  --border-glow:   rgba(99,102,241,.3);
  --primary:       #6366f1;
  --primary-dim:   rgba(99,102,241,.1);
  --primary-glow:  rgba(99,102,241,.06);
  --primary-h:     #818cf8;
  --primary-light: #a5b4fc;
  --violet:        #8b5cf6;
  --violet-dim:    rgba(139,92,246,.1);
  --text:          #f0f0ff;
  --text-dim:      #8b8bbd;
  --text-muted:    #42425a;
  --success:       #10b981;
  --success-dim:   rgba(16,185,129,.1);
  --warning:       #f59e0b;
  --error:         #ef4444;
  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     6px;
  --shadow:        0 8px 40px rgba(0,0,0,.5);
  --shadow-glow:   0 0 60px rgba(99,102,241,.1);
  --font:          'Inter', system-ui, sans-serif;
  --mono:          'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary-h); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.section    { padding: 100px 0; }
.section-sm { padding: 60px 0; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,6,16,.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.nav-logo-mark {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(99,102,241,.55));
  animation: logo-pulse 3.5s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(99,102,241,.45)); }
  50%       { filter: drop-shadow(0 0 18px rgba(99,102,246,.85)); }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links .cta {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff !important;
  padding: 8px 20px;
  box-shadow: 0 0 24px rgba(99,102,241,.3);
}
.nav-links .cta:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 28px rgba(99,102,241,.4); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

/* Dot-grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 80%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 25% 55%, rgba(99,102,241,.09) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 75% 20%, rgba(139,92,246,.07) 0%, transparent 55%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .78rem;
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--primary); }
  50%       { opacity: .6; box-shadow: 0 0 4px var(--primary); }
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--violet) 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 450px;
  margin-bottom: 36px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Hero code panel */
.hero-code {
  background: rgba(15,15,34,.85);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(99,102,241,.05);
  position: relative;
}
.hero-code::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,.04) 0%, transparent 60%);
  pointer-events: none;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,24,.6);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }
.code-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-muted);
}
pre {
  padding: 22px;
  font-family: var(--mono);
  font-size: .81rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #8b8bbd;
}
.tok-key     { color: #818cf8; }
.tok-str     { color: #86efac; }
.tok-fn      { color: #fcd34d; }
.tok-val     { color: #fca5a5; }
.tok-comment { color: #3d3d60; }
.tok-num     { color: #f9a8d4; }

/* ── Stats bar ───────────────────────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99,102,241,.03) 0%, transparent 100%);
  padding: 36px 0;
}
.stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  padding: 0 52px;
  position: relative;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 1px;
  background: var(--border);
}
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Section head ────────────────────────────────────────────────────── */
.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-desc {
  color: var(--text-dim);
  font-size: .97rem;
  max-width: 520px;
  line-height: 1.75;
}
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .section-label { justify-content: center; }
.section-head.center .section-label::before { display: none; }
.section-head.center .section-desc { margin: 0 auto; }

/* ── Features ────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.3), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.feature-card:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--primary-dim);
  border: 1px solid rgba(99,102,241,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 18px;
}
.feature-title { font-weight: 700; font-size: .97rem; margin-bottom: 8px; }
.feature-desc  { color: var(--text-dim); font-size: .875rem; line-height: 1.65; }

/* ── Pricing ─────────────────────────────────────────────────────────── */
.pricing-tabs {
  display: inline-flex;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 36px;
}
.pricing-tab {
  padding: 8px 22px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: none;
  transition: all .15s;
  letter-spacing: .01em;
}
.pricing-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,.35);
}
.pricing-panel { display: none; }
.pricing-panel.active { display: block; }

/* Pricing table */
.pricing-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pricing-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pricing-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.015);
}
.pricing-table td {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(26,26,53,.8);
  transition: background .15s;
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover td { background: rgba(99,102,241,.04); }
.pricing-table .price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.pricing-table .per-conv {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: .8rem;
}

/* Plan cards */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: default;
}
.plan-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(99,102,241,.1);
}
.plan-card.popular {
  border-color: rgba(99,102,241,.4);
  background: linear-gradient(160deg, rgba(99,102,241,.08) 0%, var(--card) 60%);
}
.plan-card.popular::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--violet));
}
.plan-badge {
  position: absolute;
  top: 12px; right: 16px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.plan-name  { font-weight: 600; font-size: .9rem; color: var(--text-dim); margin-bottom: 10px; }
.plan-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  margin-bottom: 4px;
}
.plan-price span { font-size: .9rem; font-weight: 400; color: var(--text-dim); }
.plan-per   { font-size: .78rem; color: var(--text-muted); margin-bottom: 20px; }
.plan-features { list-style: none; }
.plan-features li {
  font-size: .84rem;
  color: var(--text-dim);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(26,26,53,.6);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: .78rem;
  flex-shrink: 0;
}

.plan-unlimited {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
  border-color: rgba(99,102,241,.3);
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}
.plan-unlimited::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--violet), #c084fc);
}

/* ── API Preview ─────────────────────────────────────────────────────── */
.api-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.api-endpoint:hover { border-color: var(--border-mid); }
.method-badge {
  background: var(--primary-dim);
  color: var(--primary-h);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  letter-spacing: .04em;
}
.method-badge.ws {
  background: rgba(16,185,129,.1);
  color: var(--success);
}
.method-badge.del {
  background: rgba(239,68,68,.1);
  color: var(--error);
}
.endpoint-path {
  font-family: var(--mono);
  font-size: .84rem;
  color: var(--text-dim);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.3);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-mid);
}
.btn-outline:hover {
  border-color: var(--border-glow);
  color: var(--text);
  background: rgba(99,102,241,.06);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }

.btn-lg { padding: 14px 30px; font-size: .97rem; }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-xs); }
.btn-full { width: 100%; justify-content: center; }
.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,.25);
}
.btn-success:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(16,185,129,.35); }

/* ── Tags ────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-dim);
  border: 1px solid rgba(99,102,241,.18);
  color: var(--primary-h);
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .02em;
}
.tag.green {
  background: var(--success-dim);
  border-color: rgba(16,185,129,.18);
  color: var(--success);
}
.tag.violet {
  background: var(--violet-dim);
  border-color: rgba(139,92,246,.2);
  color: #a78bfa;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: rgba(12,12,29,.4);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-copy { color: var(--text-muted); font-size: .83rem; }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  color: var(--text-muted);
  font-size: .83rem;
  transition: color .15s;
}
.footer-links a:hover { color: var(--text-dim); }

.divider { height: 1px; background: var(--border); }

/* ── Buy page ────────────────────────────────────────────────────────── */
.buy-layout {
  max-width: 780px;
  margin: 0 auto;
  padding: 52px 24px 96px;
}
.buy-title    { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; margin-bottom: 6px; }
.buy-subtitle { color: var(--text-dim); font-size: .92rem; margin-bottom: 40px; }

.steps {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 600;
}
.step-item.active { color: var(--text); }
.step-item.done   { color: var(--success); }
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-item.active .step-num {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 14px rgba(99,102,241,.4);
}
.step-item.done .step-num {
  background: var(--success);
  border-color: transparent;
  color: #fff;
}
.step-sep {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 10px;
  max-width: 48px;
}

.buy-section { display: none; }
.buy-section.active { display: block; }

.plan-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.plan-option {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.plan-option:hover { border-color: var(--border-mid); background: var(--card-hover); }
.plan-option.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 0 1px rgba(99,102,241,.15), 0 0 24px rgba(99,102,241,.08);
}
.plan-option-type {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.plan-option-name  { font-weight: 600; font-size: .88rem; color: var(--text-dim); }
.plan-option-price { font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; }
.plan-option-per   { font-size: .75rem; color: var(--text-muted); }

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.pay-method {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .15s;
}
.pay-method:hover { border-color: var(--border-mid); background: var(--card-hover); }
.pay-method.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
}
.pay-method-icon { font-size: 1.5rem; }
.pay-method-name { font-weight: 700; font-size: .92rem; }
.pay-method-desc { font-size: .8rem; color: var(--text-dim); margin-top: 1px; }
.pay-method-badge {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pay-method-badge.auto   { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.pay-method-badge.manual { background: rgba(245,158,11,.08); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }

.payment-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
}
.payment-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 14px;
}
.copy-field code {
  font-family: var(--mono);
  font-size: .83rem;
  color: var(--primary-light);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.15);
  color: var(--primary-h);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: .75rem;
  font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
}
.copy-btn:hover { background: rgba(99,102,241,.15); color: var(--text); }

.amount-highlight {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--primary-light), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245,158,11,.06);
  border: 1px solid rgba(245,158,11,.15);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .83rem;
  color: #fbbf24;
  line-height: 1.55;
}
.notice-icon { font-size: .95rem; flex-shrink: 0; margin-top: 1px; }

.success-box { text-align: center; padding: 48px 0; }
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--success-dim);
  border: 1px solid rgba(16,185,129,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 22px;
  box-shadow: 0 0 40px rgba(16,185,129,.12);
}
.success-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.success-desc  { color: var(--text-dim); font-size: .9rem; margin-bottom: 28px; line-height: 1.65; }
.api-key-reveal {
  background: var(--surface);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: .88rem;
  word-break: break-all;
  margin-bottom: 16px;
  color: var(--primary-light);
  text-align: left;
  box-shadow: 0 0 30px rgba(99,102,241,.08);
}

/* ── Docs page ───────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - 66px);
}
.docs-sidebar {
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 30px 14px;
}
.docs-sidebar::-webkit-scrollbar { width: 3px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }
.sidebar-group { margin-bottom: 28px; }
.sidebar-group-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px 10px;
}
.sidebar-link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  font-size: .83rem;
  color: var(--text-dim);
  transition: all .15s;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,.03); }
.sidebar-link.active {
  color: var(--primary-h);
  background: var(--primary-dim);
  font-weight: 600;
}

.docs-content {
  padding: 48px 60px 96px;
  max-width: 860px;
}
.docs-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 56px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.docs-content h2:first-child { border-top: none; margin-top: 0; }
.docs-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}
.docs-content p {
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.docs-content ul {
  margin: 0 0 16px 20px;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.75;
}
.docs-content code {
  font-family: var(--mono);
  font-size: .8rem;
  background: var(--card);
  border: 1px solid var(--border-mid);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--primary-h);
}
.code-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.72;
  overflow-x: auto;
  margin-bottom: 22px;
  color: #6b6b9a;
  white-space: pre;
}
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: .86rem;
}
.param-table th {
  text-align: left;
  padding: 9px 14px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.012);
}
.param-table td { padding: 11px 14px; border-bottom: 1px solid rgba(26,26,53,.7); color: var(--text-dim); }
.param-table tr:last-child td { border-bottom: none; }
.param-name { font-family: var(--mono); font-size: .82rem; color: var(--primary-h) !important; }
.param-type { color: var(--text-muted) !important; font-family: var(--mono); font-size: .78rem; }
.param-required { color: var(--error); font-size: .72rem; }
.param-optional { color: var(--text-muted); font-size: .72rem; }
.response-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.response-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,.015);
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-muted);
}
.status-badge { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 4px; }
.status-200 { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.status-4xx { background: rgba(239,68,68,.08); color: var(--error); border: 1px solid rgba(239,68,68,.2); }
.response-body {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: .79rem;
  line-height: 1.65;
  color: var(--text-dim);
}

/* ── Utility ─────────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted) !important; }
.text-dim     { color: var(--text-dim) !important; }
.text-primary { color: var(--primary-h) !important; }
.text-success { color: var(--success) !important; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* Loading spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-size: .86rem;
  color: var(--text);
  z-index: 9999;
  box-shadow: var(--shadow);
  transform: translateY(80px) scale(.97);
  opacity: 0;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  max-width: 340px;
}
#toast.show { transform: translateY(0) scale(1); opacity: 1; }
#toast.success { border-color: rgba(16,185,129,.3); color: var(--success); }
#toast.error   { border-color: rgba(239,68,68,.3); color: var(--error); }

/* ── Comparison table ────────────────────────────────────────────────── */
.comparison-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.comparison-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.comparison-table thead tr {
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-muted);
}
.comparison-table td { padding: 14px 20px; border-bottom: 1px solid rgba(26,26,53,.7); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover td { background: rgba(255,255,255,.015); }
.comp-us   { color: var(--primary-h); font-weight: 700; }
.comp-them { color: var(--text-muted); font-weight: 600; }
.comp-param { color: var(--text-dim); font-weight: 500; }
.comp-good { color: var(--text); }
.comp-bad  { color: var(--text-muted); }
.comp-check { color: var(--success); font-weight: 800; margin-right: 4px; }
.comp-cross { color: var(--error);   font-weight: 800; margin-right: 4px; opacity: .7; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: .93rem;
  user-select: none;
  transition: background .15s;
  gap: 16px;
}
.faq-q:hover { background: rgba(255,255,255,.02); }
.faq-q.open  { background: rgba(99,102,241,.04); }
.faq-icon {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
}
.faq-q.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.75;
}
.faq-a.open { display: block; }
.faq-a code {
  font-family: var(--mono);
  font-size: .8rem;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--primary-h);
}
.faq-a a { color: var(--primary-h); }

/* ── Copy code button ────────────────────────────────────────────────── */
.copy-code-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.15);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  padding: 4px 11px;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
  letter-spacing: .02em;
}
.copy-code-btn:hover { background: rgba(99,102,241,.18); color: var(--primary-h); border-color: rgba(99,102,241,.3); }

/* ── Dashboard route ─────────────────────────────────────────────────── */
/* (dashboard styles are inline in dashboard.html for self-containment) */

/* Responsive */
@media (max-width: 960px) {
  .hero-inner  { grid-template-columns: 1fr; }
  .hero-code   { display: none; }
  .api-preview { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .docs-content { padding: 30px 24px 60px; }
  .stat { padding: 0 32px; }
  .plan-unlimited { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .section  { padding: 64px 0; }
  .buy-layout { padding: 36px 20px 64px; }
}
