/* ============================================================
   TRUE GAME UI OVERRIDE (Chunky 3D Glossy + Carved Wood & Parchment)
   Zero "web-app / vibecoding" look — 100% real mobile/Steam game UI!
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Rubik:wght@700;800;900&display=swap');

:root {
  --wood-dark: #2a160c;
  --wood-mid: #4a2816;
  --wood-light: #6e3d21;
  --gold-rim: #f59e0b;
  --gold-hi: #fef08a;
  --parchment: #f8e3be;
  --parchment-deep: #e8c794;
  --outline: #1e0f08;
}

body {
  background: radial-gradient(circle at 50% 0%, #311d3f 0%, #1c1026 55%, #110918 100%) !important;
  font-family: "Rubik", "Fredoka", "Segoe UI", system-ui, sans-serif !important;
}

.gg-coin-ico {
  width: 22px;
  height: 22px;
  vertical-align: -5px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.7));
}

/* ===== CHUNKY CARVED WOOD + GOLD TOP HUD ===== */
.hud-bar {
  background: linear-gradient(180deg, #5a321b 0%, #3d2010 55%, #2b150a 100%) !important;
  border: 3px solid var(--outline) !important;
  border-radius: 18px !important;
  padding: 10px 14px !important;
  box-shadow:
    0 6px 0 #160a04,
    0 12px 24px rgba(0, 0, 0, 0.6),
    inset 0 3px 0 rgba(255, 214, 153, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: none !important;
}

/* GAME TITLE RIBBON */
.logo-pill {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 60%, #d97706 100%) !important;
  border: 3px solid var(--outline) !important;
  border-radius: 14px !important;
  padding: 7px 16px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.05em !important;
  text-shadow:
    0 2px 0 #78350f,
    -1.5px -1.5px 0 #451a03,
    1.5px -1.5px 0 #451a03,
    -1.5px 1.5px 0 #451a03,
    1.5px 1.5px 0 #451a03 !important;
  box-shadow:
    0 4px 0 #92400e,
    inset 0 3px 0 rgba(255, 255, 255, 0.6) !important;
}

/* RECESSED WOODEN RESOURCE SLOTS */
.stat-pill {
  background: linear-gradient(180deg, #1d0e07 0%, #2c160c 100%) !important;
  border: 2.5px solid #8a512a !important;
  border-radius: 999px !important;
  padding: 5px 13px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #fff7ed !important;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.75),
    0 2px 0 rgba(255, 214, 153, 0.2) !important;
  gap: 6px !important;
}
.stat-pill b {
  color: #ffffff !important;
  text-shadow: 0 2px 0 #000 !important;
}
.stat-pill.stat-gg {
  border-color: #f59e0b !important;
  background: linear-gradient(180deg, #2b1806 0%, #422408 100%) !important;
}
.stat-pill.stat-gg .gg-label {
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #fde047 !important;
  text-shadow: 0 1.5px 0 #000 !important;
}
.stat-gem {
  border-color: #38bdf8 !important;
  background: linear-gradient(180deg, #0b2239 0%, #103354 100%) !important;
}
.stat-boss {
  border-color: #ef4444 !important;
  background: linear-gradient(180deg, #360c0c 0%, #4c1111 100%) !important;
  color: #fecaca !important;
}

/* CHUNKY 3D '+' BUTTON */
.plus-btn {
  width: 22px !important;
  height: 22px !important;
  border-radius: 7px !important;
  border: 2px solid var(--outline) !important;
  background: linear-gradient(180deg, #86efac 0%, #22c55e 55%, #16a34a 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  text-shadow: 0 1.5px 0 #14532d !important;
  box-shadow: 0 2px 0 #14532d, inset 0 2px 0 rgba(255, 255, 255, 0.55) !important;
}

/* ===== GLOSSY 3D GAME BUTTONS (Candy/Clash/Fantasy Style) ===== */
.hud-btn,
.btn-drop,
.btn-spin,
.btn-volley,
.btn-gold-spin,
.btn-autodrop,
.btn-autospin,
.btn-next-wave,
.btn-buy,
.btn-reroll,
.daily-chest-btn {
  position: relative;
  border: 3px solid var(--outline) !important;
  border-radius: 14px !important;
  font-family: "Rubik", "Fredoka", sans-serif !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  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) !important;
  transition: transform 0.08s ease, filter 0.12s ease !important;
}

/* Top glossy highlight pill on buttons */
.hud-btn::before,
.btn-drop::before,
.btn-spin::before,
.btn-volley::before,
.btn-gold-spin::before,
.btn-next-wave::before,
.btn-buy::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 3px;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.hud-btn {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 60%, #1d4ed8 100%) !important;
  padding: 7px 13px !important;
  font-size: 13px !important;
  box-shadow: 0 4px 0 #1e3a8a, inset 0 -2px 0 rgba(0, 0, 0, 0.25) !important;
}
.hud-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hud-btn:active { transform: translateY(3px) !important; box-shadow: 0 1px 0 #1e3a8a !important; }

/* GOLD DONATE BUTTON */
.hud-btn-donate {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #d97706 100%) !important;
  box-shadow: 0 4px 0 #92400e, 0 0 16px rgba(250, 204, 21, 0.45) !important;
}
.hud-btn-donate:active { box-shadow: 0 1px 0 #92400e !important; }

/* GREEN MAIN ACTION BUTTONS (SPIN / DROP / ROLL / BUY) */
.btn-spin,
.btn-drop,
.btn-buy {
  background: linear-gradient(180deg, #84f037 0%, #3bbf15 55%, #239109 100%) !important;
  box-shadow: 0 5px 0 #155c04, inset 0 -3px 0 rgba(0, 0, 0, 0.22) !important;
}
.btn-spin:active,
.btn-drop:active,
.btn-buy:active {
  transform: translateY(4px) !important;
  box-shadow: 0 1px 0 #155c04 !important;
}

/* BLUE PREMIUM / GEM BUTTONS */
.btn-gold-spin,
.btn-volley,
.btn-buy-gem {
  background: linear-gradient(180deg, #5ce1ff 0%, #0ea5e9 55%, #0369a1 100%) !important;
  box-shadow: 0 4px 0 #0c4a6e, inset 0 -2px 0 rgba(0, 0, 0, 0.22) !important;
}
.btn-gold-spin:active,
.btn-volley:active,
.btn-buy-gem:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #0c4a6e !important;
}

/* PURPLE AUTO / VIP / REROLL BUTTONS */
.btn-autospin,
.btn-autodrop,
.btn-reroll {
  background: linear-gradient(180deg, #d8b4fe 0%, #9333ea 55%, #6b21a8 100%) !important;
  box-shadow: 0 4px 0 #4c1d95 !important;
}

/* RED BATTLE / NEXT WAVE BUTTON */
.btn-next-wave {
  background: linear-gradient(180deg, #ff6b6b 0%, #ef4444 55%, #b91c1c 100%) !important;
  box-shadow: 0 5px 0 #7f1d1d, 0 0 16px rgba(239, 68, 68, 0.4) !important;
  padding: 11px 22px !important;
  font-size: 14.5px !important;
}
.btn-next-wave:active {
  transform: translateY(4px) !important;
  box-shadow: 0 1px 0 #7f1d1d !important;
}

/* DAILY CHEST ORANGE BUTTON */
.daily-chest-btn {
  background: linear-gradient(180deg, #fbbf24 0%, #ea580c 100%) !important;
  box-shadow: 0 4px 0 #7c2d12 !important;
}

/* ===== WOODEN ARENA FRAME & BOTTOM SKILL BAR ===== */
.arena-frame {
  background: linear-gradient(180deg, #4a2816 0%, #2a160c 100%) !important;
  border: 4px solid var(--outline) !important;
  border-radius: 18px !important;
  box-shadow:
    0 8px 0 #140904,
    0 16px 34px rgba(0, 0, 0, 0.65),
    inset 0 3px 0 rgba(255, 214, 153, 0.3) !important;
}
.world-banner {
  background: linear-gradient(180deg, #5a321b 0%, #3a1e0f 100%) !important;
  border-bottom: 3px solid var(--outline) !important;
  padding: 9px 16px !important;
  color: #fef3c7 !important;
  text-shadow: 0 2px 0 #1a0b04 !important;
}
.wave-badge {
  background: linear-gradient(180deg, #fde047, #f59e0b) !important;
  border: 2px solid var(--outline) !important;
  color: #451a03 !important;
  font-weight: 900 !important;
  padding: 3px 11px !important;
  box-shadow: 0 2px 0 #78350f !important;
}
.wave-badge.combat {
  background: linear-gradient(180deg, #ff6b6b, #dc2626) !important;
  color: #ffffff !important;
  text-shadow: 0 1.5px 0 #450a0a !important;
}

.arena-footer {
  background: linear-gradient(180deg, #462514 0%, #2b150a 100%) !important;
  border-top: 3px solid var(--outline) !important;
  padding: 12px 14px !important;
}

/* CHUNKY 3D SKILL GROUPS */
.skill-group {
  display: inline-flex !important;
  background: linear-gradient(180deg, #3b2011 0%, #241209 100%) !important;
  border: 3px solid var(--outline) !important;
  border-radius: 13px !important;
  box-shadow: 0 4px 0 #140904, inset 0 2px 0 rgba(255, 214, 153, 0.25) !important;
  overflow: hidden;
}
.skill-btn {
  background: linear-gradient(180deg, #6b3b20 0%, #492512 100%) !important;
  border: none !important;
  padding: 8px 11px !important;
  font-family: "Rubik", sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: #fff7ed !important;
  text-shadow: 0 1.5px 0 #000 !important;
}
.skill-btn:hover { filter: brightness(1.12); }
.skill-lv {
  background: #f59e0b !important;
  color: #1e0f08 !important;
  border: 1.5px solid #1e0f08 !important;
  border-radius: 6px !important;
  padding: 1px 5px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}
.skill-up-btn {
  background: linear-gradient(180deg, #84f037 0%, #2ea80e 100%) !important;
  border: none !important;
  border-left: 2.5px solid var(--outline) !important;
  color: #ffffff !important;
  font-family: "Rubik", sans-serif !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  padding: 0 10px !important;
  text-shadow: 0 1.5px 0 #14532d !important;
}
.skill-up-btn:hover { filter: brightness(1.1); }

/* WOODEN ROSTER TRAY */
.roster-bar {
  background: linear-gradient(180deg, #4a2816 0%, #2d170c 100%) !important;
  border: 3px solid var(--outline) !important;
  border-radius: 16px !important;
  box-shadow: 0 5px 0 #140904, inset 0 2px 0 rgba(255, 214, 153, 0.25) !important;
}
.roster-empty { color: #e8c794 !important; font-weight: 700 !important; }
.roster-chip {
  background: linear-gradient(180deg, #f8e3be 0%, #e5c38e 100%) !important;
  border: 2.5px solid var(--outline) !important;
  border-radius: 11px !important;
  color: #2a160c !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 0 #1a0c05, inset 0 2px 0 rgba(255, 255, 255, 0.6) !important;
}
.roster-chip.rare {
  background: linear-gradient(180deg, #dbeafe 0%, #93c5fd 100%) !important;
  border-color: #1e3a8a !important;
}
.roster-chip.legendary {
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 100%) !important;
  border-color: #78350f !important;
}

/* ===== WARM PARCHMENT & CARVED WOOD MODALS (Like Reference #4!) ===== */
.modal-box {
  background: var(--parchment) !important;
  border: 5px solid #c26a1b !important;
  outline: 3px solid var(--outline) !important;
  border-radius: 22px !important;
  color: #3a1f0f !important;
  box-shadow:
    0 12px 0 #6e3509,
    0 26px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 0 3px #fff3d9 !important;
}
.modal-head {
  background: linear-gradient(180deg, #ffb82e 0%, #ea7c0e 100%) !important;
  border-bottom: 3px solid #9a4708 !important;
  color: #ffffff !important;
}
.modal-head h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 0 #7c2d12, -1px -1px 0 #7c2d12, 1px -1px 0 #7c2d12 !important;
}
.modal-sub { color: #fef3c7 !important; font-weight: 600 !important; }
.modal-close {
  background: linear-gradient(180deg, #ff6b6b, #dc2626) !important;
  border: 2.5px solid var(--outline) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 0 #7f1d1d !important;
}

.gateway-strip {
  background: #ebd0a0 !important;
  border-bottom: 2px solid #cfa96d !important;
  color: #4a2816 !important;
  font-weight: 700 !important;
}
.gateway-strip select {
  background: #fff8eb !important;
  color: #2a160c !important;
  border: 2px solid #a86c2d !important;
  font-weight: 700 !important;
}
.tx-counter { color: #15803d !important; }

.modal-tabs {
  background: #f0d7aa !important;
  border-bottom: 2px solid #cfa96d !important;
}
.tab-btn {
  color: #6e3d21 !important;
  font-family: "Rubik", sans-serif !important;
  font-weight: 800 !important;
}
.tab-btn.active {
  color: #b45309 !important;
  border-bottom: 4px solid #ea580c !important;
}

.offer-card {
  background: #fff6e5 !important;
  border: 3px solid #cfa163 !important;
  border-radius: 16px !important;
  color: #3a1f0f !important;
  box-shadow: 0 4px 0 #b88442, inset 0 2px 0 #ffffff !important;
}
.offer-card.popular {
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 100%) !important;
  border-color: #d97706 !important;
  box-shadow: 0 4px 0 #92400e, inset 0 2px 0 #ffffff !important;
}
.offer-badge {
  background: linear-gradient(180deg, #ff5e5e, #dc2626) !important;
  color: #ffffff !important;
  border: 2px solid var(--outline) !important;
  box-shadow: 0 2px 0 #7f1d1d !important;
}
.offer-title { color: #2a160c !important; font-weight: 900 !important; }
.offer-desc { color: #5c3720 !important; font-weight: 600 !important; }
.offer-price { color: #b45309 !important; font-weight: 900 !important; }
.shop-footer {
  background: #ebd0a0 !important;
  border-top: 2px solid #cfa96d !important;
}

/* TOAST */
.toast {
  background: linear-gradient(180deg, #5a321b, #2b150a) !important;
  border: 3px solid #f59e0b !important;
  border-radius: 14px !important;
  color: #fef3c7 !important;
  box-shadow: 0 6px 0 #140904, 0 12px 28px rgba(0, 0, 0, 0.6) !important;
}


/* ============================================================
   FULL RESPONSIVE ADAPTATION (4K / 1920x1080 / 1366x768 / Tablet / Mobile)
   ============================================================ */

/* Fluid canvases everywhere */
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}
#arenaCanvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 840 / 460;
}
#plinkoCanvas, #wheelCanvas {
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto;
  margin-right: auto;
}

/* 1920x1080 & Ultrawide (Full HD / 2K / 4K) */
@media (min-width: 1600px) {
  .game-shell {
    max-width: 1480px !important;
    padding: 16px 24px 24px !important;
    gap: 14px !important;
  }
  .main-grid {
    grid-template-columns: 380px 1fr !important;
    gap: 18px !important;
  }
  .hud-bar { padding: 12px 18px !important; }
  .stat-pill { font-size: 14px !important; padding: 6px 14px !important; }
  .hud-btn { font-size: 13.5px !important; padding: 8px 15px !important; }
}

/* Standard Laptops (1024px - 1400px, e.g. 1366x768) */
@media (max-width: 1400px) and (min-width: 981px) {
  .game-shell {
    max-width: 100% !important;
    padding: 8px 12px 14px !important;
    gap: 10px !important;
  }
  .main-grid {
    grid-template-columns: 325px 1fr !important;
    gap: 12px !important;
  }
  .hud-bar { padding: 8px 10px !important; gap: 6px !important; }
  .stat-pill { font-size: 12.5px !important; padding: 4px 10px !important; }
  .hud-btn { font-size: 12px !important; padding: 6px 10px !important; }
}

/* Tablets & Small Laptops (<= 980px) */
@media (max-width: 980px) {
  .game-shell {
    padding: 8px 10px 24px !important;
    gap: 10px !important;
  }
  .main-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* Show Battle Arena FIRST on mobile/tablet so combat is immediately visible */
  .arena-column { order: -1; }
  .slot-column { width: 100% !important; max-width: 100% !important; }
  .hud-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .hud-left, .hud-right {
    justify-content: center !important;
    gap: 6px !important;
  }
  .arena-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .skills-bar {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .btn-next-wave {
    width: 100% !important;
    padding: 13px 16px !important;
    font-size: 15px !important;
  }
}

/* Smartphones (<= 560px: iPhone SE / iPhone 15 / Android) */
@media (max-width: 560px) {
  .game-shell { padding: 6px 6px 24px !important; gap: 8px !important; }
  .logo-pill { font-size: 13px !important; padding: 4px 10px !important; }
  .stat-pill {
    font-size: 11.5px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
  }
  .stat-pill.stat-gg .gg-label { display: none !important; }
  .gg-coin-ico { width: 17px !important; height: 17px !important; vertical-align: -3px !important; }
  .hud-btn {
    font-size: 11.5px !important;
    padding: 6px 9px !important;
    border-radius: 10px !important;
  }
  .world-banner {
    padding: 7px 10px !important;
    font-size: 12px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .skill-group { flex: 1 1 auto !important; justify-content: space-between !important; }
  .skill-btn { font-size: 11.5px !important; padding: 7px 8px !important; }
  .skill-up-btn { font-size: 11px !important; padding: 7px 8px !important; }
  .roster-bar {
    padding: 8px !important;
    gap: 6px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  .roster-chip { flex: 0 0 auto !important; font-size: 11.5px !important; }

  /* Modals fit cleanly inside mobile viewport */
  .modal-backdrop, .gg4-modal-backdrop { padding: 8px !important; }
  .modal-card, .gg4-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92dvh !important;
    border-radius: 16px !important;
  }
  .modal-content {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }
  .modal-tabs {
    padding: 8px 10px 0 !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn { white-space: nowrap !important; font-size: 12px !important; padding: 7px 10px !important; }
  .toast {
    left: 10px !important;
    right: 10px !important;
    bottom: 12px !important;
    text-align: center !important;
    font-size: 12.5px !important;
  }
}


/* ============================================================
   G4CARDS — BLACKJACK 21 SUMMON DECK STYLES (Chunky Glossy UI)
   ============================================================ */

.bj-table {
  background: radial-gradient(ellipse at 50% 35%, #166534 0%, #0f4c26 58%, #092e18 100%);
  border: 3.5px solid #1e0f08;
  border-radius: 16px;
  padding: 10px 10px 9px;
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(250, 204, 21, 0.25),
    0 4px 0 #140904;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
}

.bj-table.state-legendary {
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 0 0 3px #facc15,
    0 0 22px rgba(250, 204, 21, 0.65),
    0 4px 0 #78350f;
}

.bj-table.state-epic {
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 0 0 3px #c084fc,
    0 0 18px rgba(192, 132, 252, 0.5),
    0 4px 0 #4c1d95;
}

.bj-table.state-bust {
  background: radial-gradient(ellipse at 50% 35%, #7f1d1d 0%, #450a0a 70%, #2a0606 100%);
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.6),
    inset 0 0 0 3px #ef4444,
    0 0 18px rgba(239, 68, 68, 0.55),
    0 4px 0 #450a0a;
  animation: bjBustShake 0.34s ease;
}

@keyframes bjBustShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.bj-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bj-score-pill {
  background: linear-gradient(180deg, #1d0e07 0%, #2c160c 100%);
  border: 2.5px solid #f59e0b;
  border-radius: 12px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7), 0 2px 0 rgba(0, 0, 0, 0.45);
}

.bj-score-num {
  font-size: 22px;
  font-weight: 900;
  color: #fde047;
  line-height: 1;
  text-shadow: 0 2px 0 #000;
}

.bj-score-max {
  font-size: 12px;
  font-weight: 800;
  color: #cbd5e1;
}

.bj-score-pill.score-21 {
  border-color: #fef08a;
  background: linear-gradient(180deg, #854d0e, #422006);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.8);
}

.bj-score-pill.score-bust {
  border-color: #f87171;
  background: linear-gradient(180deg, #7f1d1d, #450a0a);
}
.bj-score-pill.score-bust .bj-score-num { color: #fecaca; }

.bj-status-badge {
  font-size: 11.5px;
  font-weight: 900;
  color: #fef3c7;
  background: rgba(0, 0, 0, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  text-align: right;
  text-shadow: 0 1.5px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 195px;
}

.bj-cards-fan {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  position: relative;
}

.bj-card {
  width: 68px;
  height: 98px;
  border-radius: 11px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 60%, #e2e8f0 100%);
  border: 3px solid #1e0f08;
  box-shadow:
    0 5px 0 rgba(15, 23, 42, 0.72),
    0 8px 16px rgba(0, 0, 0, 0.45),
    inset 0 2px 0 #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 6px;
  color: #0f172a;
  font-family: "Rubik", "Fredoka", sans-serif;
  flex-shrink: 0;
  margin-left: -14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: bjCardPop 0.24s cubic-bezier(0.22, 1.25, 0.36, 1) both;
}
.bj-card:first-child { margin-left: 0; }
.bj-card:hover {
  transform: translateY(-6px) scale(1.04) !important;
  z-index: 10;
}

.bj-card.red { color: #dc2626; }
.bj-card.black { color: #1e293b; }

.bj-card.card-gold {
  background: linear-gradient(165deg, #fef9c3 0%, #fde047 65%, #f59e0b 100%);
  border-color: #78350f;
  box-shadow:
    0 5px 0 #78350f,
    0 0 18px rgba(250, 204, 21, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.bj-card.card-back {
  background: repeating-linear-gradient(
    135deg,
    #7f1d1d 0px,
    #7f1d1d 7px,
    #991b1b 7px,
    #991b1b 14px
  );
  border: 3px solid #1e0f08;
  box-shadow:
    inset 0 0 0 4px #f59e0b,
    0 5px 0 rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  color: #fde047;
  font-size: 28px;
  text-shadow: 0 2px 0 #450a0a;
  margin-left: -10px;
}
.bj-card.card-back:first-child { margin-left: 0; }

.bj-card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  font-weight: 900;
  font-size: 14px;
  width: fit-content;
}
.bj-card-corner .suit-sm { font-size: 12px; }
.bj-card-corner.bot {
  align-self: flex-end;
  transform: rotate(180deg);
}
.bj-card-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.12));
}

@keyframes bjCardPop {
  0% { opacity: 0; transform: translateY(-18px) scale(0.75) rotate(-8deg); }
  100% { opacity: 1; }
}

/* Reward Tier Strip */
.bj-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.bj-tier {
  background: rgba(0, 0, 0, 0.36);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 4px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
.bj-tier b {
  font-size: 10.5px;
  font-weight: 900;
  color: #f8fafc;
}
.bj-tier span {
  font-size: 8.5px;
  font-weight: 800;
  color: #cbd5e1;
  line-height: 1.05;
}
.bj-tier.active {
  transform: translateY(-2px) scale(1.04);
  border-color: #86efac;
  background: rgba(22, 163, 74, 0.55);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}
.bj-tier[data-tier="rare"].active {
  border-color: #38bdf8;
  background: rgba(2, 132, 199, 0.6);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
}
.bj-tier[data-tier="epic"].active {
  border-color: #c084fc;
  background: rgba(147, 51, 234, 0.65);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.65);
}
.bj-tier.bj-tier-21 b { color: #fde047; }
.bj-tier.bj-tier-21.active {
  border-color: #fde047;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.85), rgba(180, 83, 9, 0.85));
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.85);
}
.bj-tier.bj-tier-21.active span { color: #fff; }
.bj-tier.bj-tier-bust b { color: #fca5a5; }
.bj-tier.bj-tier-bust.active {
  border-color: #ef4444;
  background: rgba(220, 38, 38, 0.75);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

/* Blackjack Hit & Stand Buttons */
.bj-play-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.btn-bj-hit,
.btn-bj-stand {
  position: relative;
  border: 3px solid var(--outline) !important;
  border-radius: 14px !important;
  padding: 10px 8px !important;
  font-family: "Rubik", "Fredoka", sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  cursor: pointer;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.75),
    -1px -1px 0 rgba(0, 0, 0, 0.6),
    1px -1px 0 rgba(0, 0, 0, 0.6),
    -1px 1px 0 rgba(0, 0, 0, 0.6),
    1px 1px 0 rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.08s ease, filter 0.12s ease !important;
}

.btn-bj-hit::before,
.btn-bj-stand::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 3px;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.btn-bj-hit {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 58%, #1d4ed8 100%) !important;
  box-shadow: 0 4px 0 #1e3a8a, inset 0 -2px 0 rgba(0, 0, 0, 0.25) !important;
}
.btn-bj-hit:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-bj-hit:active:not(:disabled) { transform: translateY(3px) !important; box-shadow: 0 1px 0 #1e3a8a !important; }

.btn-bj-stand {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
  box-shadow: 0 4px 0 #92400e, inset 0 -2px 0 rgba(0, 0, 0, 0.25) !important;
}
.btn-bj-stand:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-bj-stand:active:not(:disabled) { transform: translateY(3px) !important; box-shadow: 0 1px 0 #92400e !important; }

.btn-bj-stand.pulse-21 {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 55%, #ea580c 100%) !important;
  box-shadow: 0 4px 0 #7c2d12, 0 0 18px rgba(250, 204, 21, 0.85) !important;
}

.btn-bj-hit:disabled,
.btn-bj-stand:disabled,
.btn-gold-spin:disabled {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.45);
}
