* { box-sizing: border-box; }

:root {
  --bg: #0b0b0f;
  --panel: #141422;
  --gold: #fbbf24;
  --gold-dim: #b8860b;
  --pink: #ec4899;
  --green: #34d399;
  --red: #f87171;
  --muted: #9da0b3;
  --reel-h: 110px;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(236,72,153,0.12), transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(251,191,36,0.08), transparent 55%),
    var(--bg);
  color: #f5f5f5;
  line-height: 1.5;
  min-height: 100vh;
}

.hall {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

/* ── Marquee ── */
.marquee {
  text-align: center;
  padding: 18px 0 10px;
}
.marquee h1 {
  margin: 8px 0 2px;
  font-size: clamp(3rem, 10vw, 4.6rem);
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #fff6d5, var(--gold) 55%, var(--gold-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(251,191,36,0.25);
  font-weight: 900;
}
.tagline {
  margin: 0 0 10px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.bulbs {
  height: 10px;
  background-image: radial-gradient(circle 4px, var(--gold) 40%, transparent 45%);
  background-size: 26px 10px;
  background-position: 6px 0;
  animation: chase 1.1s steps(2) infinite;
  opacity: 0.9;
}
.bulbs--bottom { animation-delay: 0.55s; }
@keyframes chase { 50% { background-position: 19px 0; } }

/* ── Mode chips ── */
.mode-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}
.mode-chip {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--muted);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-chip:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.mode-chip.active {
  background: rgba(251,191,36,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Cabinet ── */
.cabinet {
  position: relative;
  background: linear-gradient(180deg, #1d1d30, #12121e);
  border: 2px solid rgba(251,191,36,0.35);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.payline {
  position: absolute;
  left: 10px; right: 10px;
  top: calc(26px + var(--reel-h) / 2);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(236,72,153,0.8), transparent);
  pointer-events: none;
  z-index: 3;
}
.reels {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.reel {
  width: 18.5%;
  max-width: 108px;
  height: var(--reel-h);
  background: linear-gradient(180deg, #06060c, #101019 25%, #101019 75%, #06060c);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 8px 18px rgba(0,0,0,0.7), inset 0 -8px 18px rgba(0,0,0,0.7);
}
.strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.cell {
  height: var(--reel-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 18px rgba(236,72,153,0.35);
  flex-shrink: 0;
  font-family: "Consolas", "Courier New", monospace;
}
.reel.spinning .strip { animation: whirl 0.28s linear infinite; filter: blur(2px); }
@keyframes whirl {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(var(--reel-h) * -3)); }
}
.reel.landed .cell { color: var(--gold); text-shadow: 0 0 22px rgba(251,191,36,0.6); }

.cabinet-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}
.spin-btn {
  background: linear-gradient(180deg, #ff5f8f, var(--pink) 60%, #b81c68);
  border: none;
  border-radius: 16px;
  color: #fff;
  padding: 14px 46px;
  cursor: pointer;
  box-shadow: 0 6px 0 #7e1247, 0 14px 30px rgba(236,72,153,0.35);
  transition: transform 0.08s, box-shadow 0.08s;
  text-align: center;
}
.spin-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #7e1247, 0 8px 18px rgba(236,72,153,0.3);
}
.spin-btn:disabled { filter: grayscale(0.6); cursor: not-allowed; }
.spin-label { display: block; font-size: 1.5rem; font-weight: 900; letter-spacing: 0.2em; }
.spin-sub { display: block; font-size: 0.65rem; opacity: 0.8; letter-spacing: 0.12em; text-transform: uppercase; }
.mute-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  font-size: 1.1rem;
  padding: 10px 12px;
  cursor: pointer;
}

/* ── Result card ── */
.result {
  margin-top: 22px;
  background: var(--panel);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 16px;
  padding: 20px 22px;
  animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.ticker {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1.1;
  font-family: "Consolas", monospace;
}
.company { color: #e8e8f2; font-weight: 600; }
.sector { color: var(--muted); font-size: 0.85rem; }
.price-block { text-align: right; }
.price { font-size: 1.8rem; font-weight: 800; }
.changes { display: flex; gap: 10px; justify-content: flex-end; font-size: 0.9rem; }
.chg.up { color: var(--green); }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); }

.pitch-bubble {
  position: relative;
  margin-top: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 16px 14px 46px;
  color: #d7d7e5;
  font-size: 1rem;
}
.pitch-bubble p { margin: 0; }
.pitch-badge {
  position: absolute;
  left: 12px; top: 12px;
  font-size: 1.3rem;
}
.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.result-actions a { color: #7db7ff; text-decoration: none; font-size: 0.92rem; }
.result-actions a:hover { text-decoration: underline; }
button.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #c7c7d7;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}
button.secondary:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.error-box {
  margin-top: 18px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
}

.disclaimer {
  margin-top: 30px;
  color: #6a6a82;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
}

@media (max-width: 520px) {
  :root { --reel-h: 76px; }
  .cell { font-size: 2.1rem; }
  .payline { top: calc(26px + var(--reel-h) / 2); }
}
