/* ==========================================================================
   BULLDROP — Crash page
   Round board · multiplier chart · history chips · player list
   Depends on shared.css + game-shared.css
   ========================================================================== */

/* Reference centres the game in a narrower column */
.shell--game { max-width: 1240px; }

.panel--head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-top: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-surface);
}
.panel--head .game-head__title { font-size: clamp(18px, 2.4vw, 24px); }

.game-lead {
  margin: 18px 0 20px;
  color: var(--text-mute);
  font-size: 14px;
}

/* ---------- Board layout ---------- */
.crash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-bottom: 18px;
}

.crash-board { display: grid; gap: 16px; align-content: start; }

.crash-board__id {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}
.crash-board__id b { color: var(--green); font-variant-numeric: tabular-nums; }
.crash-board__badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

/* ---------- Chart ---------- */
.chart {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: minmax(220px, 42vh) 22px;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-inset);
}

.chart__yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart__plot {
  position: relative;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.chart__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chart__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.chart__label {
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 700;
}
.chart__timer {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.chart__timer b {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.chart__timer span { color: var(--text-soft); font-size: clamp(16px, 2.4vw, 24px); }

.chart__xaxis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- History chips ---------- */
.history {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  padding-bottom: 2px;
}
.history::-webkit-scrollbar { display: none; }
.history > li { flex: 0 0 auto; }

.mult {
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: transform var(--t) var(--ease), filter var(--t) var(--ease);
}
.mult:hover { transform: translateY(-2px); filter: brightness(1.15); }

/* Colour bands by outcome, as in the reference */
.mult--lose   { background: rgba(255, 89, 95, 0.18);  color: #ff8f93; }
.mult--mid    { background: rgba(255, 176, 46, 0.16); color: #ffc978; }
.mult--win    { background: rgba(34, 197, 94, 0.17);  color: #6ee39b; }
.mult--legend { background: rgba(139, 92, 246, 0.22); color: #c4aefc; }

/* ---------- Bet panel ---------- */
.crash-bet { display: grid; align-content: center; }

/* ---------- Players ---------- */
.players { display: grid; gap: 14px; margin-bottom: 30px; }

.players__head {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.players__stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}
.players__stat svg { width: 17px; height: 17px; color: var(--text-mute); }
.players__stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.players__sigma { color: var(--text-mute); font-size: 15px; font-weight: 800; }

.players__list { display: grid; gap: 8px; }

.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--line);
  transition: border-color var(--t) var(--ease);
}
.prow:hover { border-color: var(--line-strong); }

.prow__nick {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow__bet {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- SEO note ---------- */
.seo-note {
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--bg-surface);
}
.seo-note__title { margin-bottom: 12px; font-size: 18px; }
.seo-note__text {
  max-width: 90ch;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .crash-grid { grid-template-columns: 1fr; }
  .crash-bet .auth-required { min-height: 160px; }
}

@media (max-width: 620px) {
  .chart { grid-template-columns: 28px minmax(0, 1fr); padding: 10px; }
  .chart__xaxis > li:nth-child(even) { display: none; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding: 12px 14px; }
  .prow .badge-wait { grid-column: 1 / -1; justify-self: start; }
}
