:root {
  --bg-1: #071024;
  --bg-2: #102a54;
  --bg-3: #1a4b7e;
  --card: rgba(13, 24, 47, 0.7);
  --card-soft: rgba(20, 38, 73, 0.7);
  --text: #e9f2ff;
  --muted: #98b5dc;
  --accent: #3bd7ff;
  --accent-2: #ffc160;
  --danger: #ff7f73;
  --success: #5bf5a4;
  --border: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Cairo", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -20%, rgba(59, 215, 255, 0.2), transparent 55%),
    radial-gradient(1200px 500px at 90% 0%, rgba(255, 193, 96, 0.15), transparent 55%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
  overflow-x: hidden;
}

.bg-orbs span {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite;
}

.bg-orbs span:nth-child(1) {
  width: 260px;
  height: 260px;
  top: -80px;
  right: -60px;
  background: #2ad9ff;
}

.bg-orbs span:nth-child(2) {
  width: 220px;
  height: 220px;
  bottom: 12%;
  left: -60px;
  background: #ffb96a;
  animation-delay: 1.5s;
}

.bg-orbs span:nth-child(3) {
  width: 170px;
  height: 170px;
  top: 45%;
  right: 25%;
  background: #7effbf;
  animation-delay: 3s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -16px, 0) scale(1.06);
  }
}

.app-shell {
  width: min(960px, 94vw);
  margin: 18px auto 34px;
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  margin: 0 0 6px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
  margin: 0;
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 800;
}

h2,
h3 {
  margin: 0 0 10px;
  font-weight: 800;
}

.icon-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(7px);
}

.auth-card {
  max-width: 620px;
  animation: fade-up 0.55s ease;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 12px;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: rgba(59, 215, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 215, 255, 0.2);
}

.primary-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 800;
  color: #082030;
  background: linear-gradient(105deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
  margin: 0 0 10px;
}

.status-line {
  margin: 10px 0 0;
  min-height: 22px;
  color: var(--accent-2);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  animation: fade-up 0.4s ease both;
}

.quick-stats h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
}

.cooldown-line {
  margin: 0 0 12px;
  font-weight: 700;
  color: #d9ebff;
}

.games-grid-wrap {
  margin-bottom: 12px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
}

.game-card {
  background: var(--card-soft);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: fade-up 0.35s ease both;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 215, 255, 0.8);
}

.game-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-icon {
  font-size: 20px;
}

.game-title {
  font-weight: 800;
}

.game-mode {
  margin-inline-start: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mode-wheel {
  color: #ffdf8d;
}

.mode-dice {
  color: #9bf7ce;
}

.mode-pick {
  color: #9fddff;
}

.mode-roulette {
  color: #ffb7b7;
}

.game-card button {
  width: 100%;
}

.game-preview {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.game-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 45%, transparent 100%);
  transform: translateX(-120%);
  animation: preview-scan 2.8s ease-in-out infinite;
}

.game-preview-chip {
  min-width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(7, 17, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ecf6ff;
  font-size: 15px;
  font-weight: 800;
  transform: translateY(calc(var(--i, 0) * -1px));
}

.game-card[data-game-key="cash_boxes"] .game-preview {
  background: linear-gradient(135deg, rgba(255, 189, 108, 0.36), rgba(186, 103, 34, 0.22));
}

.game-card[data-game-key="european_roulette"] .game-preview {
  background: radial-gradient(circle at 24% 25%, rgba(255, 126, 126, 0.34), rgba(90, 16, 24, 0.45));
}

.game-card[data-game-key="cash_cards"] .game-preview {
  background: radial-gradient(circle at 20% 20%, rgba(114, 160, 255, 0.28), rgba(18, 39, 72, 0.45));
}

.game-card[data-game-key="golden_dice"] .game-preview {
  background: linear-gradient(150deg, rgba(255, 220, 126, 0.4), rgba(129, 89, 28, 0.24));
}

.game-card[data-game-key="treasure_vault"] .game-preview {
  background: linear-gradient(145deg, rgba(130, 180, 205, 0.28), rgba(48, 75, 96, 0.36));
}

.game-card[data-game-key="fortune_cubes"] .game-preview {
  background: linear-gradient(145deg, rgba(150, 228, 255, 0.35), rgba(55, 102, 150, 0.3));
}

.game-card[data-game-key="mystery_tickets"] .game-preview {
  background: linear-gradient(145deg, rgba(255, 173, 115, 0.34), rgba(165, 91, 53, 0.3));
}

.game-card[data-game-key="rocket_pick"] .game-preview {
  background: linear-gradient(145deg, rgba(109, 186, 255, 0.32), rgba(57, 95, 154, 0.32));
}

.game-card[data-game-key="number_rush"] .game-preview {
  background: linear-gradient(145deg, rgba(131, 255, 216, 0.28), rgba(47, 129, 122, 0.26));
}

.game-card[data-game-key="secret_envelope"] .game-preview {
  background: linear-gradient(145deg, rgba(255, 196, 145, 0.3), rgba(120, 72, 46, 0.28));
}

.withdraw-card {
  animation: fade-up 0.5s ease both;
}

.withdraw-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(480px, 92vw);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(9, 22, 42, 0.92);
  padding: 14px;
}

.game-modal-card {
  width: min(620px, 95vw);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

#gameModalHint {
  white-space: pre-line;
}

.game-arena {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(6, 15, 30, 0.58);
  min-height: 204px;
  display: grid;
  place-items: center;
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ghost-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.arena-pick-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.arena-pick-cell {
  min-height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(54, 106, 162, 0.68), rgba(29, 62, 103, 0.76));
  color: #ecf4ff;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px 6px;
  position: relative;
  overflow: hidden;
}

.arena-pick-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 0%, rgba(255, 255, 255, 0.24) 45%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.4s ease;
}

.arena-pick-cell:hover::after {
  transform: translateX(120%);
}

.arena-pick-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 215, 255, 0.86);
  box-shadow: 0 8px 24px rgba(20, 120, 180, 0.28);
}

.pick-symbol {
  font-size: 19px;
  line-height: 1;
}

.pick-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.arena-pick-cell.opened {
  background: linear-gradient(165deg, #ffe9b1, #ffba65);
  color: #152742;
}

.arena-pick-cell.selected {
  outline: 2px solid #87ffcd;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(135, 255, 205, 0.2);
}

.pick-grid-boxes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pick-grid-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pick-grid-vault {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pick-grid-tickets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pick-grid-rocket {
  grid-template-columns: 1fr;
}

.pick-grid-number {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pick-grid-envelope {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pick-cell-boxes {
  background: linear-gradient(160deg, rgba(255, 201, 119, 0.45), rgba(172, 103, 30, 0.55));
}

.pick-cell-cards {
  background:
    linear-gradient(160deg, rgba(100, 132, 255, 0.38), rgba(22, 41, 84, 0.76)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 6px, rgba(255, 255, 255, 0.01) 6px 12px);
}

.pick-cell-vault {
  background: linear-gradient(165deg, rgba(136, 170, 199, 0.5), rgba(49, 80, 107, 0.72));
}

.pick-cell-tickets {
  background: linear-gradient(160deg, rgba(255, 169, 101, 0.47), rgba(171, 84, 43, 0.62));
}

.pick-cell-rocket {
  min-height: 62px;
  background: linear-gradient(160deg, rgba(106, 190, 255, 0.44), rgba(38, 79, 139, 0.72));
}

.pick-cell-number {
  background: linear-gradient(160deg, rgba(120, 250, 210, 0.35), rgba(41, 101, 103, 0.66));
}

.pick-cell-envelope {
  background: linear-gradient(160deg, rgba(255, 205, 155, 0.4), rgba(129, 80, 55, 0.66));
}

.arena-roulette-wrap {
  width: min(520px, 100%);
  display: grid;
  gap: 10px;
}

.arena-roulette-stage {
  display: grid;
  place-items: center;
}

.roulette-wheel {
  position: relative;
  width: min(84vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 12px solid rgba(249, 224, 170, 0.84);
  background: radial-gradient(circle at 50% 50%, rgba(24, 48, 26, 0.88), rgba(13, 28, 16, 0.96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.roulette-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  transition: transform 3.2s cubic-bezier(0.08, 0.84, 0.18, 1);
}

.roulette-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 2px rgba(2, 8, 23, 0.42);
}

.roulette-red {
  background: #b4252c;
}

.roulette-black {
  background: #111827;
}

.roulette-green {
  background: #17823f;
}

.roulette-pointer {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 24px solid #f9d18f;
  z-index: 5;
}

.roulette-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fbe7b9, #d8a44f);
  border: 2px solid rgba(255, 242, 218, 0.85);
  z-index: 4;
}

.roulette-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #d3ecff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
  transform-origin: 50% 50%;
  transition: transform 3.2s cubic-bezier(0.1, 0.85, 0.2, 1);
  z-index: 4;
}

.roulette-wheel.is-spinning .roulette-ball {
  animation: roulette-ball-glow 0.28s linear infinite;
}

.roulette-bets {
  display: grid;
  gap: 8px;
}

.roulette-bet-group {
  display: grid;
  gap: 8px;
}

.roulette-bet-group:first-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roulette-bet-group:last-child {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roulette-bet-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(16, 35, 60, 0.82);
  color: #ecf7ff;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 8px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.roulette-bet-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 215, 255, 0.8);
}

.roulette-bet-btn.selected {
  border-color: rgba(255, 219, 132, 0.95);
  background: linear-gradient(130deg, rgba(255, 190, 95, 0.34), rgba(43, 30, 18, 0.82));
  box-shadow: 0 0 0 2px rgba(255, 219, 132, 0.24);
}

.roulette-bet-btn.bet-red {
  background: linear-gradient(140deg, rgba(185, 49, 64, 0.65), rgba(95, 17, 25, 0.82));
}

.roulette-bet-btn.bet-black {
  background: linear-gradient(140deg, rgba(56, 62, 77, 0.8), rgba(12, 16, 26, 0.9));
}

.roulette-result {
  margin: 0;
  min-height: 22px;
  text-align: center;
  color: #e8f4ff;
  font-weight: 800;
}

.roulette-result[data-color="red"] {
  color: #ff9fa7;
}

.roulette-result[data-color="black"] {
  color: #d3dcf0;
}

.roulette-result[data-color="green"] {
  color: #9cf2be;
}

.arena-wheel-wrap {
  position: relative;
  width: min(82vw, 300px);
  aspect-ratio: 1;
}

.arena-wheel-pointer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -6px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid #ffd176;
  z-index: 2;
}

.arena-wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid #f5be72;
  position: relative;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
  background: conic-gradient(
    #ffc26b 0deg 45deg,
    #ff9f5f 45deg 90deg,
    #ffd77e 90deg 135deg,
    #ff9755 135deg 180deg,
    #ffca73 180deg 225deg,
    #f98a52 225deg 270deg,
    #ffd17a 270deg 315deg,
    #47c788 315deg 360deg
  );
  transition: transform 2.4s cubic-bezier(0.16, 0.9, 0.13, 0.99);
}

.arena-wheel-disc span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  margin-left: -37px;
  margin-top: -108px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #1f2d40;
  line-height: 1.1;
  white-space: nowrap;
  transform-origin: 50% 108px;
  transform: rotate(calc((var(--idx) * 45deg) + 22.5deg));
}

.arena-wheel-cap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 245, 206, 0.85);
  background: radial-gradient(circle at 30% 30%, #ffe89b, #f4b75e 70%);
  box-shadow: 0 8px 24px rgba(245, 188, 107, 0.4);
}

.arena-dice-wrap {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.arena-die {
  min-height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(155deg, rgba(64, 123, 186, 0.65), rgba(30, 66, 108, 0.72));
  display: grid;
  place-items: center;
  font-size: clamp(30px, 6.5vw, 48px);
  font-weight: 800;
  color: #f3f8ff;
}

.die-value {
  display: inline-block;
}

.arena-dice-wrap.is-rolling .arena-die {
  animation: dice-shake 0.22s linear infinite;
}

.arena-dice-wrap.dice-golden {
  width: min(300px, 100%);
  grid-template-columns: 1fr;
}

.arena-dice-wrap.dice-golden .arena-die {
  min-height: 148px;
  border-radius: 24px;
}

.die-golden {
  background: linear-gradient(160deg, rgba(255, 223, 137, 0.95), rgba(209, 143, 50, 0.85));
  border-color: rgba(255, 238, 184, 0.9);
  color: #1e2434;
  box-shadow: inset 0 10px 22px rgba(255, 249, 228, 0.25), 0 18px 38px rgba(229, 168, 71, 0.38);
}

.die-golden .die-value {
  font-size: clamp(48px, 9vw, 72px);
  text-shadow: 0 3px 0 rgba(255, 245, 216, 0.45);
}

.arena-dice-wrap.dice-fortune .arena-die {
  background: linear-gradient(155deg, rgba(173, 227, 255, 0.62), rgba(67, 132, 184, 0.42));
  border-color: rgba(193, 239, 255, 0.72);
  color: #eef8ff;
  box-shadow: inset 0 0 22px rgba(212, 240, 255, 0.2), 0 14px 30px rgba(42, 102, 152, 0.3);
}

.arena-dice-wrap.dice-fortune .die-value {
  text-shadow: 0 2px 0 rgba(3, 35, 61, 0.45);
}

#gameModal[data-game-key="cash_boxes"] .game-arena {
  background: linear-gradient(145deg, rgba(25, 38, 61, 0.88), rgba(84, 49, 20, 0.48));
}

#gameModal[data-game-key="european_roulette"] .game-arena {
  background: radial-gradient(circle at 20% 15%, rgba(207, 54, 64, 0.2), rgba(24, 52, 26, 0.84));
}

#gameModal[data-game-key="cash_cards"] .game-arena {
  background: linear-gradient(145deg, rgba(20, 36, 71, 0.88), rgba(18, 27, 47, 0.68));
}

#gameModal[data-game-key="treasure_vault"] .game-arena {
  background: linear-gradient(145deg, rgba(16, 34, 55, 0.88), rgba(42, 72, 95, 0.48));
}

#gameModal[data-game-key="mystery_tickets"] .game-arena {
  background: linear-gradient(145deg, rgba(36, 30, 45, 0.9), rgba(123, 67, 34, 0.46));
}

#gameModal[data-game-key="rocket_pick"] .game-arena {
  background: linear-gradient(145deg, rgba(11, 30, 65, 0.9), rgba(28, 70, 129, 0.5));
}

#gameModal[data-game-key="number_rush"] .game-arena {
  background: linear-gradient(145deg, rgba(14, 42, 48, 0.9), rgba(32, 113, 108, 0.42));
}

#gameModal[data-game-key="secret_envelope"] .game-arena {
  background: linear-gradient(145deg, rgba(37, 28, 25, 0.9), rgba(112, 67, 42, 0.46));
}

#gameModal[data-game-key="golden_dice"] .game-arena {
  background: radial-gradient(circle at 20% 15%, rgba(255, 233, 148, 0.12), rgba(56, 40, 21, 0.72));
}

#gameModal[data-game-key="fortune_cubes"] .game-arena {
  background: radial-gradient(circle at 20% 15%, rgba(163, 223, 255, 0.14), rgba(20, 50, 82, 0.72));
}

@keyframes preview-scan {
  0%,
  40% {
    transform: translateX(-130%);
  }
  75%,
  100% {
    transform: translateX(140%);
  }
}

@keyframes roulette-ball-glow {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.36);
  }
}

@keyframes dice-shake {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-2px) rotate(-4deg);
  }
  50% {
    transform: translateY(0) rotate(4deg);
  }
  75% {
    transform: translateY(1px) rotate(-2deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.modal-body p {
  margin: 8px 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: 95vw;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .arena-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pick-grid-number {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pick-grid-rocket {
    grid-template-columns: 1fr;
  }

  .pick-grid-vault,
  .pick-grid-envelope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roulette-bet-group:last-child {
    grid-template-columns: 1fr;
  }

  .game-actions {
    grid-template-columns: 1fr;
  }
}
