:root {
  --bg: #0d0e1a;
  --panel: #171827;
  --panel-border: #2a2c45;
  --accent: #ff2e63;
  --accent-2: #08d9d6;
  --text: #eaeaea;
  --muted: #8a8ca8;
  --gold: #ffd700;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.4);
}

.tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ---------- Search + autocomplete ---------- */

.search-wrap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem 1.25rem;
}

.search-wrap label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

#symbol-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
}

#symbol-input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.suggestions {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: calc(100% - 0.25rem);
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  background: var(--panel);
  border: 1px solid var(--accent-2);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  max-height: 320px;
  overflow-y: auto;
}

.suggestions li.suggestion {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.suggestions li.suggestion .sym {
  color: var(--accent-2);
  font-weight: bold;
  flex-shrink: 0;
}

.suggestions li.suggestion .name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.suggestions li.suggestion .exch {
  color: var(--muted);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.suggestions li.suggestion:hover,
.suggestions li.suggestion.highlighted {
  background: rgba(8, 217, 214, 0.12);
}

.suggestions li.suggestion-empty {
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ---------- Status / error ---------- */

.status-line {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.error-note {
  text-align: center;
  color: var(--accent);
  font-size: 0.85rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0.9rem;
  margin: 1.5rem 0;
}

/* ---------- Result ---------- */

.result {
  margin-top: 1.75rem;
}

.result-intro {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

/* ---------- Jackpot box + tiers ---------- */

.jackpot-box {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 2rem 1.25rem 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.jackpot-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.jackpot-value {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: bold;
  color: var(--text);
  letter-spacing: 0.5px;
}

.jackpot-label {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.jackpot-multiplier {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* < 0.5x — Rekt: flat, grim, deliberately no glow. Slightly desaturated. */
.jackpot-box.tier-rekt {
  background: #5c1a1a;
  border-color: #7a2626;
  filter: saturate(0.75);
}
.jackpot-box.tier-rekt .jackpot-value,
.jackpot-box.tier-rekt .jackpot-label {
  color: #ff4d4d;
}

/* 0.5x - 1x — Down Bad: plain red, no glow. */
.jackpot-box.tier-down-bad .jackpot-value,
.jackpot-box.tier-down-bad .jackpot-label {
  color: var(--accent);
}

/* 1x - 1.5x — Meh: plain grey. */
.jackpot-box.tier-meh .jackpot-value,
.jackpot-box.tier-meh .jackpot-label {
  color: var(--muted);
}

/* 1.5x - 3x — Not Bad: cyan, subtle border glow. */
.jackpot-box.tier-not-bad {
  box-shadow: 0 0 16px rgba(8, 217, 214, 0.25);
  border-color: var(--accent-2);
}
.jackpot-box.tier-not-bad .jackpot-value,
.jackpot-box.tier-not-bad .jackpot-label {
  color: var(--accent-2);
}

/* 3x - 10x — Nice One: green, border glow. */
.jackpot-box.tier-nice-one {
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.35);
  border-color: #4ade80;
}
.jackpot-box.tier-nice-one .jackpot-value,
.jackpot-box.tier-nice-one .jackpot-label {
  color: #4ade80;
}

/* 10x - 50x — Huge Win: gold, glow + gentle pulse. */
.jackpot-box.tier-huge-win {
  border-color: var(--gold);
  animation: pulse-glow 2.2s ease-in-out infinite;
}
.jackpot-box.tier-huge-win .jackpot-value,
.jackpot-box.tier-huge-win .jackpot-label {
  color: var(--gold);
}

/* 50x - 200x — MASSIVE: bigger glow, bigger scale, pulse. */
.jackpot-box.tier-massive {
  border-color: var(--gold);
  transform: scale(1.04);
  animation: pulse-glow-big 1.8s ease-in-out infinite;
}
.jackpot-box.tier-massive .jackpot-value,
.jackpot-box.tier-massive .jackpot-label {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.7);
}

/* 200x - 1000x — JACKPOT!: animated rainbow/gold gradient, shimmering. */
.jackpot-box.tier-jackpot {
  border-color: var(--gold);
  transform: scale(1.05);
  animation: pulse-glow-big 1.5s ease-in-out infinite;
}
.jackpot-box.tier-jackpot .jackpot-value,
.jackpot-box.tier-jackpot .jackpot-label {
  background: linear-gradient(90deg, #ffd700, #ff2e63, #08d9d6, #4ade80, #ffd700);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 2.4s linear infinite;
}

/* >= 1000x — LEGENDARY!!!: everything above, plus confetti fires from JS. */
.jackpot-box.tier-legendary {
  border-color: var(--gold);
  transform: scale(1.07);
  animation: pulse-glow-big 1.2s ease-in-out infinite;
}
.jackpot-box.tier-legendary .jackpot-value,
.jackpot-box.tier-legendary .jackpot-label {
  background: linear-gradient(90deg, #ffd700, #ff2e63, #08d9d6, #4ade80, #ffd700);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}
.jackpot-box.tier-legendary .jackpot-emoji {
  animation: bounce 0.9s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 34px rgba(255, 215, 0, 0.65);
  }
}

@keyframes pulse-glow-big {
  0%,
  100% {
    box-shadow: 0 0 26px rgba(255, 215, 0, 0.45);
  }
  50% {
    box-shadow: 0 0 56px rgba(255, 215, 0, 0.85);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- Chart ---------- */

.chart-card {
  margin-top: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 1.1rem 1.1rem 0.6rem;
}

.chart-title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: normal;
}

#chart-span-note {
  color: var(--accent-2);
  text-transform: none;
  letter-spacing: normal;
}

.chart-wrap {
  position: relative;
}

#chart-svg {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 9px;
  font-family: 'Share Tech Mono', monospace;
}

.chart-crosshair {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-hover-dot {
  fill: var(--gold);
  stroke: var(--bg);
  stroke-width: 1.5;
}

.chart-tooltip {
  position: absolute;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--accent-2);
  border-radius: 4px;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Confetti ---------- */

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.site-footer a {
  color: var(--muted);
}

/* ---------- Mobile ---------- */

@media (max-width: 420px) {
  .layout {
    padding: 0 1rem 2rem;
  }

  .jackpot-box {
    padding: 1.5rem 0.75rem 1.25rem;
  }

  .jackpot-value {
    font-size: clamp(1.8rem, 11vw, 2.4rem);
  }

  .chart-card {
    padding: 0.9rem 0.6rem 0.5rem;
  }
}
