:root {
  --bg: #0b0f14;
  --bg-alt: #111820;
  --card: #151d28;
  --border: #243044;
  --text: #e8edf5;
  --muted: #9aa8bc;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.brand { color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.nav { display: flex; gap: 1.25rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }

.lang-toggle {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 0.4rem 0.95rem; font: inherit; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--accent); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.1rem; border-radius: 10px;
  text-decoration: none; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: 0.2s;
}
.btn-sm { font-size: 0.9rem; background: var(--card); border-color: var(--border); color: var(--text); }
.btn-primary { background: linear-gradient(135deg, #2563eb, #22c55e); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-block { width: 100%; margin-top: 0.5rem; font-size: 1.05rem; padding: 0.85rem; }

.hero {
  padding: 5rem 0 3.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(34, 197, 94, 0.12), transparent);
}
.pill {
  display: inline-block; padding: 0.35rem 0.85rem; border-radius: 999px;
  background: rgba(34, 197, 94, 0.15); color: #86efac; font-size: 0.9rem; font-weight: 600;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 1rem 0; }
.gradient {
  background: linear-gradient(90deg, #60a5fa, #4ade80);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { max-width: 640px; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0 2.5rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 720px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.stat strong { display: block; font-size: 1.4rem; color: #fff; }
.stat span { color: var(--muted); font-size: 0.9rem; }

.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: 2rem; margin: 0 0 0.5rem; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 2.5rem; }

.grid.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.card .icon { font-size: 1.6rem; margin-bottom: 0.5rem; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.step {
  text-align: center; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1rem;
}
.step-num { font-size: 1.8rem; margin-bottom: 0.5rem; }
.step h3 { margin: 0 0 0.5rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.redeem-box {
  max-width: 980px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 1.75rem;
  box-shadow: var(--shadow);
}
.redeem-box h3 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.redeem-hint { color: var(--muted); margin: 0 0 1rem; }
.alert {
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d; border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.92rem; margin-bottom: 1.25rem;
}
.token-row {
  display: grid; grid-template-columns: 2fr 1fr; gap: 1.4rem; align-items: start;
  margin-bottom: 1rem;
}
.token-guide { margin: 0; }
.token-guide a { display: block; cursor: zoom-in; }
.token-guide img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 10px; background: #0d1219;
}
.token-guide figcaption {
  margin-top: 0.5rem; color: var(--muted); font-size: 0.86rem; line-height: 1.55;
}
.token-field { margin-bottom: 0; }
.token-field textarea { min-height: 200px; }

label { display: block; margin-bottom: 1rem; }
label span { display: block; font-weight: 600; margin-bottom: 0.25rem; }
label small { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.45rem; }
input, textarea {
  width: 100%; background: #0d1219; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 0.75rem 0.9rem;
  font: inherit; resize: vertical;
}
input:focus, textarea:focus { outline: 2px solid rgba(59, 130, 246, 0.45); border-color: var(--accent); }

.result {
  margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 10px; font-size: 0.95rem;
}
.result.hidden { display: none; }
.result.ok { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); color: #bbf7d0; }
.result.err { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.4); color: #fecaca; }
.result.pending { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.4); color: #bfdbfe; }
.result a { color: #86efac; }
.result .errcode {
  display: inline-block; margin-top: 0.5rem; padding: 0.3rem 0.6rem;
  background: rgba(239, 68, 68, 0.18); border: 1px dashed rgba(239, 68, 68, 0.5);
  border-radius: 8px; font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.03em;
}

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1.1rem; margin-bottom: 0.65rem;
}
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { color: var(--muted); margin: 0.6rem 0 0; }

.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; color: var(--muted);
}

@media (max-width: 768px) {
  .nav { display: none; }
  .stats { grid-template-columns: 1fr; }
  .token-row { grid-template-columns: 1fr; }
}
