/* ============ Shared game layout (controls left, stage right) ============ */
.content.game-page { max-width: 1280px; gap: 0; }

.game-wrap {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 620px;
  border-radius: 14px 14px 0 0; overflow: hidden; background: var(--panel);
  box-shadow: 0 10px 40px #0007;
}
.stage, .controls { min-width: 0; }
.controls { padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.stage {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 22px;
  background:
    radial-gradient(ellipse at 50% 0%, #1f7bff22, transparent 60%),
    radial-gradient(ellipse at 50% 120%, #ff2e3f14, transparent 60%),
    #0a1322;
}

/* segmented tabs (Manual / Auto, Heads / Tails …) */
.seg { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 38px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--panel-2); color: #fff; box-shadow: 0 2px 8px #0005; }
.seg button:disabled { opacity: .5; cursor: not-allowed; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.field-sub { color: #c2d1ea; }
.input-group {
  display: flex; align-items: center; height: 46px; border-radius: 8px; overflow: hidden;
  background: var(--bg); border: 2px solid var(--line); transition: border-color .15s;
}
.input-group:focus-within { border-color: var(--blue); }
.input-group.bad { border-color: #ff2e3f99; }
.prefix { padding-left: 12px; color: var(--muted); font-weight: 700; }
.coin-dot {
  margin-left: 10px; padding: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #05301a; font-size: 12px; font-weight: 800; flex: none;
}
.suffix { padding-right: 12px; color: var(--muted); font-weight: 700; }
.inp {
  flex: 1; min-width: 0; height: 100%; padding: 0 10px; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 700;
}
.inp[readonly] { color: #c2d1ea; }
.ig-btn {
  height: 100%; min-width: 46px; padding: 0 10px; background: var(--panel-2); font-weight: 800; font-size: 14px;
  border-left: 2px solid var(--bg); transition: background .12s;
}
.ig-btn:hover { background: var(--line); }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chips button {
  height: 30px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700;
  transition: background .12s, color .12s;
}
.chips button:hover { background: var(--panel-2); color: #fff; }
button:disabled { cursor: not-allowed; opacity: .55; }

.select {
  height: 46px; width: 100%; padding: 0 12px; border-radius: 8px; border: 2px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; outline: 0; cursor: pointer;
}
.select:focus { border-color: var(--blue); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > *, .stats-row > * { min-width: 0; }

/* big action button */
.play-btn {
  height: 56px; border-radius: 10px; font-weight: 800; font-size: 17px; letter-spacing: .02em; color: #fff;
  background: linear-gradient(180deg, #3b95ff, #1667e8); box-shadow: 0 6px 20px #1f7bff55, inset 0 1px 0 #ffffff40, inset 0 -3px 0 #0003;
  transition: transform .1s, filter .15s, box-shadow .15s;
}
.play-btn:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 8px 26px #1f7bff77, inset 0 1px 0 #ffffff40, inset 0 -3px 0 #0003; }
.play-btn:active:not(:disabled) { transform: translateY(2px); }
.play-btn.cash { background: linear-gradient(180deg, #34ef8d, #12b866); color: #04331b; box-shadow: 0 6px 20px #22e07a55, inset 0 1px 0 #ffffff60, inset 0 -3px 0 #0002; }
.play-btn.stop { background: linear-gradient(180deg, #ff5a68, #e01e33); box-shadow: 0 6px 20px #ff2e3f55, inset 0 1px 0 #ffffff40; }
.play-btn small { display: block; font-size: 12px; font-weight: 700; opacity: .85; }
.ghost-btn { height: 44px; border-radius: 8px; background: var(--panel-2); font-weight: 700; }
.ghost-btn:hover:not(:disabled) { background: var(--line); }

.ctl-note { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: auto; }
.ctl-note b { color: #c2d1ea; }

/* history pills in the stage */
.hist-row { display: flex; gap: 6px; justify-content: flex-end; min-height: 30px; flex-wrap: nowrap; overflow: hidden; }
.hist {
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap;
  background: var(--panel-2); color: var(--muted); animation: histIn .3s;
}
.hist.w { background: #22e07a; color: #04331b; }
@keyframes histIn { from { transform: translateX(-12px) scale(.8); opacity: 0; } }

/* win popup */
.win-pop {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20;
  min-width: 170px; padding: 16px 22px; border-radius: 14px; text-align: center;
  background: #0f1c30ee; border: 3px solid #22e07a; box-shadow: 0 0 0 6px #22e07a22, 0 20px 50px #000b;
  animation: popIn .35s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none;
}
.win-pop.out { animation: popOut .35s forwards; }
.wp-mult { font-size: 32px; font-weight: 800; color: #22e07a; }
.wp-line { height: 2px; margin: 8px 0; background: #ffffff1a; }
.wp-pay { font-size: 16px; font-weight: 700; }
@keyframes popIn { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
@keyframes popOut { to { transform: translate(-50%, -50%) scale(.85); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 100; opacity: 0;
  padding: 12px 18px; border-radius: 10px; background: var(--panel-2); font-weight: 700; font-size: 14px;
  box-shadow: 0 12px 40px #000a; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* bar under the game */
.game-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px;
  background: var(--bg-2); border-radius: 0 0 14px 14px; border-top: 1px solid #ffffff0d;
}
.gb-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.gb-title img { width: 28px; height: 28px; object-fit: contain; }
.gb-actions { display: flex; align-items: center; gap: 10px; }
.gb-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 13px; }
.gb-btn:hover { background: var(--panel); color: #fff; }
.gb-btn i { font-size: 16px; }
.gb-demo { padding: 6px 10px; border-radius: 999px; background: #ffb02e22; color: #ffc45c; font-size: 12px; font-weight: 800; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

@media (max-width: 900px) {
  .game-wrap { grid-template-columns: minmax(0, 1fr); }
  .stage { order: -1; min-height: 400px; padding: 16px; }
  .controls { padding: 14px; }
}
@media (max-width: 640px) {
  .stats-row { gap: 6px; }
  .gb-demo { display: none; }
  .gb-vol input { width: 60px; }
}

/* volume control in the game bar */
.gb-vol { display: flex; align-items: center; gap: 2px; }
.gb-vol input {
  width: 90px; height: 4px; appearance: none; -webkit-appearance: none; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--blue) var(--p, 60%), var(--panel-2) var(--p, 60%));
}
.gb-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0008; }
.gb-vol input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
