:root {
  --bg: #13111c;
  --panel: #1e1a2b;
  --panel-dark: #161322;
  --border: #3a3250;
  --accent: #f59e0b;
  --gem: #38bdf8;
  --green: #22c55e;
  --red: #ef4444;
  --purple: #a855f7;
  --text: #f8fafc;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  user-select: none;
  overflow-x: hidden;
}

.game-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* HUD BAR */
.hud-bar {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.hud-left, .hud-right {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.logo-pill {
  font-weight: 900; letter-spacing: 0.06em; font-size: 15px;
  background: #2b2340; border: 2px solid #524378; padding: 5px 11px; border-radius: 8px;
  color: #fde047;
}
.stat-pill {
  background: var(--panel-dark);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 5px;
}
.stat-gem {
  border-color: rgba(56,189,248,0.5);
  cursor: pointer;
}
.stat-gem:hover { background: #182638; }
.plus-btn {
  background: var(--gem); color: #0b1120; font-weight: 900;
  width: 18px; height: 18px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; margin-left: 2px;
}
.stat-boss { color: #fca5a5; border-color: rgba(239,68,68,0.4); }

.hud-btn {
  background: #28223a; color: var(--text);
  border: 2px solid #453b63; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform 0.08s, background 0.12s;
}
.hud-btn:hover { background: #362e4f; }
.hud-btn:active { transform: translateY(1px); }
.hud-btn-donate {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fbbf24; color: #fff;
  box-shadow: 0 0 14px rgba(245,158,11,0.35);
}
.hud-btn-donate:hover { background: linear-gradient(135deg, #f59e0b, #d97706); }
.vip-tag {
  background: #fef08a; color: #713f12; font-size: 10px;
  padding: 1px 5px; border-radius: 4px; margin-left: 4px; font-weight: 900;
}

/* MAIN GRID */
.main-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 14px;
  align-items: start;
}

/* SLOT MACHINE */
.slot-column {
  background: #2c2438;
  border: 3px solid #52456b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.slot-column.skin-demon {
  background: #2b151c; border-color: #dc2626;
  box-shadow: 0 0 28px rgba(220,38,38,0.35);
}
.slot-column.skin-gold {
  background: #2d2514; border-color: #facc15;
  box-shadow: 0 0 28px rgba(250,204,21,0.3);
}
.slot-column.skin-cyber {
  background: #101b2e; border-color: #22d3ee;
  box-shadow: 0 0 28px rgba(34,211,238,0.35);
}

.machine-crown {
  background: rgba(0,0,0,0.35);
  border-bottom: 2px solid rgba(255,255,255,0.08);
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.skull-icon { font-size: 22px; }
.machine-title { font-weight: 900; font-size: 14px; letter-spacing: 0.08em; color: #e2e8f0; }

.machine-body {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.cost-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #cbd5e1;
  background: rgba(0,0,0,0.28); padding: 6px 10px; border-radius: 8px;
}
.free-spins-badge { color: #86efac; font-size: 12px; }

.reels-wrapper {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 8px;
  align-items: center;
}
.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #14101d;
  border: 3px solid #483d60;
  border-radius: 10px;
  padding: 8px;
}
.reel-cell {
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 42%, #f4ebd8, #d9c7a3);
  border: 3px solid #6b563c;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.28), inset 0 -2px 0 rgba(255,255,255,0.45);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s, box-shadow 0.15s;
}
.reel-img {
  image-rendering: pixelated;
  width: 68px; height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,0.35));
}
.roster-avatar {
  width: 28px; height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
}
.codex-sprite {
  width: 58px; height: 58px;
  image-rendering: pixelated;
  object-fit: contain;
  background: rgba(0,0,0,0.35);
  border: 1.5px solid #41375c;
  border-radius: 10px;
  padding: 4px;
}
.merchant-banner-wrap {
  width: 100%;
  height: 155px;
  overflow: hidden;
  border-bottom: 2px solid var(--border);
  background: #0d0a14;
}
.merchant-banner {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.reel-cell.spinning {
  filter: blur(1px);
  transform: scale(0.95);
}
.reel-cell.win-normal {
  border-color: #22c55e;
  box-shadow: 0 0 14px rgba(34,197,94,0.85);
  background: #dcfce7;
}
.reel-cell.win-rare {
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56,189,248,0.9);
  background: #e0f2fe;
}
.reel-cell.win-legendary {
  border-color: #facc15;
  box-shadow: 0 0 20px rgba(250,204,21,0.95);
  background: #fef9c3;
}

.lever-track {
  height: 150px;
  background: #14101d;
  border: 2px solid #483d60;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
}
.lever-shaft {
  width: 6px; height: 64px; background: #94a3b8;
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  border-radius: 3px; transition: top 0.16s ease;
}
.lever-knob {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f87171, #b91c1c);
  border: 2px solid #fecaca;
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  transition: top 0.16s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.lever-track.pulled .lever-knob { top: 106px; }
.lever-track.pulled .lever-shaft { top: 52px; }

.spin-actions { display: flex; flex-direction: column; gap: 7px; }
.btn-spin {
  width: 100%; padding: 12px; border-radius: 10px;
  background: linear-gradient(180deg, #22c55e, #15803d);
  border: 2px solid #86efac; color: #fff;
  font-size: 15px; font-weight: 900; letter-spacing: 0.03em;
  cursor: pointer; box-shadow: 0 4px 0 #14532d;
}
.btn-spin:hover { filter: brightness(1.08); }
.btn-spin:active { transform: translateY(2px); box-shadow: 0 2px 0 #14532d; }
.btn-spin:disabled { opacity: 0.55; cursor: not-allowed; }

.spin-subrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.btn-gold-spin {
  padding: 9px 10px; border-radius: 9px;
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border: 2px solid #7dd3fc; color: #fff;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.btn-gold-spin:hover { filter: brightness(1.1); }
.btn-autospin {
  padding: 9px 12px; border-radius: 9px;
  background: #27213a; border: 2px solid #4c406e; color: #cbd5e1;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.btn-autospin.active { background: #4c1d95; border-color: #c084fc; color: #fff; }

.relics-section {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
}
.relics-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 7px;
}
.mini-link {
  background: none; border: none; color: #fbbf24; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.relics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.relic-slot {
  aspect-ratio: 1; border-radius: 8px;
  background: #14101d; border: 2px dashed #3b3252;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 20px; position: relative; cursor: pointer;
}
.relic-slot.filled {
  border-style: solid; border-color: #a855f7; background: #231936;
}
.relic-slot.ready {
  border-color: #facc15; box-shadow: 0 0 10px rgba(250,204,21,0.5);
}
.relic-slot .relic-tag {
  font-size: 9px; color: #cbd5e1; font-weight: 700; margin-top: 2px;
}

.daily-chest-btn {
  width: 100%; padding: 9px; border-radius: 9px;
  background: rgba(245,158,11,0.14); border: 1px solid rgba(245,158,11,0.5);
  color: #fde68a; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.daily-chest-btn:disabled { opacity: 0.45; cursor: default; }

/* ARENA */
.arena-column {
  display: flex; flex-direction: column; gap: 10px;
}
.arena-frame {
  background: var(--panel);
  border: 3px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.world-banner {
  background: #161322;
  padding: 8px 14px;
  border-bottom: 2px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 800; color: #e2e8f0;
}
.wave-badge {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(99,102,241,0.2); color: #a5b4fc;
}
.wave-badge.combat { background: rgba(239,68,68,0.22); color: #fca5a5; }

.boss-bar-wrap {
  position: absolute; top: 48px; left: 50%; transform: translateX(-50%);
  width: 68%; z-index: 5; text-align: center;
}
.boss-name {
  font-size: 13px; font-weight: 900; color: #fecaca;
  text-shadow: 0 2px 6px #000; margin-bottom: 4px;
}
.boss-bar-bg {
  height: 14px; background: #0f172a; border: 2px solid #ef4444;
  border-radius: 7px; overflow: hidden;
}
.boss-bar-fill {
  height: 100%; background: linear-gradient(90deg, #dc2626, #f97316);
  transition: width 0.12s;
}

.summon-banner {
  position: absolute; top: 54px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,0.92); border: 2px solid #facc15;
  color: #fef08a; padding: 7px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 800; z-index: 6; pointer-events: none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

#arenaCanvas {
  display: block; width: 100%; height: auto;
  image-rendering: pixelated;
  background: #1b2432;
}

.arena-footer {
  background: #161322;
  border-top: 2px solid var(--border);
  padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}
.skills-bar { display: flex; gap: 7px; flex-wrap: wrap; }
.skill-btn {
  padding: 8px 11px; border-radius: 8px;
  background: #252038; border: 2px solid #473c66; color: #e2e8f0;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.skill-btn:hover { background: #332c4d; }
.skill-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-next-wave {
  padding: 10px 20px; border-radius: 10px;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  border: 2px solid #fca5a5; color: #fff;
  font-size: 14px; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 0 #7f1d1d;
}
.btn-next-wave:hover { filter: brightness(1.08); }
.btn-next-wave:disabled { opacity: 0.5; cursor: not-allowed; }

.roster-bar {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  min-height: 58px;
}
.roster-empty { color: var(--muted); font-size: 13px; }
.roster-chip {
  background: #151220; border: 1.5px solid #41375c;
  border-radius: 8px; padding: 5px 10px;
  font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.roster-chip.rare { border-color: #38bdf8; }
.roster-chip.legendary { border-color: #facc15; background: #262010; }
.roster-chip .sell-x {
  color: #f87171; cursor: pointer; font-weight: 900; margin-left: 4px;
}

/* MODALS */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(6,6,12,0.78);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 100; backdrop-filter: blur(4px);
}
.modal-box {
  background: #1b1728; border: 2px solid #4d406e;
  border-radius: 16px; width: 100%; max-width: 640px;
  max-height: 88vh; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}
.modal-wide { max-width: 820px; }
.modal-head {
  padding: 16px 20px; background: #141020; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-close {
  background: #2b243f; border: 1px solid #4a3f68; color: #fff;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px;
}

.gateway-strip {
  padding: 10px 20px; background: #191529; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}
.gateway-strip select {
  background: #0f0d18; color: #fff; border: 1px solid #4a3f68;
  border-radius: 7px; padding: 5px 10px; font-size: 12.5px;
}
.tx-counter { margin-left: auto; color: #86efac; font-weight: 700; }

.modal-tabs {
  display: flex; gap: 6px; padding: 12px 20px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.tab-btn {
  padding: 8px 14px; background: transparent; border: none;
  border-bottom: 3px solid transparent; color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.tab-btn.active { color: #fde047; border-bottom-color: #f59e0b; }

.modal-content {
  padding: 18px 20px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px;
}
.offer-card {
  background: #141020; border: 2px solid #393052; border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  position: relative;
}
.offer-card.popular { border-color: #f59e0b; background: #211a14; }
.offer-badge {
  position: absolute; top: -10px; right: 12px;
  background: #f59e0b; color: #1c1917; font-size: 10px; font-weight: 900;
  padding: 2px 8px; border-radius: 999px;
}
.offer-title { font-size: 15px; font-weight: 800; color: #fff; }
.offer-desc { font-size: 12.5px; color: #cbd5e1; line-height: 1.45; }
.offer-price-row { display: flex; align-items: baseline; gap: 8px; }
.offer-price { font-size: 19px; font-weight: 900; color: #fde047; }
.offer-old { font-size: 13px; color: #64748b; text-decoration: line-through; }
.btn-buy {
  width: 100%; padding: 9px; border-radius: 8px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border: 1px solid #fde68a; color: #1c1917; font-weight: 900; font-size: 13px; cursor: pointer;
}
.btn-buy:disabled { opacity: 0.45; cursor: default; }
.btn-buy-gem {
  background: linear-gradient(180deg, #38bdf8, #0284c7); color: #fff; border-color: #bae6fd;
}

.shop-footer {
  padding: 12px 20px; border-top: 1px solid var(--border); background: #141020; text-align: right;
}
.btn-reroll {
  padding: 8px 16px; border-radius: 8px; background: #31274a;
  border: 1px solid #63538c; color: #fff; font-weight: 700; cursor: pointer;
}

.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: #171326; border: 2px solid #f59e0b; color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 0.18s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   G4MINES — 5x5 GLOSSY TREASURE GRID & PROGRESS BAR
   ============================================================ */
.mines-trap-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
}
.mines-trap-badge.safe-scan {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.mines-progress-box {
  background: rgba(12, 8, 22, 0.62);
  border: 2px solid #4c3d6b;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mines-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
}
.mines-tier-tag {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.mines-tier-tag.tier-0 { background: #262038; color: #cbd5e1; }
.mines-tier-tag.tier-1 { background: #14532d; color: #86efac; border-color: #22c55e; }
.mines-tier-tag.tier-2 { background: #1e3a8a; color: #93c5fd; border-color: #38bdf8; }
.mines-tier-tag.tier-3 { background: #581c87; color: #e9d5ff; border-color: #c084fc; }
.mines-tier-tag.tier-4 {
  background: linear-gradient(90deg, #b45309, #f59e0b);
  color: #fffbeb;
  border-color: #fef08a;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.55);
}

.mines-progress-track {
  height: 10px;
  background: #0d0917;
  border: 2px solid #2e2444;
  border-radius: 999px;
  overflow: hidden;
}
.mines-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 40%, #a855f7 72%, #facc15 100%);
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.mines-tiers-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  font-size: 9.5px;
  font-weight: 800;
  text-align: center;
  color: #94a3b8;
}
.mines-tiers-legend span {
  padding: 2px 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.15s ease;
}
.mines-tiers-legend span.reached {
  color: #fef08a;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(250, 204, 21, 0.5);
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  background: linear-gradient(180deg, #161024 0%, #0e0a18 100%);
  border: 3px solid #4c3d6b;
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.7);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mines-grid.safe-scan-active {
  border-color: #38bdf8;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 18px rgba(56, 189, 248, 0.45);
}
.mines-grid.board-idle .mine-tile {
  opacity: 0.72;
}

.mine-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2.5px solid #1e0f08;
  background: linear-gradient(180deg, #4b3d72 0%, #30254f 58%, #211838 100%);
  box-shadow:
    0 3px 0 #140d24,
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  position: relative;
  transition: transform 0.08s ease, filter 0.12s ease, background 0.15s ease;
  padding: 0;
  color: #e2e8f0;
}
.mine-tile::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 3px;
  height: 30%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.mine-tile:hover:not(:disabled) {
  filter: brightness(1.16);
  transform: translateY(-1px);
  border-color: #f59e0b;
}
.mine-tile:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #140d24;
}
.mine-tile:disabled {
  cursor: default;
}

.mine-tile.safe {
  background: linear-gradient(180deg, #34d399 0%, #059669 60%, #047857 100%);
  border-color: #a7f3d0;
  box-shadow: 0 3px 0 #064e3b, 0 0 12px rgba(16, 185, 129, 0.65);
  animation: minePop 0.22s ease-out;
}
.mine-tile.safe.tier-high {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 60%, #b45309 100%);
  border-color: #fef9c3;
  box-shadow: 0 3px 0 #78350f, 0 0 14px rgba(250, 204, 21, 0.75);
}
.mine-tile.boom {
  background: linear-gradient(180deg, #ff6b6b 0%, #dc2626 60%, #991b1b 100%);
  border-color: #fecaca;
  box-shadow: 0 3px 0 #450a0a, 0 0 18px rgba(239, 68, 68, 0.9);
  animation: mineShake 0.35s ease;
}
.mine-tile.trap-reveal {
  background: linear-gradient(180deg, #451a1a 0%, #2a0d0d 100%);
  border-color: #7f1d1d;
  opacity: 0.82;
}
.mine-tile.safe-reveal {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  opacity: 0.45;
}

@keyframes minePop {
  0% { transform: scale(0.7); }
  65% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes mineShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-4deg); }
  40% { transform: translateX(4px) rotate(4deg); }
  60% { transform: translateX(-3px) rotate(-2deg); }
  80% { transform: translateX(3px) rotate(2deg); }
}

.btn-cashout {
  position: relative;
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 3px solid #1e0f08;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 58%, #d97706 100%);
  box-shadow: 0 5px 0 #92400e, inset 0 -3px 0 rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-family: "Rubik", "Fredoka", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.75),
    -1px -1px 0 rgba(0, 0, 0, 0.65),
    1px -1px 0 rgba(0, 0, 0, 0.65),
    -1px 1px 0 rgba(0, 0, 0, 0.65),
    1px 1px 0 rgba(0, 0, 0, 0.65);
  transition: transform 0.08s ease, filter 0.12s ease;
}
.btn-cashout::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 3px;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}
.btn-cashout:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-cashout:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #92400e; }
.btn-cashout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.btn-cashout.ready-glow {
  box-shadow: 0 5px 0 #92400e, 0 0 20px rgba(250, 204, 21, 0.7);
}
