*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #f97316;
  --win: #22c55e;
  --scatter: #38bdf8;
  --jp: #eab308;
  --cell-h: 4.5rem;
  --cell-gap: 0.35rem;
  --reel-h: calc(var(--cell-h) * 5 + var(--cell-gap) * 4);
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top, #1e293b 0%, var(--bg) 55%);
  color: var(--text);
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
  padding-bottom: 5.5rem;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

header h1 span {
  color: var(--accent);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.info-btn {
  white-space: nowrap;
}

.stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.info-dialog {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  max-width: min(32rem, calc(100vw - 2rem));
  width: 100%;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}

.info-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

.info-panel {
  margin: 0;
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 40rem);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.info-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.info-body {
  overflow: auto;
  padding: 0.85rem 1.1rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.info-lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.info-body ul {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.info-body li strong {
  color: var(--accent);
}

.info-note {
  margin: 1rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.info-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  min-width: 7rem;
}

.stat label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.stat strong {
  font-size: 1.1rem;
}

.mc-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
}

.mc-header h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.mc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.mc-progress-wrap {
  margin-top: 0.75rem;
  height: 0.45rem;
  background: #0f172a;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.mc-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ea580c, #f97316);
  transition: width 0.15s ease-out;
}

.mc-progress-text,
.mc-status {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.mc-results {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text);
}

.mc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mc-metric {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.45rem 0.55rem;
}

.mc-metric label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.mc-metric strong {
  font-size: 0.95rem;
}

.mc-metric-highlight strong {
  color: var(--accent);
}

.mc-breakdown p {
  margin: 0.35rem 0;
  line-height: 1.4;
}

.mc-sub {
  margin-left: 0.75rem !important;
  color: var(--muted);
  font-size: 0.72rem;
}

.mc-symbol-rtp {
  list-style: none;
  margin: 0.2rem 0 0.55rem 1.25rem;
  padding: 0;
}

.mc-symbol-rtp li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.12rem 0;
}

.mc-symbol-rtp strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mc-tiers {
  margin: 0.25rem 0 0.5rem 1.25rem;
}

.mc-tier {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.15rem 0;
}

.live-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
}

.live-stats .stat {
  min-width: 6.5rem;
  flex: 1 1 6.5rem;
}

.live-stats .stat-rtp strong {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.game-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.mode-banner {
  text-align: center;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: #0f172a;
  border: 1px dashed var(--border);
}

.mode-banner.fs {
  border-color: var(--scatter);
  color: var(--scatter);
}

.board-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.25rem;
}

.board-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 5.5rem;
  padding-top: 2.6rem;
}

.board-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.fs-mult-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.9));
  box-shadow: inset 0 0 24px rgba(16, 185, 129, 0.12);
  width: 100%;
  max-width: 7.5rem;
}

.fs-mult-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #99f6e4;
  text-align: center;
  line-height: 1.25;
}

.fs-mult-value {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 800;
  color: #6ee7b7;
  text-shadow: 0 0 14px rgba(110, 231, 183, 0.55);
  min-width: 3ch;
  text-align: center;
  transition: transform 180ms var(--anim-ease);
}

.fs-mult-hud.collect-pulse .fs-mult-value,
.fs-mult-hud.collect-pulse {
  animation: fs-mult-pulse 420ms var(--anim-ease);
}

@keyframes fs-mult-pulse {
  0% { transform: scale(1); box-shadow: inset 0 0 24px rgba(16, 185, 129, 0.12); }
  45% {
    transform: scale(1.06);
    box-shadow:
      inset 0 0 24px rgba(16, 185, 129, 0.2),
      0 0 0 6px rgba(110, 231, 183, 0);
  }
  100% { transform: scale(1); box-shadow: inset 0 0 24px rgba(16, 185, 129, 0.12); }
}

.tumble-win {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: min(100%, 16rem);
  margin: 0 0 0.55rem;
  padding: 0.4rem 1.25rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, rgba(69, 26, 3, 0.55), rgba(15, 23, 42, 0.95));
  box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.08);
}

.tumble-win-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.tumble-win-value {
  font-size: clamp(1.15rem, 3.5vw, 1.65rem);
  font-weight: 800;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  text-align: center;
  transition: transform 180ms var(--anim-ease);
}

.tumble-win.formula-pulse .tumble-win-value,
.tumble-win.settle-pulse .tumble-win-value {
  animation: tumble-win-pulse 480ms var(--anim-ease);
}

@keyframes tumble-win-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (max-width: 720px) {
  .board-stage {
    grid-template-columns: 1fr;
  }

  .board-rail {
    padding-top: 0;
    align-items: center;
  }

  .fs-mult-hud {
    flex-direction: row;
    max-width: none;
    width: auto;
    padding: 0.45rem 0.9rem;
  }
}

.collect-token.mult-fly {
  min-width: 2.4rem;
  height: 2.1rem;
  padding: 0 0.45rem;
  border-radius: 0.55rem;
  background: radial-gradient(circle at 35% 30%, #a7f3d0 0%, #34d399 50%, #047857 100%);
  border: 2px solid #d1fae5;
  color: #022c22;
  font-size: 0.95rem;
  box-shadow:
    0 0 14px rgba(52, 211, 153, 0.65),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.grid-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1rem;
}

.grid,
.grid-reels {
  display: flex;
  flex-direction: row;
  gap: var(--cell-gap);
  padding: 0.75rem;
  background: #0b1220;
  border-radius: 0.65rem;
  border: 2px solid #475569;
}

.reel-col {
  position: relative;
  width: 4.5rem;
  height: var(--reel-h);
  overflow: hidden;
}

.symbol-tile {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--cell-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: #111827;
  font-size: 0.72rem;
  line-height: 1.1;
  user-select: none;
  will-change: transform, opacity, top;
  z-index: 1;
}

.symbol-tile .sym {
  font-size: 1.15rem;
  font-weight: 700;
}

.symbol-tile .sym-img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.symbol-tile.has-image {
  background: linear-gradient(180deg, #1a2438 0%, #111827 100%);
  padding: 0.15rem 0;
}

.symbol-tile.has-image .name {
  display: none;
}

.symbol-tile .name {
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.symbol-tile .idx {
  position: absolute;
  top: 0.15rem;
  left: 0.25rem;
  font-size: 0.5rem;
  color: #64748b;
}

.symbol-tile.win {
  background: #14532d;
  border-color: var(--win);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
  z-index: 2;
}

.symbol-tile.scatter {
  border-color: var(--scatter);
}

.symbol-tile.multiplier {
  border-color: #6ee7b7;
  background: linear-gradient(145deg, #0c1222, #162032);
}

.symbol-tile.multiplier .idx,
.symbol-tile.multiplier .name,
.symbol-tile.multiplier .sym-img,
.symbol-tile.multiplier .mult-badge {
  display: none !important;
}

.symbol-tile.multiplier .sym.mult-center {
  font-size: clamp(1rem, 4.5vw, 1.45rem);
  font-weight: 800;
  color: #6ee7b7;
  text-shadow: 0 0 10px rgba(110, 231, 183, 0.55);
  line-height: 1;
  letter-spacing: -0.02em;
}

.symbol-tile.mult-pulse {
  animation: mult-pulse 420ms var(--anim-ease);
}

@keyframes mult-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(110, 231, 183, 0.8); }
  100% { transform: scale(1); }
}

.symbol-tile.special {
  border-color: var(--jp);
  background: #422006;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

button {
  border: none;
  border-radius: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #111;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: #334155;
  color: var(--text);
}

.buy-btn {
  background: linear-gradient(135deg, #c9a227, #e8c547);
  color: #1a1205;
  min-width: 9.5rem;
}

.buy-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.ante-btn.active {
  background: linear-gradient(180deg, #b45309, #92400e);
  border-color: #fbbf24;
}

.buy-super-btn {
  background: linear-gradient(135deg, #6b3fa0, #9b5de5);
  color: #f8f0ff;
  min-width: 10rem;
}

.bet-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bet-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.speed-control,
.autoplay-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 12rem;
}

.speed-control label,
.autoplay-control label {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.speed-control input[type="range"],
.autoplay-control input[type="range"] {
  flex: 1;
  min-width: 5rem;
  accent-color: var(--accent);
}

#anim-speed-label,
#autoplay-label {
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 2.75rem;
  text-align: right;
  color: var(--text);
}

.autoplay-control {
  min-width: 16rem;
}

.speed-control {
  min-width: 18rem;
}

#autoplay-btn.active {
  background: #dc2626;
  color: #fff;
}

.bet-control input {
  width: 4.5rem;
  text-align: center;
  padding: 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
}

.message {
  min-height: 1.5rem;
  text-align: center;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.message.win-text {
  color: var(--win);
  font-weight: 600;
}

.side-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.counters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  background: #0f172a;
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.mode-banner.ante {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.35), rgba(146, 64, 14, 0.2));
  border-color: rgba(251, 191, 36, 0.45);
}

.counter.mult-meter {
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(6, 78, 59, 0.25);
}

.counter.ready {
  border-color: var(--jp);
  color: #fde68a;
}

.counter.collect-pulse {
  animation: counter-collect-pulse 420ms var(--anim-ease);
}

@keyframes counter-collect-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.45);
  }
  45% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(234, 179, 8, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

#collect-fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.win-float {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(14px) scale(0.88);
  opacity: 0;
  transition:
    transform 0.4s var(--anim-ease),
    opacity 0.28s ease-out;
  will-change: transform, opacity;
}

.win-float.show {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(-18px) scale(1);
}

.win-float.hide {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-42px) scale(1.04);
  transition:
    transform 0.28s ease-in,
    opacity 0.28s ease-in;
}

.win-float-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 7.5rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  border-radius: 0.65rem;
  background:
    linear-gradient(165deg, rgba(20, 83, 45, 0.96) 0%, rgba(6, 28, 16, 0.97) 100%);
  border: 2px solid #4ade80;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(34, 197, 94, 0.35);
}

.win-float-icon,
.win-float-icon-fallback {
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(134, 239, 172, 0.35);
  object-fit: contain;
}

.win-float-icon-fallback {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #bbf7d0;
}

.win-float-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  line-height: 1;
}

.win-float-count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bbf7d0;
}

.win-float-amount {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.05;
  color: #f0fdf4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.collect-token {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde68a 0%, #eab308 55%, #a16207 100%);
  border: 2px solid #fef3c7;
  color: #422006;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow:
    0 0 12px rgba(234, 179, 8, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
  z-index: 10000;
}

.symbol-tile.collecting {
  animation: tile-collect-flash 420ms var(--anim-ease);
}

@keyframes tile-collect-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(234, 179, 8, 0);
  }
}

.paytable-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.paytable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

.paytable th,
.paytable td {
  padding: 0.25rem 0.3rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.paytable th:first-child,
.paytable td:first-child,
.paytable th:nth-child(2),
.paytable td:nth-child(2) {
  text-align: left;
}

.paytable th {
  color: var(--muted);
  font-weight: 600;
}

.paytable-symbol {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.paytable-symbol img {
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
  flex-shrink: 0;
}

.paytable-symbol--text .paytable-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.25rem;
  background: #111827;
  border: 1px solid var(--border);
  font-size: 0.62rem;
  font-weight: 700;
  flex-shrink: 0;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.78rem;
}

.log li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #33415555;
  color: var(--muted);
}

.log-win {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.log-symbol {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  flex-shrink: 0;
}

.log-symbol--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  background: #111827;
  border: 1px solid var(--border);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
}

.log li:last-child {
  border-bottom: none;
}

.cheats-btn {
  border: 1px dashed #fbbf24;
  color: #fbbf24;
  background: #422006;
}

.cheats-btn.armed {
  background: #854d0e;
  border-style: solid;
  color: #fef3c7;
}

.cheat-armed {
  margin: 0;
  flex-basis: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: #fbbf24;
}

.cheats-dialog {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  max-width: min(28rem, calc(100vw - 2rem));
  width: 100%;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}

.cheats-dialog::backdrop {
  background: rgba(2, 6, 23, 0.65);
}

.cheats-panel {
  margin: 0;
  display: flex;
  flex-direction: column;
  max-height: min(80vh, 36rem);
}

.cheats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.cheats-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.cheats-desc {
  margin: 0;
  padding: 0.65rem 1rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.cheats-list {
  overflow: auto;
  padding: 0.65rem 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cheat-group h3 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cheat-group-btns {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cheat-option {
  text-align: left;
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.cheat-option:hover {
  border-color: #fbbf24;
}

.cheat-option.active {
  border-color: #fbbf24;
  background: #422006;
  color: #fef3c7;
}

.cheat-option small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}

.cheat-option.active small {
  color: #fde68a;
}

.cheats-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
