/* ===================================================
   ROYAL SMASH 3D — Styles
   Mobile-first · iPad-adaptive · Royal aesthetic
   =================================================== */

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #060b1c;
  font-family: 'Arial Rounded MT Bold', 'Nunito', 'Arial', sans-serif;
}

/* ── Universal hidden utility ── */
.hidden {
  display: none !important;
}

/* ── Game Container ── */
#game-container {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background-color: #060b1c;
  background-image: url('../assets/bg_coastal.jpg');
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  transition: background-image 0.6s ease-in-out;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  touch-action: none;
  display: block;
}

/* ── HUD ── */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
#hud.hidden { display: none; }

.hud-top {
  position: relative;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top, 8px));
  gap: 6px;
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
}

.hud-top-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* ── Compact Royal Command Bar (Row 2) ── */
.hud-center-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  border-radius: 20px;
  padding: 3px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

/* Individual Stat Chips inside Command Bar */
.level-badge, .shot-badge, .target-badge, .timer-badge, .score-badge, .wave-badge {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  border-radius: 14px;
  padding: 4px 9px;
  height: 28px;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.level-badge {
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.9), rgba(147, 51, 234, 0.85));
  border: 1.5px solid #d8b4fe;
}
.level-badge .badge-lbl {
  color: #fef08a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
}
.level-badge .badge-num {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.shot-badge {
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.9), rgba(220, 38, 38, 0.85));
  border: 1.5px solid #fca5a5;
}
.shot-badge .badge-lbl {
  color: #fef08a;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.target-badge {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(217, 119, 6, 0.85));
  border: 1.5px solid #fde047;
}
.target-badge .badge-lbl {
  color: #fef08a;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.timer-badge {
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.9), rgba(2, 132, 199, 0.85));
  border: 1.5px solid #7dd3fc;
}
.timer-badge .badge-lbl {
  color: #e0f2fe;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.wave-badge {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(20, 184, 166, 0.85));
  border: 1.5px solid #5eead4;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
}
.wave-badge.hidden { display: none; }

.badge-icon { font-size: 12px; line-height: 1; }
.badge-num  { font-size: 15px; font-weight: 900; color: #fff; line-height: 1;
              text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.badge-num.lg { font-size: 16px; }
.badge-lbl  { font-size: 8px; font-weight: 800; color: #ffd700;
              letter-spacing: 1px; }

/* ── Stage Title Banner ── */
.stage-banner {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 20, 50, 0.92);
  border: 2px solid #ffd700;
  border-radius: 18px;
  padding: 6px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  pointer-events: none;
  animation: stageBannerAnim 2.4s ease forwards;
  z-index: 50;
  white-space: nowrap;
}
.stage-banner.hidden { display: none; }
.stage-num  { font-size: 10px; font-weight: 800; color: #ffd700; letter-spacing: 2px; }
.stage-name { font-size: 15px; font-weight: 900; color: #ffffff; letter-spacing: 1.5px; }

@keyframes stageBannerAnim {
  0%   { opacity: 0; transform: translate(-50%, -15px) scale(0.85); }
  15%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  80%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.95); }
}

/* ── Custom Target HUD Banner (Nested neatly under command bar) ── */
.custom-target-hud {
  align-self: center;
  margin-top: 2px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(76, 29, 149, 0.95));
  border: 1.8px solid #ffd700;
  border-radius: 20px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 12px rgba(255, 215, 0, 0.4);
  animation: glowPulse 2s infinite alternate;
  z-index: 60;
  pointer-events: none;
}
.custom-target-hud.hidden { display: none; }
.ct-icon { font-size: 14px; }
.ct-label { font-size: 11px; color: #fff; letter-spacing: 1px; font-weight: 800; }
.ct-label strong { color: #ffd700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }

@keyframes glowPulse {
  0% { box-shadow: 0 0 8px rgba(255,215,0,0.3); }
  100% { box-shadow: 0 0 18px rgba(255,215,0,0.8); }
}

/* ── Touch zone (drag to aim) ── */
#touch-zone {
  position: absolute;
  top: 90px;
  left: 0; right: 0; bottom: 0;
  pointer-events: auto;
  cursor: crosshair;
}

/* ── Aim hint ring ── */
.aim-hint {
  position: absolute;
  bottom: 142px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: aimPulse 2s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 15;
}
.aim-hint.dismissed {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}
.aim-inner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, #ffd700 100%);
  box-shadow: 0 0 14px #ffd700, 0 0 4px #fff;
}
.aim-label {
  font-size: 10px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
}
@keyframes aimPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(0.96); }
  50%       { opacity: 1.0; transform: translateX(-50%) scale(1.04); }
}

/* ── Bottom HUD Controls (Extended Tactile Ammo Tray across Full Width) ── */
.hud-bottom-controls {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 25;
  box-sizing: border-box;
}

/* ── Ammo Selector Tray (Full-Width Extended Carousel) ── */
.ammo-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
  width: 100%;
  max-width: 680px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 10px 6px 10px;
  scrollbar-width: none;
  background: rgba(10, 18, 38, 0.82);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.ammo-selector::-webkit-scrollbar { display: none; }

/* ── 3D Tactile Ammo Selection Cards ── */
.ammo-btn {
  position: relative;
  flex-shrink: 0;
  min-width: 54px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.8px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  user-select: none;
}
.ammo-btn:active {
  transform: scale(0.92);
}
.ammo-btn.active {
  background: linear-gradient(180deg, #1e40af 0%, #1e1b4b 100%);
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.7), 0 6px 14px rgba(0, 0, 0, 0.6);
  transform: translateY(-4px) scale(1.04);
}

.ammo-btn.premium-locked {
  opacity: 0.88;
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(180deg, #1f1d2b 0%, #111019 100%);
}
.ammo-btn.premium-locked .ammo-stock {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #fca5a5;
  font-size: 8px;
  padding: 1px 4px;
}
.ammo-btn.premium-locked:hover {
  border-color: #f59e0b;
}

/* Floating Stock Badge */
.ammo-stock {
  position: absolute;
  top: -5px;
  right: -4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid #fef08a;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  z-index: 2;
  pointer-events: none;
  line-height: 1.2;
}
.ammo-btn[data-type="normal"] .ammo-stock {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
  font-size: 11px;
}
.ammo-stock.gold-dot {
  background: linear-gradient(135deg, #ec4899, #be185d);
  border-color: #fbcfe8;
  font-size: 9px;
}

/* Ball Icon Pedestal */
.ammo-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  margin-top: 2px;
}
.ammo-icon {
  font-size: 19px;
  line-height: 1;
}
.ammo-lbl {
  font-size: 7.5px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.8px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Distinct Ball Aura Pedestals */
.ammo-btn[data-type="normal"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(203, 213, 225, 0.35) 0%, transparent 70%);
}
.ammo-btn[data-type="bomb"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="heavy"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="roller"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="slipper"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="boot"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(217, 119, 6, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="splash"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, transparent 70%);
}
.ammo-btn[data-type="cluster"] .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(234, 179, 8, 0.45) 0%, transparent 70%);
}
.btn-blaster-quick .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
}
.btn-market .ammo-icon-wrap {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35) 0%, transparent 70%);
}

/* ── 3D Arcade Crimson Powerhouse Fire Button ── */
.btn-fire {
  flex: 0 0 auto;
  pointer-events: auto;
  background: radial-gradient(circle at 50% 20%, #ff5252 0%, #dc2626 50%, #991b1b 100%);
  border: 3px solid #ffd700;
  border-radius: 30px;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 
    0 7px 0 #7f1d1d,
    0 12px 24px rgba(220, 38, 38, 0.55),
    0 0 16px rgba(255, 215, 0, 0.4),
    inset 0 2px 2px rgba(255, 255, 255, 0.7),
    inset 0 -3px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  touch-action: manipulation;
  user-select: none;
}
.btn-fire:active {
  transform: translateY(5px) scale(0.96);
  box-shadow: 
    0 2px 0 #7f1d1d,
    0 4px 10px rgba(220, 38, 38, 0.4),
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.6);
}
.fire-icon {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
  animation: fireFlicker 1.5s ease-in-out infinite alternate;
}
.fire-txt {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 215, 0, 0.6);
  line-height: 1;
}
@keyframes fireFlicker {
  0% { transform: scale(0.95) rotate(-3deg); filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6)); }
  100% { transform: scale(1.1) rotate(3deg); filter: drop-shadow(0 0 10px rgba(255, 235, 59, 0.9)); }
}

/* ── Screens (base) ── */
.screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen.hidden { display: none !important; }

.screen-card {
  background: rgba(8, 12, 40, 0.94);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 28px;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(92vw, 380px);
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px rgba(255,215,0,0.1);
}

/* ── Loading ── */
#loading-screen { background: linear-gradient(180deg, #0a1060 0%, #1a4abf 50%, #1e6e1e 100%); }

.loading-crown { font-size: 64px; animation: crownBounce 1.1s ease-in-out infinite; }
.varnams-crest-wrap {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(145deg, #fff5b0 0%, #ffd700 45%, #b45309 100%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 215, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: crownBounce 2.2s ease-in-out infinite;
}
.varnams-crest-img {
  width: 100%;
  height: 100%;
  border-radius: 19px;
  object-fit: cover;
  display: block;
}
.btn-install-pwa {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(21, 128, 61, 0.45)) !important;
  border-color: #4ade80 !important;
  color: #bbf7d0 !important;
}
@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-8px) rotate(3deg); }
}

.logo-text {
  font-size: 46px; font-weight: 900;
  text-align: center; line-height: 1;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #ffd700 55%, #ff8800 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(255,200,0,0.6));
}
.logo-exclaim { color: #ff4444; -webkit-text-fill-color: #ff4444; }

.loading-bar-wrap {
  width: 220px; height: 14px;
  background: rgba(255,255,255,0.12);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.25);
}
.loading-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffd700, #ff8800);
  border-radius: 7px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(255,180,0,0.7);
}
.loading-sub {
  font-size: 13px; color: #90b8ff; letter-spacing: 1.5px; text-align: center;
}

/* ── Menu ── */
#menu-screen { background: linear-gradient(180deg, #080f6e 0%, #1636cc 35%, #1a601a 75%, #0d3a0d 100%); }

.menu-bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 25%, rgba(255,200,0,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.menu-card { background: rgba(4,8,32,0.92); gap: 14px; }
.menu-crown { font-size: 64px; filter: drop-shadow(0 0 24px #ffd700); animation: crownBounce 2s ease-in-out infinite; }
.logo-sub { font-size: 12px; color: #80aaff; letter-spacing: 3px; font-weight: 700; margin-top: -6px; }

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.btn-play {
  background: linear-gradient(160deg, #22c55e 0%, #15803d 100%);
  border: none; border-bottom: 5px solid #14532d;
  border-radius: 50px;
  padding: 15px 44px;
  font-size: 24px; font-weight: 900; color: #fff;
  letter-spacing: 2px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  transition: transform 0.1s;
}
.btn-play:active { transform: translateY(3px); }

.btn-vip {
  background: linear-gradient(160deg, #f59e0b 0%, #b45309 100%);
  border: 2px solid #ffd700;
  border-radius: 50px;
  padding: 12px 18px;
  font-size: 14px; font-weight: 800; color: #fff;
  letter-spacing: 1px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transition: transform 0.1s;
}
.btn-vip:active { transform: scale(0.96); }

.tagline { font-size: 11px; color: #ffd700; letter-spacing: 3px; font-weight: 800; }

/* ── VIP Custom Target Modal ── */
#vip-modal {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}
.vip-card {
  width: min(94vw, 420px);
  max-height: 92vh;
  overflow-y: auto;
  margin: auto;
  padding: 20px 18px 24px;
  gap: 12px;
}
.vip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 2px;
}
.vip-card .vip-badge-tag,
.vip-badge-tag {
  font-size: 14.5px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(255, 215, 0, 0.35);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.vip-close {
  background: none;
  border: none;
  color: #ffd700;
  font-size: 22px;
  cursor: pointer;
}
.vip-intro {
  font-size: 12px;
  color: #cadcf8;
  text-align: center;
  line-height: 1.4;
}
.vip-preview-wrap {
  width: 120px; height: 120px;
  border: 3px solid #ffd700;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}
.vip-preview-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.vip-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vip-label {
  font-size: 11px;
  color: #ffd700;
  font-weight: 700;
}
.vip-input {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
/* 3D Avatar Style Selector Tabs */
.vip-style-selector {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.vip-style-tabs {
  display: flex;
  gap: 6px;
  width: 100%;
}
.vip-style-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 10px;
  padding: 8px 4px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.vip-style-tab:hover {
  background: rgba(255, 215, 0, 0.18);
  border-color: #ffd700;
}
.vip-style-tab.active {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

/* Quick Name Chips & Presets */
.vip-preset-row {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
}
.vip-preset-btn {
  flex: 1;
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  border-radius: 12px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.vip-preset-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #ffd700;
}
.vip-preset-btn.active {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}
.vip-preset-btn.photo {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #93c5fd;
}

.vip-name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.vip-chip, .vip-msg-chip {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.vip-chip:hover, .vip-msg-chip:hover, .vip-chip.active {
  background: rgba(245, 158, 11, 0.3);
  color: #fef08a;
  border-color: #ffd700;
  transform: translateY(-1px);
}
.vip-msg-chip {
  border-color: rgba(56, 189, 248, 0.35);
}
.vip-msg-chip:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: #38bdf8;
}

.vip-upload-row {
  width: 100%;
}
.btn-upload {
  display: block;
  text-align: center;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8);
  border: 2px solid #93c5fd;
  border-radius: 14px;
  padding: 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.vip-upload-hint {
  font-size: 10.5px;
  color: #94a3b8;
  text-align: center;
  margin-top: 4px;
  font-weight: 600;
}
.vip-privacy-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 9px 12px;
  margin-top: 6px;
  text-align: left;
}
.vip-privacy-title {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vip-privacy-body {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 3px;
}

.btn-vip-start {
  width: 100%;
  background: linear-gradient(160deg, #10b981 0%, #047857 100%);
  border: 2px solid #6ee7b7;
  border-radius: 50px;
  padding: 13px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.8px;
  margin-top: 6px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* ─── Interactive Photo Cropper Modal ─── */
.crop-card {
  width: min(92vw, 380px);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 2px solid #38bdf8;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.85);
  text-align: center;
}
.crop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.crop-title {
  font-size: 15px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.5px;
}
.crop-instructions {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  text-align: center;
}
.crop-inst-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 2px;
}
.crop-inst-desc {
  font-size: 10.5px;
  color: #e2e8f0;
  line-height: 1.35;
}
.crop-viewport-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: grab;
}
.crop-viewport-wrap:active {
  cursor: grabbing;
}
#crop-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.crop-stencil-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.55);
}
.crop-stencil-circle {
  position: relative;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 2.5px dashed #ffd700;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.8), 0 0 16px rgba(255,215,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-crosshair-h {
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(255,215,0,0.35);
}
.crop-crosshair-v {
  position: absolute;
  width: 1px;
  height: 100%;
  background: rgba(255,215,0,0.35);
}
.crop-guide-tag {
  position: absolute;
  bottom: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.75);
  color: #ffd700;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,215,0,0.4);
}
.crop-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}
.crop-ctrl-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}
.crop-slider {
  flex: 1;
  accent-color: #38bdf8;
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-crop-reset {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.crop-privacy-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
  text-align: left;
}
.crop-privacy-badge {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 2px;
}
.crop-privacy-text {
  font-size: 9.5px;
  color: #94a3b8;
  margin: 0 0 3px 0;
  line-height: 1.3;
}
.crop-safety-text {
  font-size: 9px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.3;
}
.crop-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}
.btn-crop-cancel {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.btn-crop-confirm {
  flex: 2;
  padding: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

/* ─── Target Locked / Confirmation Popup ─── */
.photo-confirm-card {
  width: min(90vw, 360px);
  text-align: center;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 2px solid #ffd700;
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 16px 45px rgba(0,0,0,0.85);
}
.photo-confirm-tag {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffd700;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.photo-confirm-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 12px;
}
.photo-confirm-preview-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 3px solid #ffd700;
  box-shadow: 0 0 20px rgba(255,215,0,0.5);
  background: #0f172a;
}
.photo-confirm-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.photo-confirm-crown {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}
.photo-confirm-name {
  font-size: 17px;
  font-weight: 900;
  color: #f8fafc;
}
.photo-confirm-mode-tag {
  font-size: 10px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.8px;
  margin-top: 2px;
}
.photo-confirm-sub {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 12px 0 16px;
}
.photo-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.btn-photo-change {
  width: 100%;
  padding: 11px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 800;
  color: #e2e8f0;
  cursor: pointer;
}
.btn-photo-change:hover {
  background: rgba(255,255,255,0.15);
}
.btn-photo-continue {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #10b981, #047857);
  border: 2px solid #6ee7b7;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

/* ── Win / Lose shared ── */
.result-card { width: min(88vw, 360px); }

.result-stars { font-size: 46px; animation: starPop 0.6s cubic-bezier(.17,.67,.5,1.3) forwards; }
@keyframes starPop { 0% { transform: scale(0.3); opacity:0; } 100% { transform: scale(1); opacity:1; } }

.result-title { font-size: 28px; font-weight: 900; text-align: center; }
.win-title  { color: #ffd700; text-shadow: 0 0 20px rgba(255,215,0,0.7), 0 2px 4px rgba(0,0,0,0.8); }
.lose-title { color: #ff4444; text-shadow: 0 0 20px rgba(255,60,60,0.7), 0 2px 4px rgba(0,0,0,0.8); }

.result-score { font-size: 22px; font-weight: 900; color: #ffd700; }
.result-sub   { font-size: 14px; color: rgba(255,255,255,0.85); text-align: center; }
.win-stats    { font-size: 13px; color: #a7f3d0; font-weight: 700; }
.result-icon  { font-size: 56px; }

.btn-next {
  background: linear-gradient(160deg, #22c55e, #15803d);
  border: none; border-bottom: 5px solid #14532d;
  border-radius: 40px; padding: 14px 44px;
  font-size: 19px; font-weight: 900; color: #fff;
  cursor: pointer; letter-spacing: 1px;
  width: 100%;
  transition: transform 0.1s;
}
.btn-next:active { transform: translateY(3px); }

.btn-retry {
  background: linear-gradient(160deg, #ef4444, #b91c1c);
  border: none; border-bottom: 5px solid #991b1b;
  border-radius: 40px; padding: 14px 44px;
  font-size: 19px; font-weight: 900; color: #fff;
  cursor: pointer; letter-spacing: 1px;
  width: 100%;
  transition: transform 0.1s;
}
.btn-retry:active { transform: translateY(3px); }

/* ── Combo banner ── */
.combo-banner {
  position: absolute;
  top: 36%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 34px; font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 24px #ffd700, 0 3px 6px rgba(0,0,0,0.9);
  pointer-events: none;
  z-index: 60;
  white-space: nowrap;
  animation: comboPop 0.9s ease forwards;
}
.combo-banner.hidden { display: none; }

@keyframes comboPop {
  0%   { transform: translate(-50%,-50%) scale(0.4); opacity:0; }
  20%  { transform: translate(-50%,-50%) scale(1.2); opacity:1; }
  75%  { transform: translate(-50%,-50%) scale(1);    opacity:1; }
  100% { transform: translate(-50%,-70%) scale(0.85); opacity:0; }
}

/* ── Comic Hit Popup ── */
.comic-popup {
  position: absolute;
  top: 25%; left: 50%;
  transform: translate(-50%, -50%);
  background: #ffeb3b;
  color: #d32f2f;
  border: 4px solid #000;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: 4px 4px 0 #000;
  pointer-events: none;
  z-index: 65;
  white-space: nowrap;
  animation: comicBubble 0.8s ease forwards;
}
.comic-popup.hidden { display: none; }

@keyframes comicBubble {
  0%   { transform: translate(-50%, -50%) scale(0.2) rotate(-15deg); opacity: 0; }
  30%  { transform: translate(-50%, -50%) scale(1.15) rotate(5deg); opacity: 1; }
  70%  { transform: translate(-50%, -50%) scale(1) rotate(-2deg); opacity: 1; }
  100% { transform: translate(-50%, -90%) scale(0.8); opacity: 0; }
}

/* ── iPad/Tablet adaptations ── */
@media (min-width: 768px) {
  .screen-card { padding: 44px 48px; width: min(70vw, 440px); }
  .logo-text   { font-size: 58px; }
  .btn-play    { font-size: 28px; padding: 18px 60px; }
  .badge-num   { font-size: 30px; }
  .badge-num.lg{ font-size: 34px; }
  .shot-badge, .target-badge, .level-badge, .score-badge, .timer-badge { min-width: 80px; padding: 6px 14px; }
  .combo-banner{ font-size: 46px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   v4.0 ECONOMY, ARSENAL SHOP, PALACE VICTORY, TIMER & REWARDED CONTINUES
══════════════════════════════════════════════════════════════════════════════ */

/* ── HUD Coins & Timer ── */
.hud-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}
.coin-badge {
  background: rgba(10, 20, 50, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  backdrop-filter: blur(6px);
}
.coin-badge.gold {
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
.coin-icon { font-size: 12px; }

.btn-hud-plus {
  background: linear-gradient(160deg, #ffd700, #f59e0b);
  border: 1px solid #fff;
  color: #111;
  font-size: 14px;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.1s;
}
.btn-hud-plus:active { transform: scale(0.9); }

.timer-badge {
  background: rgba(10, 20, 50, 0.85);
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  padding: 4px 9px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.timer-badge.urgent {
  border-color: #ff4444;
  animation: timerUrgent 0.8s ease-in-out infinite alternate;
}
@keyframes timerUrgent {
  0% { box-shadow: 0 0 6px #ff4444; transform: scale(0.98); }
  100% { box-shadow: 0 0 16px #ff2222; transform: scale(1.05); }
}

.shot-badge, .timer-badge {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.shot-badge:hover, .timer-badge:hover {
  transform: translateY(-1px) scale(1.04);
}
.shot-badge:active, .timer-badge:active {
  transform: scale(0.96);
}

.coin-badge {
  cursor: pointer;
  transition: transform 0.15s ease;
  user-select: none;
}
.coin-badge:hover {
  transform: scale(1.05);
}
.coin-badge:active {
  transform: scale(0.95);
}

/* ── Special Offers Treasury Banner in Shop ── */
.shop-treasury-banner {
  width: 100%;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border: 1.5px solid #ffd700;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}
.stb-left { display: flex; align-items: center; gap: 10px; }
.stb-icon { font-size: 24px; }
.stb-title { font-size: 13px; font-weight: 900; color: #ffd700; letter-spacing: 0.5px; }
.stb-sub { font-size: 10px; color: #e2e8f0; }
.btn-stb-action {
  background: linear-gradient(160deg, #ffd700, #f59e0b);
  border: none;
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 900;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Royal Treasury Coin Shop Modal ── */
.treasury-card {
  width: min(94vw, 440px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  border-color: #ffd700;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  box-shadow: 0 0 45px rgba(255, 215, 0, 0.45);
}
.treasury-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.treasury-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.treasury-sub {
  font-size: 12px;
  color: #cbd5e1;
  text-align: center;
  margin: 4px 0 12px;
}
.treasury-wallet-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.treasury-packs-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.treasury-pack-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.treasury-pack-card:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
}
.pack-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: linear-gradient(160deg, #ec4899, #db2777);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
}
.pack-badge.best {
  background: linear-gradient(160deg, #ffd700, #f59e0b);
  color: #111;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
}
.pack-left { display: flex; align-items: center; gap: 12px; }
.pack-icon { font-size: 32px; }
.pack-name { font-size: 14px; font-weight: 900; color: #fff; }
.pack-contents {
  font-size: 11px;
  color: #93c5fd;
  margin-top: 2px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pack-bonus { color: #f472b6; font-weight: 800; }
.btn-pack-buy {
  background: linear-gradient(160deg, #10b981, #059669);
  border: 1.5px solid #6ee7b7;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ── Simulated Checkout Modal ── */
.checkout-card {
  width: min(90vw, 380px);
  border-color: #38bdf8;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  padding: 24px 20px;
  text-align: center;
}
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.checkout-brand { font-size: 14px; font-weight: 900; color: #38bdf8; letter-spacing: 1px; }
.checkout-item-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 14px;
  margin: 16px 0;
  text-align: left;
}
.checkout-icon { font-size: 30px; }
.checkout-details { flex: 1; margin: 0 10px; }
.checkout-item-name { font-size: 13px; font-weight: 900; color: #fff; }
.checkout-item-sub { font-size: 11px; color: #94a3b8; }
.checkout-price-tag { font-size: 18px; font-weight: 900; color: #ffd700; }
.checkout-payment-methods { width: 100%; margin-bottom: 16px; }
.pay-method {
  display: flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  padding: 10px 14px;
  text-align: left;
}
.pay-icon { font-size: 20px; margin-right: 10px; }
.pay-info { flex: 1; }
.pay-name { display: block; font-size: 12px; font-weight: 900; color: #fff; }
.pay-sub { display: block; font-size: 10px; color: #94a3b8; }
.pay-check { color: #38bdf8; font-weight: 900; }
.btn-confirm-purchase {
  background: linear-gradient(160deg, #38bdf8, #0284c7);
  border: none;
  border-bottom: 4px solid #0369a1;
  border-radius: 20px;
  padding: 14px;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  width: 100%;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.checkout-security-note { font-size: 10px; color: #64748b; margin-top: 10px; }

/* ── Grand Palace Cinematic Screen ── */
#palace-victory-screen {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#palace-victory-screen.hidden { display: none !important; }

.palace-cinematic-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.palace-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  animation: heroKenBurns 18s ease-in-out infinite alternate;
  filter: brightness(0.85) contrast(1.1);
}
@keyframes heroKenBurns {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.12) translateY(-20px); }
}
.palace-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.palace-cinematic-overlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 440px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(10, 15, 30, 0.96) 100%);
  border: 2px solid #ffd700;
  border-radius: 24px;
  padding: 20px 18px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 45px rgba(255, 215, 0, 0.6);
  animation: overlaySlideUp 0.8s cubic-bezier(.17,.67,.5,1.2) forwards;
}
@keyframes overlaySlideUp {
  0% { opacity: 0; transform: translate(-50%, 40px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
.palace-crown-emblem { font-size: 36px; animation: crownFloat 2s ease-in-out infinite alternate; }
.palace-epic-title {
  font-size: 20px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 2px 4px #000;
  margin: 4px 0;
  letter-spacing: 0.5px;
}
.palace-epic-story {
  font-size: 12px;
  color: #f8fafc;
  line-height: 1.45;
  margin-bottom: 12px;
}
.palace-spoils-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 14px;
}
.spoils-title {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.spoils-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.spoil-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spoil-card.gold { border-color: #ffd700; background: rgba(255, 215, 0, 0.15); }
.sp-icon { font-size: 14px; }
.sp-val { font-size: 13px; font-weight: 900; color: #fff; line-height: 1.1; }
.spoil-card.gold .sp-val { color: #ffd700; }
.sp-lbl { font-size: 9px; color: #94a3b8; font-weight: 700; }

/* ── Win Screen Earnings ── */
.win-earnings-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 10px 0;
}
.earn-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.earn-pill.gold {
  border-color: #ffd700;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
}

/* ── Grand Palace Victory Screen ── */
.palace-card {
  width: min(92vw, 420px);
  border: 3px solid #ffd700;
  background: linear-gradient(180deg, rgba(26, 16, 60, 0.96) 0%, rgba(46, 16, 101, 0.96) 100%);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
  text-align: center;
}
.palace-crown { font-size: 42px; animation: crownFloat 2s ease-in-out infinite alternate; }
@keyframes crownFloat {
  0% { transform: translateY(0) scale(0.95); }
  100% { transform: translateY(-8px) scale(1.08); }
}
.palace-title {
  color: #ffd700;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 24px rgba(255,215,0,0.8);
  margin-top: 4px;
}
.palace-story {
  font-size: 13px;
  color: #f1f5f9;
  line-height: 1.5;
  margin: 10px 0;
}
.palace-fireworks-emojis {
  font-size: 24px;
  letter-spacing: 6px;
  margin: 8px 0 14px;
}
.btn-palace-advance {
  background: linear-gradient(160deg, #ffd700, #f59e0b) !important;
  color: #111 !important;
  border-bottom: 5px solid #b45309 !important;
}

/* ── Rewarded Continue Modal ── */
#continue-modal {
  background: rgba(4, 7, 24, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
}
.continue-card {
  width: min(92vw, 380px);
  border-color: #f59e0b;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.2);
}
.continue-icon { font-size: 48px; }
.continue-title { font-size: 24px; font-weight: 900; color: #f59e0b; }
.continue-sub { font-size: 13px; color: #e2e8f0; text-align: center; margin: 6px 0 16px; }
.continue-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.btn-continue-ad {
  background: linear-gradient(160deg, #10b981, #059669);
  border: 2px solid #6ee7b7;
  border-radius: 20px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.ad-badge {
  background: #ffd700;
  color: #111;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.btn-continue-coin {
  background: linear-gradient(160deg, #475569, #334155);
  border: 1.5px solid #94a3b8;
  border-radius: 20px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.btn-continue-gold {
  background: linear-gradient(160deg, #f59e0b, #d97706);
  border: 1.5px solid #fde68a;
  border-radius: 20px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #111;
  cursor: pointer;
}
.btn-continue-store {
  background: linear-gradient(160deg, #1e1b4b, #312e81);
  border: 1.5px solid #a855f7;
  border-radius: 20px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #f3e8ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-continue-store:active {
  transform: scale(0.97);
}
.btn-give-up {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

/* ── Simulated Rewarded Ad Overlay ── */
.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-overlay.hidden { display: none !important; }

.ad-container {
  width: min(88vw, 360px);
  background: linear-gradient(180deg, #1e1b4b, #0f172a);
  border: 2px solid #818cf8;
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.5);
  position: relative;
}
.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #818cf8;
  margin-bottom: 16px;
}
.ad-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-skip-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}
.ad-skip-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}
.ad-game-logo {
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  margin-bottom: 8px;
}
.ad-promo-text {
  font-size: 13px;
  color: #cadcf8;
  margin-bottom: 8px;
}
.ad-stars { font-size: 12px; color: #facc15; margin-bottom: 16px; }
.ad-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ad-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width 0.1s linear;
}
.ad-close-btn {
  background: linear-gradient(160deg, #22c55e, #16a34a);
  border: none;
  border-radius: 20px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  width: 100%;
  display: block;
}
.ad-close-btn.hidden { display: none !important; }
.ad-close-btn:active {
  transform: translateY(2px);
}

/* ══════════════════════════════════════════════════════════════════════════════
   DRAMATIC GOLD CELEBRATION MODAL & FLYING COIN SYSTEM
══════════════════════════════════════════════════════════════════════════════ */

.gold-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: goldOverlayFadeIn 0.4s ease-out forwards;
}
.gold-celebration-overlay.hidden { display: none !important; }

@keyframes goldOverlayFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.gold-celebration-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(30, 20, 0, 0.92) 0%, rgba(10, 8, 20, 0.97) 80%);
  backdrop-filter: blur(8px);
  z-index: 1;
}

/* ── Rotating Golden Sunburst God-Rays ── */
.gold-sunburst-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 215, 0, 0.28) 0deg 15deg,
    rgba(255, 170, 0, 0.04) 15deg 30deg
  );
  border-radius: 50%;
  animation: sunburstRotate 24s linear infinite;
  z-index: 2;
  pointer-events: none;
}
@keyframes sunburstRotate {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Celebration Card Content ── */
.gold-celebration-content {
  position: relative;
  z-index: 10;
  width: min(90vw, 400px);
  background: linear-gradient(180deg, rgba(35, 25, 60, 0.96) 0%, rgba(18, 12, 35, 0.98) 100%);
  border: 3px solid #ffd700;
  border-radius: 32px;
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.2);
  animation: goldContentPop 0.6s cubic-bezier(.17, .89, .32, 1.25) forwards;
}

@keyframes goldContentPop {
  0% { transform: scale(0.3) translateY(60px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.gold-celebration-badge {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 170, 0, 0.5), rgba(255, 215, 0, 0.3));
  border: 1.5px solid #ffd700;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  margin-bottom: 12px;
}

/* ── 3D Giant Gleaming Gold Medallion ── */
.gold-medallion-stage {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 8px 0 16px;
  perspective: 600px;
}

.gold-sparkles-layer {
  position: absolute;
  inset: -20px;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  font-size: 20px;
  animation: sparkleFloat 2s ease-in-out infinite alternate;
}
.sp-1 { top: 10%; left: 5%;  animation-delay: 0.1s; }
.sp-2 { top: 15%; right: 5%; animation-delay: 0.5s; font-size: 24px; }
.sp-3 { bottom: 10%; left: 10%; animation-delay: 0.9s; }
.sp-4 { bottom: 15%; right: 10%; animation-delay: 1.3s; font-size: 22px; }
.sp-5 { top: 50%; left: -10%; animation-delay: 0.7s; }

@keyframes sparkleFloat {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.3; }
  100% { transform: scale(1.3) rotate(35deg); opacity: 1; filter: drop-shadow(0 0 8px #ffd700); }
}

.gold-giant-medallion {
  width: 130px;
  height: 130px;
  margin: 5px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7a1 0%, #ffd700 35%, #d97706 70%, #78350f 100%);
  border: 6px solid #fef08a;
  box-shadow: 
    0 0 40px rgba(255, 215, 0, 0.8),
    0 12px 25px rgba(0, 0, 0, 0.6),
    inset 0 0 15px rgba(255, 255, 255, 0.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: medallionSpin 6s ease-in-out infinite alternate, medallionFloat 2.5s ease-in-out infinite alternate;
  transform-style: preserve-3d;
}

@keyframes medallionSpin {
  0%   { transform: rotateY(-20deg) rotateZ(-5deg); }
  50%  { transform: rotateY(25deg) rotateZ(6deg); }
  100% { transform: rotateY(-20deg) rotateZ(-5deg); }
}

@keyframes medallionFloat {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.gold-coin-inner {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px dashed #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #fde047 0%, #eab308 60%, #a16207 100%);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.gold-coin-crown {
  font-size: 44px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.gold-coin-sheen {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%);
  animation: sheenSweep 3s linear infinite;
  pointer-events: none;
}
@keyframes sheenSweep {
  0% { transform: translateY(-100%) translateX(-100%); }
  40% { transform: translateY(100%) translateX(100%); }
  100% { transform: translateY(100%) translateX(100%); }
}

.gold-celebration-title {
  font-size: 28px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 3px 6px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

/* ── Animated Dramatic Count-Up Display ── */
.gold-tally-container {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 14px 0 10px;
  width: 100%;
}

.gold-tally-item {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.gold-tally-item.gold {
  border-color: #ffd700;
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.2) 0%, rgba(161, 98, 7, 0.3) 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.gold-tally-item.silver {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.15) 0%, rgba(71, 85, 105, 0.25) 100%);
}

.tally-icon { font-size: 24px; margin-bottom: 2px; }
.tally-plus { font-size: 16px; font-weight: 900; color: #ffd700; display: inline; }
.tally-num {
  font-size: 28px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  line-height: 1.1;
  transition: transform 0.08s ease-out;
}
.gold-tally-item.silver .tally-num {
  color: #f1f5f9;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}
.tally-lbl {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #cadcf8;
  margin-top: 2px;
}

.gold-celebration-sub {
  font-size: 12px;
  color: #e2e8f0;
  margin: 4px 0 16px;
  font-weight: 600;
}

/* ── Big Pulsing Claim Treasure Button ── */
.btn-claim-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #facc15 0%, #eab308 50%, #ca8a04 100%);
  border: none;
  border-bottom: 5px solid #854d0e;
  border-radius: 40px;
  padding: 14px 28px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(234, 179, 8, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: claimBtnPulse 1.8s ease-in-out infinite alternate;
}

@keyframes claimBtnPulse {
  0% { transform: scale(0.98); box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4); }
  100% { transform: scale(1.03); box-shadow: 0 10px 35px rgba(255, 215, 0, 0.85); }
}

.btn-claim-gold:active {
  transform: translateY(3px) scale(0.98);
}

.claim-icon { font-size: 22px; }
.claim-txt {
  font-size: 16px;
  font-weight: 900;
  color: #1a0f00;
  letter-spacing: 0.8px;
}

.claim-shine {
  position: absolute;
  top: 0; left: -150%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: btnShine 2.5s infinite;
}
@keyframes btnShine {
  0% { left: -150%; }
  35% { left: 150%; }
  100% { left: 150%; }
}

/* ── Dynamic Flying Coin Chips ── */
.flying-coins-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.flying-coin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7a1 0%, #ffd700 45%, #d97706 80%, #78350f 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.9), 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  user-select: none;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

.coin-wallet-pulse {
  animation: walletGlowPulse 0.4s ease-out !important;
}

@keyframes walletGlowPulse {
  0%   { transform: scale(1); filter: drop-shadow(0 0 0px #ffd700); }
  50%  { transform: scale(1.35); filter: drop-shadow(0 0 20px #ffd700) brightness(1.4); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px #ffd700); }
}

/* ── HUD Left Group & Mini Action Badges ── */
.hud-left-group {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #ffd700;
  border-radius: 16px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, border-color 0.15s;
  backdrop-filter: blur(6px);
}
.player-badge:active { transform: scale(0.95); }
.player-name-txt {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edit-icon { font-size: 9px; opacity: 0.8; }

.btn-hud-icon {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #ffd700;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, background 0.15s;
  backdrop-filter: blur(6px);
}
.btn-hud-icon:active { transform: scale(0.90); }

/* ── Compact HUD Mode Toggle Pill ── */
.btn-hud-mode-pill {
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid #38bdf8;
  border-radius: 14px;
  height: 30px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 900;
  color: #38bdf8;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-hud-mode-pill.boss-active {
  border-color: #f59e0b;
  color: #ffd700;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25), rgba(15, 23, 42, 0.90));
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.btn-hud-mode-pill:active { transform: scale(0.92); }

/* ── Quick Blaster Button in Ammo Tray & Menu ── */
.btn-blaster-quick {
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.25), rgba(15, 23, 42, 0.85)) !important;
  border-color: #ec4899 !important;
}
.btn-blaster-quick .ammo-lbl {
  color: #f472b6 !important;
}
.blaster-svg {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}
.btn-blaster-menu .blaster-svg {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  vertical-align: -3px;
}
.shop-tab .blaster-svg {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -2px;
}

.btn-blaster-menu {
  background: linear-gradient(180deg, #ec4899 0%, #be185d 100%);
  border: 2px solid #fbcfe8;
  border-radius: 20px;
  padding: 12px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.45);
  transition: transform 0.1s, box-shadow 0.1s;
  width: 100%;
}
.btn-blaster-menu:active { transform: scale(0.96); }

/* (Consolidated into main HUD & Ammo system above) */

/* ── Menu Header & Mode Switch ── */
.menu-header-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-bottom: 6px;
}
.btn-menu-mini {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.btn-menu-mini:active { transform: scale(0.95); }

.mode-selector-wrap {
  width: 100%;
  margin: 4px 0 10px;
}
.mode-switch {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 30px;
  padding: 3px;
  cursor: pointer;
}
.mode-pill {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 25px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  transition: background 0.2s, color 0.2s;
}
.mode-pill.active {
  background: linear-gradient(180deg, #ffd700, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

/* ── Universal Modal Headers & Close Buttons ── */
.shop-header,
.profile-header,
.leaderboard-header,
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
  position: relative;
}

.shop-title,
.profile-title,
.leaderboard-title,
.checkout-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffffff 0%, #ffd700 65%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  color: #ffd700;
  font-size: 17px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
  flex-shrink: 0;
  outline: none;
  position: relative;
  z-index: 25;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
}
.modal-close:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
  color: #ffffff;
  transform: rotate(90deg) scale(1.08);
}
.modal-close:active {
  transform: scale(0.92);
}

/* ── Royal Shop Modal Card ── */
.shop-card {
  width: min(95vw, 440px);
  max-height: 88vh;
  padding: 20px 16px;
  background: linear-gradient(180deg, #131438 0%, #0d0e26 100%);
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 215, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Shop Tabs ── */
.shop-tabs-row {
  display: flex;
  width: 100%;
  gap: 8px;
  margin-bottom: 12px;
}
.shop-tab {
  flex: 1;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}
.shop-tab.active {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-color: #ffd700;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5);
}

/* ── Shop Wallet Row ── */
.shop-wallet-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 6px 0 12px 0 !important;
  padding: 8px 16px !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(255, 215, 0, 0.45) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
}

.shop-wallet-row .coin-badge {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 14px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
}

.shop-wallet-row .coin-badge.silver {
  background: rgba(148, 163, 184, 0.16) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #f8fafc !important;
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.2) !important;
}

.shop-wallet-row .coin-badge.gold {
  background: rgba(245, 158, 11, 0.20) !important;
  border: 1.5px solid #ffd700 !important;
  color: #ffd700 !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35) !important;
}

.shop-sub {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.35;
  width: 100%;
}

/* ── Shop Items Ammo Grid ── */
.shop-items-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 4px;
  box-sizing: border-box;
}

.shop-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  border-radius: 18px;
  padding: 12px 14px;
  gap: 12px;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.shop-item-card:hover {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(51, 65, 85, 0.92) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.2);
}

.shop-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  text-align: left;
}

.shop-item-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.shop-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.shop-item-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-item-name {
  font-size: 13.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.badge-stock-count {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.3);
  border: 1px solid #60a5fa;
  color: #bfdbfe;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.shop-item-desc {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.3;
}

.shop-item-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 90px;
}

.btn-buy-silver {
  background: linear-gradient(180deg, #475569, #1e293b);
  border: 1.5px solid #94a3b8;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 800;
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.12s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.btn-buy-silver:hover {
  border-color: #f1f5f9;
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn-buy-silver:active { transform: scale(0.96); }

.btn-buy-gold {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border: 1.5px solid #fde047;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.12s ease;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}
.btn-buy-gold:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.6);
}
.btn-buy-gold:active { transform: scale(0.96); }
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
  transition: all 0.1s ease;
}
.btn-buy-gold:active { transform: scale(0.95); }

.shop-tab-content.hidden { display: none; }

/* ── Blaster Skins Catalog ── */
.blaster-skins-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 48vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.blaster-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  padding: 10px 12px;
  gap: 10px;
  transition: all 0.15s;
}
.blaster-card.equipped {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.28);
}
.blaster-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.blaster-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.25);
}
.blaster-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.blaster-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #f59e0b;
  color: #000;
  font-weight: 900;
}
.blaster-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}
.blaster-perk {
  font-size: 10px;
  font-weight: 800;
  color: #38ef7d;
  background: rgba(56, 239, 125, 0.12);
  border: 1px solid rgba(56, 239, 125, 0.35);
  border-radius: 8px;
  padding: 3px 7px;
  margin-top: 4px;
  display: inline-block;
  line-height: 1.25;
}
.blaster-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
}
.btn-blaster-equip {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border: 1px solid #60a5fa;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}
.btn-blaster-equipped {
  background: rgba(34, 197, 94, 0.25);
  border: 1.5px solid #22c55e;
  border-radius: 12px;
  padding: 8px 12px;
  color: #4ade80;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.btn-blaster-buy-silver {
  background: linear-gradient(180deg, #64748b, #334155);
  border: 1px solid #94a3b8;
  border-radius: 10px;
  padding: 6px 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.btn-blaster-buy-gold {
  background: linear-gradient(180deg, #f59e0b, #b45309);
  border: 1px solid #fde047;
  border-radius: 10px;
  padding: 6px 10px;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

/* ── Insufficient Coins Prompt Modal & Overlays ── */
#need-coins-modal {
  z-index: 300 !important;
}
#shop-modal {
  z-index: 250 !important;
}
#checkout-modal {
  z-index: 450 !important;
}
#confirm-modal {
  z-index: 10000 !important;
}

/* ── Secure Checkout Modal Styles (Matching Chess Game) ── */
.payment-option-card {
  display: flex;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 2px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  margin-bottom: 8px !important;
  transition: all 0.18s ease !important;
  user-select: none;
}

.payment-option-card.is-hidden {
  display: none !important;
}

.payment-option-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.payment-option-card.selected {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35) !important;
}

.pay-radio-circle {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: rgba(0, 0, 0, 0.25) !important;
  transition: all 0.18s ease !important;
}

.payment-option-card.selected .pay-radio-circle {
  border-color: #f59e0b !important;
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6) !important;
}

.pay-radio-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: transparent !important;
  transition: all 0.18s ease !important;
}

.payment-option-card.selected .pay-radio-dot {
  background: #0f172a !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   👑 ROYAL VIP & COLLECTOR PASS CARDS (Treasury Vault)
   ══════════════════════════════════════════════════════════════════════════ */
.vip-pass-card {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
  border-radius: 18px !important;
  border: 1.5px solid #a855f7 !important;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.45) 0%, rgba(30, 27, 75, 0.90) 100%) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
.vip-pass-card:hover {
  transform: translateY(-2px) !important;
  border-color: #c084fc !important;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45) !important;
}

.vip-pass-card .vip-badge-tag {
  position: absolute !important;
  top: -10px !important;
  right: 14px !important;
  background: linear-gradient(135deg, #ffd700, #f59e0b) !important;
  color: #0f172a !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 2px 10px !important;
  border-radius: 10px !important;
  letter-spacing: 0.6px !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.6) !important;
  text-transform: uppercase !important;
  z-index: 2 !important;
}

.vip-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
  text-align: left !important;
}

.vip-icon {
  font-size: 32px !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 14px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.vip-name {
  font-size: 14.5px !important;
  font-weight: 900 !important;
  color: #ffd700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.3px !important;
}

.vip-desc {
  font-size: 11px !important;
  color: #e2e8f0 !important;
  line-height: 1.35 !important;
  margin-bottom: 4px !important;
}

.vip-price-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.vip-orig-price {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
}

.btn-vip-buy {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  padding: 8px 16px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
  transition: transform 0.12s ease, filter 0.12s ease !important;
  letter-spacing: 0.5px !important;
}
.btn-vip-buy:hover {
  filter: brightness(1.15) !important;
  transform: scale(1.04) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6) !important;
}
.btn-vip-buy:active {
  transform: scale(0.96) !important;
}
.need-coins-card {
  text-align: center;
  border-color: #ffd700;
  box-shadow: 0 20px 70px rgba(255, 215, 0, 0.35);
  width: min(92vw, 420px);
}
.need-coins-icon { font-size: 48px; }
.need-coins-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1px;
}
.need-coins-sub {
  font-size: 13px;
  color: #cbd5e1;
}
.need-coins-offer-box {
  width: 100%;
  background: rgba(255, 215, 0, 0.1);
  border: 2px dashed #ffd700;
  border-radius: 20px;
  padding: 14px;
  margin: 10px 0 6px 0;
  position: relative;
  box-sizing: border-box;
}
.offer-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd700;
  color: #111;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.offer-title { font-size: 16px; font-weight: 900; color: #ffd700; }
.offer-contents { font-size: 11px; color: #e2e8f0; margin: 4px 0 6px; }
.offer-price { font-size: 20px; font-weight: 900; color: #34d399; }

/* Value for money upgrade banner in need coins modal */
.need-coins-upgrade-box {
  width: 100%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}
.upgrade-info { text-align: left; }
.upgrade-tag { font-size: 9px; font-weight: 900; color: #f59e0b; }
.upgrade-name { font-size: 13px; font-weight: 800; color: #fff; }
.upgrade-sub { font-size: 10px; color: #94a3b8; }
.btn-upgrade-pack {
  background: linear-gradient(180deg, #10b981, #059669);
  color: #fff;
  border: 1px solid #34d399;
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.need-coins-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.btn-view-all-offers {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid #ffd700;
  border-radius: 25px;
  padding: 10px;
  font-weight: 800;
  color: #ffd700;
  cursor: pointer;
}
.btn-cancel-flat {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 6px;
}


/* ── Profile Modal ── */
.profile-card {
  width: min(92vw, 380px);
  text-align: center;
  gap: 14px;
}
.profile-crown-avatar { font-size: 54px; margin-bottom: 4px; }

/* ── Leaderboard Modal ── */
.leaderboard-card {
  width: min(94vw, 420px);
}
.leaderboard-my-card {
  width: 100%;
  background: linear-gradient(160deg, #1e3a8a, #172554);
  border: 2px solid #ffd700;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}
.leaderboard-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 4px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px 12px;
}
.leaderboard-row.top-1 {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.25), rgba(234, 179, 8, 0.05));
  border-color: #ffd700;
}
.lb-rank {
  font-size: 16px;
  font-weight: 900;
  color: #ffd700;
  min-width: 28px;
}
.lb-info {
  flex: 1;
  margin-left: 6px;
}
.lb-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}
.lb-title {
  font-size: 10px;
  color: #94a3b8;
}
.lb-score {
  text-align: right;
}
.lb-pts {
  font-size: 14px;
  font-weight: 900;
  color: #38bdf8;
}
.lb-stars {
  font-size: 10px;
  color: #facc15;
}

/* ── Tutorial / How To Play Modal ── */
.tutorial-card {
  width: min(94vw, 420px);
  max-height: 88vh;
  padding: 22px 18px;
  background: linear-gradient(180deg, #131438 0%, #0d0e26 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 215, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.tutorial-title {
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 0%, #ffd700 65%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.tutorial-tabs-row {
  display: flex;
  width: 100%;
  gap: 5px;
  margin-bottom: 14px;
}

.tut-tab {
  flex: 1;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tut-tab.active {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border-color: #fef08a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.tutorial-step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 220px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 18px;
  padding: 16px 14px;
  box-sizing: border-box;
}

.tut-icon-hero {
  font-size: 46px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  animation: heroPulse 1.8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.tut-step-title {
  font-size: 15px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-align: center;
}

.tut-step-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

.tutorial-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.btn-tut-nav {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid #ffd700;
  border-radius: 16px;
  padding: 10px;
  font-size: 13px;
  font-weight: 900;
  color: #ffd700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-tut-nav:hover {
  background: rgba(255, 215, 0, 0.2);
}
.btn-tut-nav:active {
  transform: scale(0.96);
}

/* ==========================================================================
   🏰 RETENTION, PLAYTIME & ENGAGEMENT OVERHAUL (v7.2)
   1. Hearts (Lives) Pill & Modal
   2. Crown Rush Win-Streak Pill
   3. Multi-Wave Badge & Cleared Banner
   4. 3-Star Mastery Rating & Star Chest Progress
   5. Royal Star Chest Celebration Modal
   6. My Kingdom Castle Restoration Meta-Game
   ========================================================================== */

/* ── 1. HUD Hearts (Lives) Pill ── */
.hud-hearts-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.85), rgba(185, 28, 28, 0.95));
  border: 1.5px solid rgba(254, 202, 202, 0.6);
  border-radius: 20px;
  padding: 4px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  pointer-events: auto;
}
.hud-hearts-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.6);
}
.hud-hearts-pill:active { transform: scale(0.95); }
.hud-hearts-pill .heart-timer {
  font-size: 10px;
  color: #fecaca;
  font-weight: 700;
}
.hud-hearts-pill.low-hearts {
  animation: heartPulse 1.2s infinite ease-in-out;
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
}

/* ── 2. HUD Crown Rush Win-Streak Pill ── */
.hud-streak-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid #fef08a;
  border-radius: 20px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
  animation: streakGlow 1.8s infinite alternate;
  pointer-events: auto;
}
@keyframes streakGlow {
  0% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
  100% { box-shadow: 0 0 14px rgba(245, 158, 11, 0.9); }
}

/* ── 3. Multi-Wave Indicator Badge ── */
.wave-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1.5px solid #7dd3fc;
  border-radius: 20px;
  padding: 4px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* ── Wave Cleared Mid-Level Cinematic Overlay ── */
.wave-cleared-banner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(135deg, rgba(13, 27, 122, 0.95), rgba(76, 29, 149, 0.95));
  border: 2px solid #38bdf8;
  border-radius: 24px;
  padding: 20px 32px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(56, 189, 248, 0.6);
  backdrop-filter: blur(12px);
  z-index: 1000;
  animation: waveBannerPop 2.2s forwards ease-out;
  pointer-events: none;
}
.wave-cleared-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #7dd3fc;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.wave-cleared-title {
  font-size: 26px;
  font-weight: 900;
  color: #f0f9ff;
  text-shadow: 0 2px 10px rgba(56, 189, 248, 0.8);
}
.wave-cleared-sub {
  font-size: 15px;
  font-weight: 800;
  color: #fef08a;
  margin-top: 6px;
}
@keyframes waveBannerPop {
  0% { opacity: 0; transform: translate(-50%, -45%) scale(0.7); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -55%) scale(0.9); }
}

/* ── 4. HUD Star Chest & My Kingdom Buttons ── */
.hud-star-chest-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  border: 1.5px solid #fbbf24;
  border-radius: 20px;
  padding: 4px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
  transition: transform 0.15s;
  pointer-events: auto;
}
.hud-star-chest-btn:hover { transform: scale(1.06); }
.hud-star-chest-btn:active { transform: scale(0.95); }
.hud-star-chest-btn.chest-ready {
  animation: chestReadyPulse 1s infinite alternate;
}
@keyframes chestReadyPulse {
  0% { transform: scale(1); box-shadow: 0 0 8px #fbbf24; }
  100% { transform: scale(1.1); box-shadow: 0 0 20px #fbbf24, 0 0 30px #7c3aed; }
}

.hud-kingdom-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #b45309, #78350f);
  border: 1.5px solid #fde047;
  border-radius: 20px;
  padding: 4px 10px;
  color: #fef08a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.4);
  transition: transform 0.15s;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hud-kingdom-btn:hover { transform: scale(1.06); }
.hud-kingdom-btn:active { transform: scale(0.95); }
.hud-kingdom-btn * { pointer-events: none; }
.hud-star-chest-btn * { pointer-events: none; }
.hud-hearts-pill * { pointer-events: none; }

/* ── 5. Win Screen: 3-Star Animated Rating & Chest Progress ── */
.win-star-rating-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0 10px;
}
.win-stars-row {
  display: flex;
  gap: 12px;
  font-size: 42px;
}
.star-slot {
  display: inline-block;
  opacity: 0.25;
  filter: grayscale(1);
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.star-slot.earned {
  opacity: 1;
  filter: grayscale(0) drop-shadow(0 0 12px #fbbf24);
  transform: scale(1.2);
}
.win-star-tier-title {
  font-size: 16px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.6);
  margin-top: 4px;
}

.win-chest-meter-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 8px 0;
  box-sizing: border-box;
}
.chest-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  margin-bottom: 5px;
}
.chest-meter-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}
.chest-meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 6px;
  transition: width 0.6s ease-out;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

/* ── 6. Royal Star Chest Celebration Modal ── */
.star-chest-card {
  max-width: 440px;
  text-align: center;
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #1e1b4b 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
}
.chest-animated-icon {
  font-size: 64px;
  animation: chestBounce 1s infinite alternate ease-in-out;
  margin: 10px 0;
}
@keyframes chestBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-10px) scale(1.1); filter: drop-shadow(0 0 20px #fbbf24); }
}
.star-chest-title {
  font-size: 22px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.6);
}
.star-chest-sub {
  font-size: 13px;
  color: #e0e7ff;
  margin: 6px 0 16px;
}
.chest-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.chest-reward-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chest-reward-card .cr-icon { font-size: 22px; }
.chest-reward-card .cr-val { font-size: 13px; font-weight: 900; color: #fde68a; margin: 2px 0; }
.chest-reward-card .cr-lbl { font-size: 9px; font-weight: 700; color: #cbd5e1; }
.btn-chest-claim {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1e1b4b;
  font-weight: 900;
  font-size: 16px;
  border-radius: 18px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.5);
  border: none;
  width: 100%;
}
.btn-chest-claim:active { transform: scale(0.96); }

/* ── 7. Royal Hearts Refill Modal ── */
.hearts-card {
  max-width: 400px;
  text-align: center;
  position: relative;
}
.hearts-hero-icon {
  font-size: 56px;
  margin: 8px 0;
  filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.6));
}
.hearts-title {
  font-size: 20px;
  font-weight: 900;
  color: #fee2e2;
}
.hearts-current-txt {
  font-size: 16px;
  font-weight: 900;
  color: #ef4444;
  margin: 4px 0;
}
.hearts-regen-txt {
  font-size: 12px;
  color: #fca5a5;
  font-weight: 700;
}
.hearts-tip {
  font-size: 11px;
  color: #94a3b8;
  margin: 12px 0 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 8px;
}
.hearts-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hearts-option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px 14px;
}
.ho-info { text-align: left; }
.ho-title { display: block; font-size: 14px; font-weight: 900; color: #fff; }
.ho-sub { display: block; font-size: 11px; color: #cbd5e1; }
.btn-ho-action {
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  border: none;
}
.btn-ho-action.gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1e1b4b;
}
.btn-ho-action.ad {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff;
}
.btn-ho-action:active { transform: scale(0.95); }

/* ── 8. My Kingdom Castle Restoration Modal ── */
#kingdom-modal {
  background: rgba(4, 6, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 250;
  pointer-events: auto;
}
.kingdom-card {
  max-width: 520px;
  width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: linear-gradient(170deg, #1e1b4b 0%, #1e293b 100%);
  border: 2px solid #fbbf24;
}
.kingdom-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.kingdom-title {
  font-size: 20px;
  font-weight: 900;
  color: #fbbf24;
}
.kingdom-stars-badge {
  font-size: 13px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}
.kingdom-tabs-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kingdom-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 8px 6px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.kingdom-tab.active {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1e1b4b;
  border-color: #fbbf24;
}
.kingdom-area-banner {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: left;
}
.kab-title {
  font-size: 15px;
  font-weight: 900;
  color: #f8fafc;
}
.kab-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.kingdom-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}
.kingdom-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  transition: all 0.15s;
}
.kingdom-item-card.restored {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
}
.kic-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.kic-icon { font-size: 28px; }
.kic-name { font-size: 14px; font-weight: 900; color: #f8fafc; }
.kic-perk { font-size: 11px; color: #fbbf24; font-weight: 700; margin-top: 2px; }
.btn-kic-restore {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1e1b4b;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.btn-kic-restore:active { transform: scale(0.95); }
.kic-restored-tag {
  color: #4ade80;
  font-size: 12px;
  font-weight: 900;
  background: rgba(34, 197, 94, 0.2);
  padding: 6px 12px;
  border-radius: 10px;
}

/* ==========================================================================
   📱 MOBILE RESPONSIVE 2-TIER HUD (Portrait & Small Screens)
   Ensures 100% visibility for Hearts, Streak, Star Chest, Kingdom & Stats
   ========================================================================== */
@media (max-width: 768px), (orientation: portrait) {
  .hud-top {
    padding: 6px 8px;
    padding-top: max(6px, env(safe-area-inset-top, 6px));
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  .hud-top-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Row 1: Left Meta Controls (Home, Hearts, Streak) */
  .hud-left-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 1 auto;
  }

  .hud-left-group .player-badge,
  .hud-left-group #sound-toggle-btn,
  .hud-left-group #hud-help-btn,
  .hud-left-group #hud-mode-toggle-btn {
    display: none; /* Keep gameplay view clean on mobile; accessed via pause/home */
  }

  .hud-hearts-pill {
    padding: 3px 7px;
    font-size: 11px;
    gap: 3px;
  }

  .hud-streak-pill {
    padding: 3px 6px;
    font-size: 10px;
    gap: 2px;
  }

  .btn-hud-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  /* Row 1: Right Treasury & Meta Progression (Star Chest, Kingdom, Wallet) */
  .hud-coins {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 1 auto;
    justify-content: flex-end;
  }

  .hud-star-chest-btn {
    padding: 3px 6px;
    font-size: 10px;
    gap: 3px;
  }

  .hud-kingdom-btn {
    padding: 3px 6px;
    font-size: 10px;
    gap: 3px;
  }

  .hud-top-bar .coin-badge,
  #hud .coin-badge {
    padding: 3px 6px;
    font-size: 11px;
    gap: 2px;
  }
  .hud-top-bar .coin-badge.silver,
  #hud .coin-badge.silver {
    display: none; /* Hide silver strictly on compact mobile top bar to prioritize Gold, Star Chest & Kingdom */
  }

  .btn-hud-plus {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  /* Row 2: Centered Sleek Command Bar (Level, Shots, Targets, Time, Wave) */
  .hud-center-group {
    width: auto;
    max-width: 98%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
    padding: 2px 5px;
    border-radius: 16px;
  }

  .level-badge, .shot-badge, .target-badge, .timer-badge, .wave-badge {
    height: 26px;
    padding: 2px 7px;
    gap: 3px;
    border-radius: 11px;
  }

  .badge-icon {
    font-size: 11px;
  }
  .badge-num {
    font-size: 14px;
  }
  .badge-num.lg {
    font-size: 15px;
  }
  .badge-lbl {
    font-size: 7px;
    letter-spacing: 0.6px;
  }

  .wave-badge {
    padding: 2px 6px;
    font-size: 9.5px;
    border-radius: 11px;
  }

  .custom-target-hud {
    padding: 3px 10px;
    margin-top: 2px;
    border-radius: 16px;
  }
  .ct-icon { font-size: 12px; }
  .ct-label { font-size: 9.5px; }

  #touch-zone {
    top: 85px;
  }

  /* ── Mobile Ergonomics for Bottom Controls ── */
  .word-reveal-panel {
    bottom: 84px;
    left: 8px;
    width: 160px;
    padding: 20px 8px 6px 8px;
  }
  .wrp-boss-badge {
    width: 36px;
    height: 36px;
    top: -18px;
  }
  .wrp-boss-crown {
    font-size: 12px;
    top: -10px;
  }
  .wrp-word-chip {
    font-size: 10px;
    padding: 1px 5px;
  }

  .hud-bottom-controls {
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    left: 8px;
    right: 8px;
    gap: 8px;
  }


  .ammo-selector {
    padding: 6px 5px 3px 5px;
    border-radius: 18px;
    gap: 6px;
  }

  .ammo-btn {
    min-width: 48px;
    height: 58px;
    border-radius: 14px;
    padding: 3px 2px;
  }
  .ammo-icon-wrap {
    width: 26px;
    height: 26px;
  }
  .ammo-icon { font-size: 16px; }
  .ammo-lbl { font-size: 6.5px; letter-spacing: 0.5px; }
  .ammo-stock {
    font-size: 8.5px;
    padding: 1px 4px;
    top: -5px;
    right: -3px;
  }

  .btn-fire {
    height: 56px;
    min-width: 102px;
    padding: 0 16px;
    border-radius: 28px;
    box-shadow: 
      0 5px 0 #7f1d1d,
      0 8px 18px rgba(220, 38, 38, 0.55),
      0 0 12px rgba(255, 215, 0, 0.35),
      inset 0 2px 2px rgba(255, 255, 255, 0.7);
  }
  .btn-fire:active {
    transform: translateY(4px) scale(0.96);
    box-shadow: 0 1px 0 #7f1d1d, 0 3px 8px rgba(220, 38, 38, 0.4);
  }
  .fire-icon { font-size: 20px; }
  .fire-txt { font-size: 18px; letter-spacing: 1.5px; }

  .aim-hint {
    bottom: 135px;
  }
  .aim-label {
    font-size: 9px;
    padding: 3px 8px;
    letter-spacing: 1px;
  }
}

/* ── Menu & Win Screen Kingdom Navigation Buttons ── */
.btn-kingdom-menu {
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 2px solid #fde047;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
  touch-action: manipulation;
}
.btn-kingdom-menu:active { transform: scale(0.96); }

.btn-kingdom-win {
  background: linear-gradient(135deg, #b45309, #78350f);
  border: 2px solid #fde047;
  border-radius: 20px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 900;
  color: #fef08a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.4);
  transition: transform 0.15s;
  margin-top: 6px;
  width: 100%;
  touch-action: manipulation;
}
.btn-kingdom-win:active { transform: scale(0.96); }

/* ── 9. Royal Fever Mode Screen Border Glow ── */
body.royal-fever-active #game-container {
  box-shadow: inset 0 0 55px rgba(255, 215, 0, 0.9), inset 0 0 110px rgba(245, 158, 11, 0.7);
  animation: feverBorderPulse 0.75s ease-in-out infinite alternate;
}
@keyframes feverBorderPulse {
  0%   { box-shadow: inset 0 0 40px rgba(255, 215, 0, 0.65), inset 0 0 80px rgba(245, 158, 11, 0.45); }
  100% { box-shadow: inset 0 0 75px rgba(255, 215, 0, 1.0),  inset 0 0 140px rgba(245, 158, 11, 0.9); }
}

/* ══════════════════════════════════════════════════════════════════════════
   👑 PREMIUM BOSS FACE OVERLAY — VTO-Quality Portrait Pinned to 3D Head
   ══════════════════════════════════════════════════════════════════════════ */
.boss-face-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  border-radius: 50%;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 3px solid #ffd700;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.25),
    0 0 14px rgba(255, 200, 0, 0.65),
    0 0 28px rgba(255, 150, 0, 0.30);
  will-change: transform, left, top, filter;
  /* transition only filter for snappy position tracking */
  transition: filter 0.08s ease;
  display: none;  /* hidden until updateOverlayPosition sets display:block */
}

.boss-face-overlay .boss-overlay-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* ── Premium Combat Hit Flash & Shake ─────────────────────────────────── */
.boss-face-overlay.boss-hit {
  animation: boss-face-hit 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

@keyframes boss-face-hit {
  0%   { transform: translate(-50%, -50%) scale(1.00) rotate(0deg);
         filter: brightness(1.0) saturate(1.0); }
  10%  { transform: translate(-47%, -54%) scale(1.22) rotate(-7deg);
         filter: brightness(4.5) saturate(0) sepia(0.3); }
  22%  { transform: translate(-53%, -48%) scale(0.90) rotate(9deg);
         filter: brightness(2.5) hue-rotate(180deg) saturate(0.5); }
  38%  { transform: translate(-48%, -52%) scale(1.10) rotate(-4deg);
         filter: brightness(1.8) saturate(0.7); }
  56%  { transform: translate(-52%, -50%) scale(0.97) rotate(2deg);
         filter: brightness(1.3); }
  75%  { transform: translate(-50%, -51%) scale(1.02) rotate(-1deg);
         filter: brightness(1.1); }
  100% { transform: translate(-50%, -50%) scale(1.00) rotate(0deg);
         filter: brightness(1.0) saturate(1.0); }
}

/* ══════════════════════════════════════════════════════════════════════════
   🌟 MAGICAL WORD REVEAL SCROLL PANEL
   Appears above ammo tray, shows words of secret message with boss avatar
   ══════════════════════════════════════════════════════════════════════════ */
.word-reveal-panel {
  position: absolute;
  bottom: 96px;
  left: 12px;
  z-index: 20;
  width: 185px;
  background: linear-gradient(145deg, rgba(10, 8, 35, 0.90) 0%, rgba(30, 15, 70, 0.94) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  border-radius: 16px;
  padding: 22px 10px 8px 10px;
  box-shadow:
    0 0 0 1px rgba(255,200,0,0.12),
    0 6px 24px rgba(0,0,0,0.65),
    inset 0 0 18px rgba(120, 60, 220, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

/* Cute Miniature Boss Face Avatar Badge Above Secret Message */
.wrp-boss-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.7);
  background: #0d1b4b;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 22;
}

.wrp-boss-badge .wrp-boss-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.wrp-boss-crown {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
  pointer-events: none;
  z-index: 23;
  line-height: 1;
}

.wrp-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}


.wrp-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

.wrp-icon {
  font-size: 10px;
  animation: wrpIconPulse 2.1s ease-in-out infinite alternate;
}

@keyframes wrpIconPulse {
  0%  { opacity: 0.7; transform: scale(0.9); }
  100% { opacity: 1.0; transform: scale(1.1); }
}

/* The word chips container — flex wrap so words flow like text */
.word-reveal-words {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  min-height: 24px;
}

/* Individual revealed word chip */
.wrp-word-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.75), rgba(79, 70, 229, 0.75));
  border: 1px solid rgba(200, 150, 255, 0.45);
  box-shadow: 0 2px 8px rgba(130, 60, 220, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  opacity: 0;
  transform: translateY(-18px) scale(0.7);
  animation: wrpWordDrop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
  white-space: nowrap;
}

/* Each word gets a slightly warmer golden glow */
.wrp-word-chip:nth-child(3n)  { background: linear-gradient(135deg, rgba(180, 90, 30, 0.75), rgba(220, 140, 20, 0.75)); border-color: rgba(255, 200, 80, 0.45); }
.wrp-word-chip:nth-child(3n+1) { background: linear-gradient(135deg, rgba(20, 110, 60, 0.75), rgba(30, 160, 80, 0.75)); border-color: rgba(80, 220, 130, 0.45); }

@keyframes wrpWordDrop {
  0%   { opacity: 0; transform: translateY(-22px) scale(0.5) rotateX(-40deg); }
  55%  { opacity: 1; transform: translateY(3px) scale(1.05) rotateX(4deg); }
  75%  { transform: translateY(-2px) scale(0.98) rotateX(-2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1.0) rotateX(0); }
}

/* Pending/locked word indicator */
.wrp-word-locked {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.14);
  letter-spacing: 0.08em;
  pointer-events: none;
}

.wrp-footer {
  margin-top: 6px;
  text-align: center;
}

.wrp-progress-txt {
  font-size: 8.5px;
  color: rgba(255, 215, 0, 0.55);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════
   🌟 CENTER-SCREEN WORD REVEAL POPUP (appears briefly on level complete)
   ══════════════════════════════════════════════════════════════════════════ */
.word-reveal-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 250;
  pointer-events: none;
}

/* 🌟 Secret Message Box on Victory Screen */
.win-secret-message-box {
  width: 100%;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 27, 75, 0.90) 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.win-secret-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
  padding-bottom: 5px;
}
.win-secret-title {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex: 1;
  text-align: left;
  margin-left: 6px;
}
.win-secret-count {
  font-size: 10px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.3px;
}
.win-secret-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
  align-items: center;
}
.win-secret-word-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.40);
  color: #fef08a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: wrpChipPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.win-secret-word-chip.newly-unlocked {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  color: #1a1a00;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
  transform: scale(1.08);
}

.wrp-popup-inner {
  background: linear-gradient(145deg, rgba(15, 8, 50, 0.95), rgba(50, 20, 120, 0.95));
  border: 2px solid #ffd700;
  border-radius: 22px;
  padding: 16px 28px;
  text-align: center;
  box-shadow:
    0 0 0 3px rgba(255,215,0,0.18),
    0 8px 36px rgba(0,0,0,0.7),
    0 0 60px rgba(160, 80, 255, 0.5);
  animation: wrpPopupIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wrpPopupIn {
  0%  { opacity: 0; transform: scale(0.5) rotate(-6deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(1deg); }
  80% { transform: scale(0.97) rotate(-0.5deg); }
  100% { transform: scale(1) rotate(0); }
}

.wrp-popup-sparkles {
  font-size: 22px;
  letter-spacing: 6px;
  animation: wrpSparkSpin 1.2s linear infinite;
}

@keyframes wrpSparkSpin {
  0%  { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.wrp-popup-word {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffd700;
  text-shadow:
    0 0 12px rgba(255, 215, 0, 0.9),
    0 0 28px rgba(255, 140, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 8px 0;
  text-transform: uppercase;
}

.wrp-popup-sub {
  font-size: 11px;
  color: rgba(200, 180, 255, 0.85);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Show/hide state — managed by JS */
.word-reveal-popup.showing {
  animation: none;
}
.word-reveal-popup.hiding {
  animation: wrpPopupOut 0.4s ease-in forwards;
}

@keyframes wrpPopupOut {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.7); }
}

/* ── Varnams Legal Footer & Currency Toggle ── */
.menu-legal-footer {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(203, 213, 225, 0.78);
}

.menu-legal-footer .brand-credit strong {
  color: #ffd700;
}

.menu-legal-footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.menu-legal-footer a:hover {
  color: #ffd700;
  text-decoration: underline;
}

.currency-tabs-wrap {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.currency-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.currency-tab:hover {
  color: #f8fafc;
}
.currency-tab.active {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}
.btn-currency-toggle {
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.55);
  color: #ffd700;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-currency-toggle:active {
  transform: scale(0.95);
}

/* ══════════════════════════════════════════════════════════════════════════
   👑 ALWAYS-VISIBLE LIVE BOSS REACTION CAM (PiP HUD WIDGET)
   ══════════════════════════════════════════════════════════════════════════ */
.hud-boss-cam {
  position: absolute;
  top: 76px;
  right: 8px;
  z-index: 65;
  pointer-events: auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hud-boss-cam.hidden {
  display: none !important;
}

.boss-cam-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 27, 75, 0.96) 100%);
  border: 1.8px solid #ffd700;
  border-radius: 18px;
  padding: 6px 10px 6px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 14px rgba(255, 215, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 220px;
}

.boss-cam-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  background: #0f172a;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.boss-cam-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.boss-cam-crown {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}
.boss-cam-stars {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  z-index: 3;
  animation: bossCamStarsSpin 1.4s linear infinite;
}
@keyframes bossCamStarsSpin {
  0%   { transform: translateX(-50%) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg); }
}

.boss-cam-pill {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #ffd700;
  color: #f8fafc;
  font-size: 7.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 8px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.boss-cam-balloon {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}
.boss-cam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}
.boss-cam-name {
  font-size: 9.5px;
  font-weight: 900;
  color: #ffd700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}
.boss-cam-status-tag {
  font-size: 7.5px;
  color: #38bdf8;
  font-weight: 800;
}
.boss-cam-quote {
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.25;
  white-space: normal;
}

/* Boss reaction states */
.boss-cam-shake {
  animation: bossCamShake 0.45s ease forwards;
}
@keyframes bossCamShake {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.15) rotate(-8deg); }
  40% { transform: scale(0.9) rotate(8deg); }
  60% { transform: scale(1.08) rotate(-4deg); }
  80% { transform: scale(0.96) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.boss-cam-avatar-wrap.boss-fallen {
  border-color: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85);
  transform: rotate(-18deg);
  filter: contrast(1.15) saturate(0.85);
}

/* 3D World Boss Overlay Fallen Docking */
.boss-face-overlay.boss-fallen-docked {
  border-color: #ef4444 !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.9), 0 6px 16px rgba(0,0,0,0.85) !important;
  transform: translate(-50%, -50%) rotate(-18deg) !important;
  filter: contrast(1.15) saturate(0.85);
  z-index: 70 !important;
}
.boss-face-overlay.boss-fallen-docked::after {
  content: '💫 DEFEATED';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  border: 1px solid #ffd700;
}

/* ══════════════════════════════════════════════════════════════════════════
   🎉 ROYAL WELCOME BOUNTY MODAL (HOOK FOR NEW PLAYERS)
   ══════════════════════════════════════════════════════════════════════════ */
#welcome-modal {
  background: rgba(4, 7, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 210;
}
.welcome-card {
  width: min(92vw, 420px);
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 100%);
  border: 2px solid #ffd700;
  border-radius: 24px;
  padding: 24px 18px 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 215, 0, 0.35);
  text-align: center;
}
.welcome-header {
  margin-bottom: 14px;
}
.welcome-crest {
  font-size: 44px;
  filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.5));
  animation: welcomeCrestBob 2s ease-in-out infinite;
}
@keyframes welcomeCrestBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.08); }
}
.welcome-tag {
  font-size: 10px;
  font-weight: 900;
  color: #f59e0b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}
.welcome-title {
  font-size: 21px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  margin: 4px 0;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}
.welcome-sub {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
  margin-top: 4px;
}

.welcome-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}
.welcome-reward-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.welcome-reward-item.silver {
  border-color: #cbd5e1;
  background: rgba(148, 163, 184, 0.15);
}
.welcome-reward-item.gold {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}
.welcome-reward-item .reward-icon {
  font-size: 22px;
}
.welcome-reward-item .reward-amt {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
}
.welcome-reward-item.gold .reward-amt {
  color: #ffd700;
}
.welcome-reward-item .reward-lbl {
  font-size: 8.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.welcome-perks-note {
  font-size: 10.5px;
  color: #93c5fd;
  line-height: 1.3;
  margin-bottom: 16px;
}

.btn-claim-welcome {
  width: 100%;
  background: linear-gradient(180deg, #ffd700 0%, #f59e0b 50%, #d97706 100%);
  color: #111;
  border: none;
  border-radius: 24px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: welcomeBtnPulse 1.8s infinite;
}
@keyframes welcomeBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5); }
  50% { transform: scale(1.02); box-shadow: 0 10px 30px rgba(255, 215, 0, 0.8); }
}
.btn-claim-welcome:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 1: VARNAMS COMPANY LOGO SPLASH SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.company-splash-screen {
  background: radial-gradient(circle at 50% 42%, #1e1b4b 0%, #090d16 65%, #020617 100%) !important;
  z-index: 500 !important;
  transition: opacity 0.45s ease;
}
.company-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  animation: splashZoomIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes splashZoomIn {
  0% { opacity: 0; transform: scale(0.84) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.company-logo-halo {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(245, 158, 11, 0.08));
  border: 2px solid rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 48px rgba(255, 215, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-splash-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22px;
}
.company-splash-brand {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 5px;
  background: linear-gradient(180deg, #fffbeb 0%, #fde047 45%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 6px;
  text-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}
.company-splash-tagline {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #94a3b8;
  text-transform: uppercase;
}
.company-splash-sub {
  font-size: 12px;
  font-weight: 700;
  color: #fde047;
  letter-spacing: 1.5px;
  margin-top: 4px;
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 3: CHAMPION SIGN-IN & GAME MODE SELECTION (ONBOARDING SCREEN)
   ═══════════════════════════════════════════════════════════════════════════ */
.onboarding-card {
  max-width: 425px !important;
  width: min(94vw, 425px) !important;
  padding: 16px 16px !important;
  gap: 10px !important;
  max-height: 94vh;
  overflow-y: auto;
}
.onboard-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}
.onboard-crest {
  width: 58px !important;
  height: 58px !important;
  flex-shrink: 0;
  margin: 0 !important;
}
.onboard-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.onboard-tag {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #fde047;
}
.onboard-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.onboard-sub {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.25;
}
.onboard-section {
  width: 100%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 9px 11px;
  text-align: left;
  box-sizing: border-box;
}
.onboard-label {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  color: #fde047;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.onboard-input {
  width: 100%;
  height: 36px;
  background: rgba(2, 6, 23, 0.78);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 0 11px;
  box-sizing: border-box;
  outline: none;
}
.onboard-input.sm {
  height: 33px;
  font-size: 12px;
}
.onboard-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}
.onboard-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.btn-auth-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 35px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  padding: 0 8px;
  white-space: nowrap;
}
.btn-auth-social.google {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.btn-auth-social.google .auth-social-icon {
  font-weight: 900;
  font-size: 14px;
  background: linear-gradient(135deg, #4285f4, #ea4335, #fbbc05, #34a853);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-auth-social.apple {
  background: #090d16;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.btn-auth-social.apple .auth-social-icon {
  font-size: 15px;
  line-height: 1;
}
.btn-auth-social.linked {
  border-color: #22c55e !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4) !important;
}
.onboard-auth-drawer {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  width: 100%;
}
.btn-onboard-auth-link {
  height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.onboard-auth-status {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 5px;
  text-align: center;
  font-weight: 700;
}

/* Mode Selection Cards */
.onboard-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.onboard-mode-card {
  position: relative;
  background: rgba(15, 23, 42, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  padding: 12px 8px 9px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.onboard-mode-card.active {
  background: linear-gradient(160deg, rgba(30, 58, 138, 0.85), rgba(15, 23, 42, 0.95));
  border-color: #ffd700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.35), inset 0 0 10px rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}
.omc-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #38bdf8;
  color: #020617;
  font-size: 8px;
  font-weight: 900;
  padding: 1.5px 7px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.omc-badge.hot {
  background: linear-gradient(90deg, #f43f5e, #f59e0b);
  color: #fff;
}
.omc-icon {
  font-size: 26px;
  line-height: 1.1;
}
.omc-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
}
.omc-desc {
  font-size: 9.8px;
  color: #cbd5e1;
  line-height: 1.25;
}
.onboard-revenge-options {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
}
.oro-label {
  font-size: 10px;
  font-weight: 800;
  color: #fda4af;
  margin-bottom: 5px;
}
.oro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.oro-chip {
  flex: 1;
  min-width: 72px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.oro-chip.active {
  background: rgba(244, 63, 94, 0.28);
  border-color: #fb7185;
  color: #fff;
}
.oro-chip.photo {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(234, 88, 12, 0.28));
  border-color: #fbbf24;
  color: #fde047;
}
.onboard-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.btn-onboard-secondary {
  width: 100%;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚙️ ROYAL SETTINGS MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-card {
  max-width: 400px !important;
  width: min(92vw, 400px) !important;
  gap: 10px !important;
  padding: 18px 16px !important;
}
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.settings-title {
  font-size: 17px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 0.8px;
}
.settings-group {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  text-align: left;
}
.settings-group-label {
  font-size: 10px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.settings-row-info {
  display: flex;
  align-items: center;
  gap: 9px;
}
.settings-row-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}
.settings-row-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
}
.settings-row-sub {
  font-size: 10px;
  color: #94a3b8;
}
.settings-toggle-btn {
  min-width: 58px;
  height: 30px;
  border-radius: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(100, 116, 139, 0.35);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s ease;
}
.settings-toggle-btn.active {
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-color: #86efac;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.settings-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.settings-mode-btn {
  padding: 8px 8px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.settings-mode-btn.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.24), rgba(245, 158, 11, 0.18));
  border-color: #ffd700;
  color: #ffd700;
}
.settings-auto-note {
  font-size: 10px;
  color: #93c5fd;
  line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────────────────────────
   📱 NATIVE APP INSTALL PROMPT & FLOATING BANNER
───────────────────────────────────────────────────────────────────────────── */
.native-install-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 440px;
  background: rgba(11, 15, 30, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 215, 0, 0.25);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 99999;
  animation: bannerSlideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.native-install-banner.hidden {
  display: none !important;
}
@keyframes bannerSlideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.nib-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.nib-icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  overflow: hidden;
  border: 1.5px solid #ffd700;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.nib-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nib-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.nib-title {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nib-sub {
  font-size: 10.5px;
  font-weight: 500;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nib-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nib-btn-install {
  background: linear-gradient(135deg, #ffd700, #ff8800);
  border: none;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 900;
  color: #0b0c16;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(255, 180, 0, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.nib-btn-install:active {
  transform: scale(0.96);
  filter: brightness(0.92);
}
.nib-btn-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.nib-btn-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.onboard-install-btn {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-hud-install {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.45)) !important;
  border-color: #4ade80 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   🔒 VARNAMS VIP PASSCODE SECURITY GATE (Passcode: Biryani)
───────────────────────────────────────────────────────────────────────────── */
.auth-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: radial-gradient(circle at 50% 25%, #1e1b4b 0%, #080a14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-gate-screen.hidden {
  display: none !important;
}
.auth-card {
  max-width: 390px;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.2);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: authFadeIn 0.4s ease-out;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.auth-crest {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.35);
  border: 2px solid #ffd700;
}
.auth-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid #ffd700;
  color: #ffd700;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}
.auth-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.auth-sub {
  font-size: 12.5px;
  color: #93c5fd;
  line-height: 1.5;
  margin-top: -4px;
}
.auth-input-wrap {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.auth-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 42px 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
  text-align: center;
}
.auth-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
}
.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.auth-error-msg {
  font-size: 11.5px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  padding: 6px 12px;
  width: 100%;
}
.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #0b0c16;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 13px 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.auth-submit-btn:active {
  transform: scale(0.97);
  filter: brightness(0.92);
}
.auth-hint {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 4px;
}
.shake {
  animation: shakeAnim 0.45s ease-in-out;
}
@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}


