.crash-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  height: 100%;
  min-height: 540px;
  background: var(--bg-0);
}
.crash-main {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.crash-history {
  display: flex;
  gap: 6px;
  height: 30px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, black 75%, transparent);
}
.crash-pill {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--bg-2);
  font-weight: 750;
  font-size: 12.5px;
}
.crash-pill.is-low { color: #ff8a99; }
.crash-pill.is-mid { color: #9ec5ff; }
.crash-pill.is-high { color: var(--win); }
.crash-pill.is-gold { color: var(--accent-ink); background: var(--accent); }
.crash-pill.is-new { animation: pill-in 380ms var(--ease-spring); }

.crash-stage {
  position: relative;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.crash-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-hud {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  pointer-events: none;
}
.crash-multiplier {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 6px 30px rgb(0 0 0 / 0.5);
  transition: color 250ms, text-shadow 250ms;
}
/* The number warms up as it climbs. */
.crash-multiplier[data-level="1"] { color: #ffe7a3; }
.crash-multiplier[data-level="2"] { color: #ffd36b; text-shadow: 0 6px 30px rgb(0 0 0 / 0.5), 0 0 26px rgb(255 179 0 / 0.35); }
.crash-multiplier[data-level="3"] { color: var(--accent); text-shadow: 0 6px 30px rgb(0 0 0 / 0.5), 0 0 40px rgb(255 179 0 / 0.55); }
.crash-multiplier.is-cashed { color: var(--win); text-shadow: 0 6px 30px rgb(0 0 0 / 0.5), 0 0 30px rgb(34 224 143 / 0.4); }
.crash-multiplier.is-crashed { color: var(--loss); text-shadow: 0 6px 30px rgb(0 0 0 / 0.5), 0 0 30px rgb(255 77 99 / 0.4); animation: fx-shake 420ms; --shake: 5px; }
.crash-status {
  min-height: 1.4em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(11 17 29 / 0.6);
  color: var(--text-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.crash-status:empty { visibility: hidden; }
.crash-board.is-crashed .crash-status { color: #ffc2cb; background: rgb(60 10 20 / 0.7); }

/* ---------- Players ---------- */

.crash-players {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  background: var(--bg-1);
  box-shadow: -1px 0 0 var(--line);
}
.crash-players__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 16px 10px;
  color: var(--text-3);
  font-weight: 650;
  font-size: 12.5px;
}
.crash-players__head strong { color: var(--text); font-size: 14px; }
.crash-players__list {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 0 8px 12px;
  overflow-y: auto;
  max-height: 520px;
}
.crash-players__empty { padding: 12px 8px; color: var(--text-3); font-size: 12.5px; }
.crash-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
  animation: rise-in 240ms var(--ease-out);
  transition: background-color 200ms;
}
.crash-player__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crash-player__mult { color: var(--text-3); min-width: 44px; text-align: right; }
.crash-player__amount { min-width: 64px; text-align: right; }
.crash-player.is-cashed { background: rgb(34 224 143 / 0.08); }
.crash-player.is-cashed .crash-player__mult, .crash-player.is-cashed .crash-player__amount { color: var(--win); }
.crash-player.is-me { box-shadow: inset 2px 0 0 var(--accent); }
.crash-player.is-lost { opacity: 0.5; }
.crash-player.is-lost .crash-player__amount { color: var(--loss); text-decoration: line-through; }

.crash-mine strong.is-win { color: var(--win); }

@media (max-width: 1180px) {
  .crash-board { grid-template-columns: 1fr; }
  .crash-players { box-shadow: 0 -1px 0 var(--line); }
  .crash-players__list { max-height: 240px; }
}
@media (max-width: 600px) {
  .crash-stage { min-height: 300px; }
  .crash-main { padding: 10px; }
}
