/* ---------- crash tab ---------- */
.lead { margin: -4px 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.cr-history {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px 12px; padding: 0 12px;
  scrollbar-width: none;
}
.cr-history::-webkit-scrollbar { display: none; }
.cr-chip {
  flex: none; padding: 5px 9px; border-radius: 9px; font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.cr-chip.mid { color: var(--text); border-color: #6d4fc2; background: #221b36; }
.cr-chip.high { color: #111; border-color: var(--gold); background: var(--gold); }
.cr-chip.enter { animation: slideIn .4s ease; }

.cr-stage {
  position: relative; height: 290px; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, #3b2414 0%, #17131f 45%, #0f0e15 100%);
  border: 1px solid var(--line);
}
.cr-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cr-center {
  position: absolute; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.cr-center b {
  font: 700 54px/1 Inter, sans-serif; letter-spacing: -.02em;
  color: #ede9fe; text-shadow: 0 0 30px rgba(139, 92, 246, .55);
}
.cr-center span { font-size: 13px; font-weight: 600; color: #c4c1d4; }
.cr-stage.crashed .cr-center b { color: #ef4444; text-shadow: 0 0 30px rgba(239, 68, 68, .5); }
.cr-stage.waiting .cr-center b { color: var(--muted); text-shadow: none; font-size: 40px; }
.cr-stage.won .cr-center span { color: #4ade80; }

.cr-panel {
  margin-top: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
/* minmax(0, …): inputs have an intrinsic width that would otherwise push the grid past the screen */
.cr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cr-field { min-width: 0; }
.cr-field label { display: flex; align-items: center; gap: 8px; height: 22px; margin-bottom: 6px; font-size: 13px; color: #c4c1d4; }
.cr-stepper, .cr-auto {
  display: flex; align-items: center; height: 46px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line);
}
.cr-stepper button { width: 42px; height: 100%; font-size: 20px; color: var(--muted); }
.cr-stepper input, .cr-auto input {
  flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: none;
  color: var(--text); font: 700 16px Inter, sans-serif; text-align: center;
}
.cr-auto { padding-left: 14px; }
.cr-auto span { color: var(--muted); font-weight: 600; }
.cr-auto input { text-align: left; padding-left: 6px; }
.cr-auto.off { opacity: .45; }
.cr-stepper.locked, .cr-quick.locked { opacity: .45; pointer-events: none; }

.cr-switch { cursor: pointer; user-select: none; }
.cr-switch input { display: none; }
.cr-switch i {
  position: relative; width: 32px; height: 18px; border-radius: 9px; background: #3a3848; transition: background .2s;
}
.cr-switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.cr-switch input:checked + i { background: var(--accent); }
.cr-switch input:checked + i::after { transform: translateX(14px); }

.cr-quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0; }
.cr-quick button {
  height: 38px; border-radius: 10px; font-weight: 600; font-size: 13px;
  background: var(--card-2); border: 1px solid var(--line);
}

.cr-btn {
  width: 100%; height: 62px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(180deg, #a07bff, #7c4ff0); box-shadow: 0 8px 24px rgba(124, 79, 240, .35);
}
.cr-btn b { font-size: 17px; }
.cr-btn small { font-size: 12px; opacity: .85; }
.cr-btn.cashout { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 8px 24px rgba(22, 163, 74, .35); }
.cr-btn.cancel { background: #2b2342; box-shadow: none; border: 1px solid #4b3d72; }
.cr-btn:active { transform: scale(.985); }

.cr-bets { margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: #131a1a; border: 1px solid var(--line); }
.cr-bets-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; background: var(--card-2); font-size: 14px;
}
.cr-bets-head span { color: var(--muted); font-size: 12px; }
.cr-bet {
  display: grid; grid-template-columns: 1fr auto 104px; align-items: center; gap: 10px;
  padding: 9px 12px; border-top: 1px solid rgba(255, 255, 255, .04); font-size: 13px;
}
.cr-bet:nth-child(odd) { background: rgba(255, 255, 255, .015); }
.cr-bet .who { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-bet .amt { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; }
.cr-bet .amt .coin { width: 15px; height: 15px; }
.cr-bet .res { text-align: right; font-weight: 700; white-space: nowrap; }
.cr-bet.won .res { color: #4ade80; }
.cr-bet.lost .res { color: #ef4444; opacity: .8; }
.cr-bet.me { background: rgba(139, 92, 246, .14); }
.cr-bet.me .who { color: var(--accent-2); }
.cr-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 360px) {
  .cr-center b { font-size: 44px; }
  .cr-quick button { font-size: 12px; }
}
