:root {
  --bg: #000;
  --panel: #0b0c10;
  --line: rgba(255, 255, 255, .1);
  --text: #f5f6f8;
  --muted: #8b8f9b;
  --accent: #9aa7ff;
  --mint: #5ef0b0;
  --red: #ff6b6b;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(110, 125, 255, .16), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; }
.logo svg { width: 24px; height: 24px; }
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-white { background: #fff; color: #000; }
.btn-primary { background: var(--mint); color: #03130c; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }
.btn-block { width: 100%; }
.is-connected { background: transparent; color: var(--mint); border-color: rgba(94, 240, 176, .4); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 72px 0 56px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: pulse 2s infinite; }
h1 { margin: 18px 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.02; font-weight: 650; letter-spacing: -.035em; }
.grad { background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 480px; color: var(--muted); font-size: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-radar { width: 100%; aspect-ratio: 1; display: block; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stats div { padding: 20px 22px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

/* Sections */
section { padding: 72px 0; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-weight: 650; letter-spacing: -.03em; }
.section-lead { max-width: 560px; margin-top: 12px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card span { color: var(--accent); font-size: 13px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; font-weight: 600; }
.card p { color: var(--muted); font-size: 14px; }
.final { padding: 56px 24px; text-align: center; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, rgba(110, 125, 255, .14), transparent); }
.final .cta { justify-content: center; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer nav { display: flex; gap: 18px; }
footer a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* App */
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: pulse 2s infinite; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 16px 0 40px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; letter-spacing: 0; font-weight: 600; }
.radar-box { padding: 14px; }
#radar { display: block; width: 100%; aspect-ratio: 1; max-height: 560px; }
.legend { padding: 0 16px 14px; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; }
.tabs button { padding: 4px 11px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.tabs button.is-on { background: rgba(255, 255, 255, .1); color: var(--text); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.row:last-child { border-bottom: 0; }
.row:hover, .row.is-active { background: rgba(255, 255, 255, .05); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { font-weight: 600; }
.star { padding: 0; border: 0; background: none; color: #3b3e47; font-size: 17px; cursor: pointer; }
.star:hover { color: var(--muted); }
.star.is-on { color: #ffd166; }
.heat { position: relative; width: 74px; padding-bottom: 6px; text-align: right; }
.heat b { font-size: 16px; font-weight: 600; color: var(--accent); }
.heat i { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--accent); transition: width .5s ease; }
.heat.is-hot b { color: var(--mint); }
.heat.is-hot i { background: var(--mint); }
.tokens-panel { grid-column: 1 / -1; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 16px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
td { padding: 9px 16px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
.token { display: flex; align-items: center; gap: 10px; }
.token:hover b { color: var(--accent); }
.token img, .token-dot { width: 28px; height: 28px; border-radius: 50%; background: #1b1d24; object-fit: cover; flex: none; }
.token span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.token b { font-weight: 600; }
.token small { color: var(--muted); }
.up { color: var(--mint); }
.down { color: var(--red); }
.empty { padding: 26px 16px; color: var(--muted); text-align: center !important; }
.banner { margin-top: 14px; padding: 11px 16px; border: 1px solid rgba(255, 107, 107, .4); border-radius: 12px; color: var(--red); font-size: 14px; }
.note { padding-bottom: 28px; color: var(--muted); font-size: 12px; }

/* Modal and toasts */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal-card { position: relative; width: min(400px, 100%); padding: 26px; display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 18px; background: #0e0f14; }
.modal-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; padding-right: 24px; }
.modal-x { position: absolute; top: 14px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.field { display: grid; gap: 6px; font-size: 13px; }
.field input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #000; color: var(--text); font: inherit; }
.field input:focus { outline: 0; border-color: var(--accent); }
.form-error { color: var(--red); font-size: 13px; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; gap: 8px; }
.toast { padding: 11px 15px; border: 1px solid rgba(94, 240, 176, .4); border-radius: 12px; background: #0e0f14; font-size: 14px; animation: fade .25s ease; }

/* Motion layer */
.cursor-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(120, 135, 255, .1), transparent 70%);
}
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transform: scaleX(0); transform-origin: left;
}
.word, .rise {
  display: inline-block;
  opacity: 0; transform: translateY(.45em); filter: blur(6px);
  animation: rise .75s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--d) * 70ms + 100ms);
}
.rise { display: block; }
.pill.rise { display: inline-flex; }
.cta.rise { display: flex; }
.grad { padding-bottom: .08em; }

.tape {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  font-size: 13px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tape-track { display: flex; width: max-content; animation: tape 60s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape a { display: flex; gap: 7px; padding: 7px 18px; white-space: nowrap; }
.tape b { font-weight: 600; }

/* Scope glass: faint scanlines and a vignette above the canvas */
.scope { position: relative; }
.scope::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
.radar-box.scope::after { border-radius: 0; }
.hero-frame { transition: transform .25s ease-out; will-change: transform; }
.hero-radar { filter: drop-shadow(0 0 50px rgba(110, 125, 255, .18)); }
.radar-tip {
  position: absolute; top: 0; left: 0; z-index: 5;
  display: grid; gap: 1px; min-width: 150px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(10, 11, 16, .94); font-size: 12px; color: var(--muted);
  pointer-events: none;
}
.radar-tip[hidden] { display: none; }
.radar-tip b { color: var(--text); font-size: 13px; font-weight: 600; }

/* Landing extras */
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.leader {
  position: relative; display: grid; gap: 2px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  transition: transform .2s ease, border-color .2s ease;
}
.leader:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .25); }
.leader strong { font-size: 18px; font-weight: 600; }
.leader b { position: absolute; top: 16px; right: 20px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--accent); }
.leader b.up { color: var(--mint); }
.glow { position: relative; overflow: hidden; }
.glow::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 50%), rgba(154, 167, 255, .16), transparent 70%);
  transition: opacity .25s ease;
}
.glow:hover::before { opacity: 1; }
.meter { display: block; height: 3px; margin-top: 16px; border-radius: 3px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.meter::after {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1) .25s;
}
.is-in .meter::after { width: var(--w); }

.scene { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.scene-radar { position: sticky; top: 96px; display: grid; justify-items: center; gap: 14px; }
.scene-radar .scope { width: min(100%, 460px); aspect-ratio: 1; }
#demo-radar { display: block; width: 100%; height: 100%; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .4s ease; }
.step:last-child { min-height: 50vh; }
.step.is-on { opacity: 1; }
.step span { color: var(--accent); font-size: 13px; }
.step h3 { margin: 8px 0; font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.step p { max-width: 400px; color: var(--muted); font-size: 16px; }

.final { position: relative; overflow: hidden; }
.final > :not(.final-rings) { position: relative; }
.final-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.final-rings i {
  grid-area: 1 / 1; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(154, 167, 255, .35);
  animation: ring 4.5s ease-out infinite;
}
.final-rings i:nth-child(2) { animation-delay: 1.5s; }
.final-rings i:nth-child(3) { animation-delay: 3s; }

/* App extras */
.pulse { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.pulse div { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.pulse b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share { display: flex; gap: 3px; height: 26px; margin-top: 14px; }
.share button {
  flex-basis: 0; min-width: 6px; padding: 0 8px; overflow: hidden;
  border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(154, 167, 255, calc(.14 + var(--heat) * .4));
  color: var(--text); font: inherit; font-size: 11px; white-space: nowrap; text-align: left;
  transition: flex-grow .6s ease, outline-color .15s;
  outline: 1px solid transparent;
}
.share button.is-hot { background: rgba(94, 240, 176, .4); }
.share button.is-active, .share button:hover { outline-color: rgba(255, 255, 255, .6); }
.app { padding-top: 14px; }
.tools { display: flex; gap: 4px; }
.tools button {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer;
}
.tools button:hover { color: var(--text); }
.tools button.is-on { color: var(--mint); border-color: rgba(94, 240, 176, .4); }
.switcher { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 16px 12px; }
.switcher span { font-size: 14px; font-weight: 600; text-align: center; }
.switcher button {
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.switcher button:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.rank { margin-left: 4px; font-size: 11px; font-weight: 500; }
.spark { width: 64px; height: 22px; flex: none; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.spark.is-hot polyline { stroke: var(--mint); }
.row.is-flash { animation: flash 1.2s ease; }
.search {
  width: 200px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #000; color: var(--text); font: inherit; font-size: 13px;
}
.search:focus { outline: 0; border-color: var(--accent); }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover, th.is-sorted { color: var(--text); }
th.is-sorted::after { content: attr(data-dir); margin-left: 4px; font-size: 9px; }
tbody tr { animation: rowIn .4s ease backwards; animation-delay: calc(var(--i) * 22ms); }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
.press { display: inline-block; width: 74px; height: 5px; vertical-align: middle; border-radius: 3px; background: rgba(255, 107, 107, .55); overflow: hidden; }
.press i { display: block; height: 100%; background: var(--mint); }
.keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
kbd {
  min-width: 20px; padding: 1px 6px; text-align: center;
  border: 1px solid var(--line); border-radius: 5px; background: var(--panel);
  font: 11px ui-monospace, Consolas, monospace; color: var(--text);
}
.is-focus { overflow: hidden; }
.is-focus .radar-panel { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; border: 0; border-radius: 0; background: #000; }
.is-focus .radar-box { flex: 1; min-height: 0; }
.is-focus #radar { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
@keyframes tape { to { transform: translateX(-50%); } }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
@keyframes flash { 0% { background: rgba(154, 167, 255, .22); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 860px) {
  .hero, .app, .cards { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .nav-links, .nav .status { display: none; }
  .logo, .btn { white-space: nowrap; }
  .stats { grid-template-columns: 1fr; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .leaders, .scene { grid-template-columns: 1fr; }
  .pulse { grid-template-columns: 1fr 1fr; }
  .scene { gap: 24px; }
  .scene-radar { top: 64px; z-index: 2; padding: 10px 0; background: #000; }
  .scene-radar .scope { width: min(70vw, 300px); }
  .step { min-height: 46vh; }
  .keys { display: none; }
  .spark { display: none; }
  .search { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill i, .status::before, .final-rings i, tbody tr, .row.is-flash { animation: none; }
  .word, .rise { animation: none; opacity: 1; transform: none; filter: none; }
  .tape-track { animation: none; }
  .hero-frame { transition: none; }
}
