/* ---------- FoxBET: the games. Fox Crash is the crash round, with the fox running up the line ---------- */
.cz-top { display: flex; align-items: center; justify-content: center; gap: 11px; margin: 1px 0 14px; }
.cz-top::before, .cz-top::after { content: ""; flex: 1 1 0; max-width: 110px; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 48%, transparent)); }
.cz-top::after { background: linear-gradient(270deg, transparent, color-mix(in srgb, var(--accent) 48%, transparent)); }
.cz-top h2 { margin: 0; font: 800 15px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); padding-right: .2em; }

/* ---- the rounds behind us: its own bar above the game, newest first ---- */
/* Green when it ran, red when it went early, plain in between. The strip scrolls on its own and fades out at
   the end, so a long history never looks cut off. */
.cz-hist { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0 0 12px; padding: 8px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, #000 22%, var(--panel2)), var(--panel2));
  border: 1px solid var(--line); border-radius: 12px; }
.cz-hist-h { flex: none; font: 700 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cz-past { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
  mask-image: linear-gradient(90deg, #000 86%, transparent); }
.cz-past::-webkit-scrollbar { display: none; }
.cz-past b { flex: none; padding: 4px 10px; border-radius: 8px; font: 600 11.5px/1.35 var(--mono);
  font-variant-numeric: tabular-nums; background: rgba(255,255,255,.04); color: var(--muted);
  border: 1px solid transparent; }
.cz-past b.hi { color: var(--ok); background: rgba(62,240,138,.11); border-color: rgba(62,240,138,.22); }
.cz-past b.lo { color: var(--bad); background: rgba(255,77,109,.11); border-color: rgba(255,77,109,.22); }
/* newest round: it sits at the front and says so */
.cz-past b:first-child { box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
@media (max-width: 460px) { .cz-hist { gap: 9px; padding: 7px 10px; } .cz-hist-h { display: none; } }

/* the field the fox runs across. Its edge carries the state: quiet while bets are open, green while the fox is
   running, red the moment it goes — so the round can be read from the corner of your eye. */
.cz-field { --edge: color-mix(in srgb, var(--accent) 40%, transparent); position: relative; margin-top: 14px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 9%, var(--panel2)), var(--panel2) 72%),
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 22px 44px -30px #000;
  transition: border-color .25s, box-shadow .25s; }
.cz-field.run { --edge: rgba(94,224,138,.6); border-color: rgba(94,224,138,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), inset 0 0 46px rgba(94,224,138,.07), 0 22px 44px -30px #000; }
.cz-field.bust { --edge: rgba(255,107,107,.6); border-color: rgba(255,107,107,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), inset 0 0 46px rgba(255,107,107,.09), 0 22px 44px -30px #000; }
/* four corner ticks, drawn in the state's colour — a viewfinder around the run */
.cz-field::after { content: ""; position: absolute; inset: 9px; border-radius: 11px; pointer-events: none;
  transition: background-color .25s;
  background:
    linear-gradient(var(--edge), var(--edge)) left 0 top 0 / 15px 1.5px no-repeat,
    linear-gradient(var(--edge), var(--edge)) left 0 top 0 / 1.5px 15px no-repeat,
    linear-gradient(var(--edge), var(--edge)) right 0 top 0 / 15px 1.5px no-repeat,
    linear-gradient(var(--edge), var(--edge)) right 0 top 0 / 1.5px 15px no-repeat,
    linear-gradient(var(--edge), var(--edge)) left 0 bottom 0 / 15px 1.5px no-repeat,
    linear-gradient(var(--edge), var(--edge)) left 0 bottom 0 / 1.5px 15px no-repeat,
    linear-gradient(var(--edge), var(--edge)) right 0 bottom 0 / 15px 1.5px no-repeat,
    linear-gradient(var(--edge), var(--edge)) right 0 bottom 0 / 1.5px 15px no-repeat; }
/* The climb gets room: tall enough on a desktop to watch a long round stretch out, and it grows a little
   with the window rather than sitting at one fixed height. */
.cz-field canvas { display: block; width: 100%; height: clamp(330px, 46vh, 460px); }
@media (max-width: 900px) { .cz-field canvas { height: clamp(300px, 40vh, 380px); } }
@media (max-width: 560px) { .cz-field canvas { height: clamp(250px, 38vh, 320px); } }

/* the strip across the top of the frame: which round this is, and how many are in it */
.cz-head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; pointer-events: none; }
.cz-head b { font: 700 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.cz-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); transition: background-color .25s; }
.cz-field.run .cz-dot { background: var(--ok); animation: czBlink 1.1s ease-in-out infinite; }
.cz-field.bust .cz-dot { background: var(--bad); }
@keyframes czBlink { 50% { opacity: .35; } }
.cz-head .cz-note { margin-left: auto; font: 700 10px var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .cz-head { padding: 12px 14px; } }

/* the multiplier, over the middle of the field */
.cz-now { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.cz-x { font: 800 54px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text);
  text-shadow: 0 2px 18px rgba(0,0,0,.6); transition: color .2s; }
.cz-sub { margin-top: 9px; font: 500 12px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: lowercase; }
.cz-field.run .cz-x { color: var(--ok); text-shadow: 0 0 26px rgba(62,240,138,.35), 0 2px 18px rgba(0,0,0,.6); }
.cz-field.bust .cz-x { color: var(--bad); text-shadow: 0 0 26px rgba(255,77,109,.35), 0 2px 18px rgba(0,0,0,.6);
  animation: czGone .5s cubic-bezier(.2,.8,.3,1); }
@keyframes czGone { 0% { transform: scale(1.14); } 60% { transform: scale(.97); } 100% { transform: scale(1); } }
@media (max-width: 560px) { .cz-x { font-size: 38px; } }

/* the fox itself, sitting on the head of the line */
.cz-fox { position: absolute; width: 50px; height: 35px; margin: -18px 0 0 -25px; pointer-events: none;
  transition: opacity .2s; will-change: transform; }
.cz-fox svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.55)); }
.cz-field.run .cz-fox { animation: czRun .32s steps(1, end) infinite; }
@keyframes czRun { 0% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(3deg); } 100% { transform: translateY(0) rotate(-4deg); } }
/* a smaller fox on a phone, where the field itself is shorter */
@media (max-width: 560px) { .cz-fox { width: 40px; height: 28px; margin: -14px 0 0 -20px; } }
/* gone: the fox trips and drops out of the bottom of the field */
.cz-field.bust .cz-fox { animation: czTrip .7s cubic-bezier(.4,0,.9,.5) forwards; }
@keyframes czTrip { 0% { transform: translate(0,0) rotate(0); } 100% { transform: translate(46px, 190px) rotate(420deg); opacity: 0; } }

/* ---- placing a bet: stake and its quick picks, the cash-out beside it, one big button ---- */
.cz-play { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) auto; gap: 12px 14px; align-items: start;
  margin-top: 16px; padding: 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; }
.cz-stake { grid-column: 1; grid-row: 1; }
.cz-target { grid-column: 2; grid-row: 1; }
.cz-go { grid-column: 3; grid-row: 1 / 3; }
.cz-quick { grid-column: 1; grid-row: 2; }
.cz-play label { display: block; margin: 0 0 7px; font: 700 10px var(--mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); }
/* the number and its unit share one box, so the unit never eats a line of its own */
.cz-inp { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.cz-inp:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.cz-inp input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; box-shadow: none;
  font: 700 17px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.cz-inp input:focus { outline: none; box-shadow: none; }
.cz-inp input::-webkit-outer-spin-button, .cz-inp input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cz-inp input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.cz-inp span { flex: none; font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cz-hint { margin: 7px 0 0; font-size: 11px; color: var(--muted); }
.cz-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.cz-quick button { padding: 5px 11px; font: 600 11.5px var(--mono); border-radius: 999px; }
/* the one button: Place bet, then Cash out while the fox is up */
.cz-go { align-self: center; min-width: 164px; padding: 14px 20px; border-radius: 12px;
  font-weight: 800; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
.cz-go.out { background: var(--ok); border-color: var(--ok); color: #06240f;
  box-shadow: 0 0 0 4px rgba(94,224,138,.14); animation: czPulse 1.1s ease-in-out infinite; }
@keyframes czPulse { 50% { box-shadow: 0 0 0 9px rgba(94,224,138,.07); } }
.cz-go[disabled] { opacity: .45; animation: none; }

/* what you are holding */
.cz-wallet { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 11px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--panel2)), var(--panel2));
  border: 1px solid var(--line); border-radius: 12px; }
.cz-wh { font: 700 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cz-wallet b { font: 700 16px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.cz-wallet .cz-note { margin-left: auto; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* who else is in this round */
.cz-rows { margin-top: 16px; }
.cz-cols, .cz-row { display: grid; grid-template-columns: minmax(0,1fr) 90px 118px; align-items: center; gap: 10px; padding: 9px 12px; }
.cz-cols { padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted);
  font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.cz-cols span:not(:first-child), .cz-row span:not(:first-child), .cz-row b { text-align: right; }
.cz-row { font-size: 13px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.cz-row:last-child { border-bottom: 0; }
.cz-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cz-who a { color: inherit; text-decoration: none; }
.cz-who a:hover { color: var(--accent); text-decoration: underline; }
.cz-row span, .cz-row b { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cz-row b.ok { color: var(--ok); } .cz-row b.bad { color: var(--bad); }
/* your own row, marked down the side */
.cz-row.me { position: relative; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 10px;
  border-bottom-color: transparent; }
.cz-row.me::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px;
  background: var(--accent); }

/* on a phone: bet and cash-out side by side, the quick picks on their own line, then the button */
@media (max-width: 620px) {
  .cz-play { grid-template-columns: 1fr 1fr; padding: 12px; gap: 11px 10px; }
  .cz-quick { grid-column: 1 / 3; grid-row: 2; }
  .cz-go { grid-column: 1 / 3; grid-row: 3; width: 100%; min-width: 0; padding: 13px 16px; }
  .cz-quick button { flex: 1; padding: 7px 8px; }
  .cz-hint { font-size: 10.5px; }
}
@media (max-width: 560px) {
  .cz-cols, .cz-row { grid-template-columns: minmax(0,1fr) 72px 96px; gap: 8px; padding: 8px 8px; }
  .cz-inp input { font-size: 16px; }
}
