:root {
  --bg: #07070b;
  --panel: rgba(22, 22, 32, .72);
  --line: rgba(255, 255, 255, .10);
  --text: #eef0f6;
  --dim: #7d8194;
  --lime: #c6ff3d;
  --violet: #8b5cf6;
  --reel-h: 92px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 18% 8%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(800px 620px at 82% 100%, rgba(198, 255, 61, .10), transparent 62%),
    radial-gradient(1200px 800px at 50% 50%, rgba(20, 20, 34, .9), #05050a 75%);
  pointer-events: none;
}

.top {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 26px 40px 0;
}

.brand {
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--dim);
}

.stage {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--lime);
  opacity: .8;
}

main {
  position: relative;
  height: calc(100% - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 40px 30px;
}

.tablo {
  width: min(1080px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px 28px 22px;
  box-shadow:
    0 0 0 1px rgba(198, 255, 61, .06),
    0 30px 90px -30px rgba(139, 92, 246, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.tablo::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 220px;
  background: radial-gradient(closest-side, rgba(198, 255, 61, .16), transparent);
  filter: blur(30px);
  pointer-events: none;
}

.tablo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tablo-head h1 {
  font-size: 26px;
  letter-spacing: .22em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 26px rgba(198, 255, 61, .45);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
  animation: pulse 2.4s infinite;
}

@keyframes pulse { 50% { opacity: .35; } }

.hint {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--dim);
  text-transform: uppercase;
}

.reels {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 12px;
}

.reel {
  position: relative;
  height: var(--reel-h);
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #0b0b12, #14141f 45%, #0b0b12);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 12px 30px -12px rgba(0, 0, 0, .9), inset 0 -12px 30px -12px rgba(0, 0, 0, .9);
}

.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 7, 11, .95), transparent 26%, transparent 74%, rgba(7, 7, 11, .95));
}

.strip { will-change: transform; }

.item {
  height: var(--reel-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel:not(.reel-main) .item {
  font-size: 21px;
  font-weight: 600;
  color: #b9bdcc;
}

.reel-main .item { color: #fff; }

.strip.spinning { filter: blur(1.6px); }

.strip.settle .item { animation: settle .18s ease; }

@keyframes settle {
  0% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.tablo-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 15px 42px;
  border-radius: 12px;
  background: var(--lime);
  color: #0a0a0f;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 0 8px 40px -8px rgba(198, 255, 61, .8);
  transition: transform .12s ease, box-shadow .2s ease, opacity .2s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 48px -8px rgba(198, 255, 61, .95); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .45; cursor: default; box-shadow: none; transform: none; }

.keys {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--dim);
  text-transform: uppercase;
}

.result {
  width: min(1080px, 92vw);
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  transition: opacity .35s ease, transform .35s ease;
}

.result.hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }

.card, .idea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.card { padding: 18px 20px; }

.card-top { display: flex; gap: 28px; }

.metric .label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}

.metric .value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.metric .value.small { font-size: 18px; font-weight: 600; color: #c9cddb; }
.metric .value.up { color: var(--lime); }
.metric .value.down { color: #ff6b6b; }

.spark-wrap { margin-top: 12px; }
#spark { width: 100%; height: 64px; display: block; }

.top-phrases {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 11px;
  color: #a8adbf;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.chip b { color: #e6e9f2; font-weight: 600; }

.idea {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: rgba(198, 255, 61, .22);
  box-shadow: inset 0 0 40px -20px rgba(198, 255, 61, .8);
}

.idea-label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}

.idea-text {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}
