/* ===================================================
   SAURABH'S SPRINT - MODERN LIGHT MODE GLASSMORPHIC THEME
   =================================================== */

:root {
  --primary-color: #ff3838;
  --primary-glow: rgba(255, 56, 56, 0.45);
  --secondary-color: #ff9f1a;
  --accent-cyan: #00b4d8;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --gold-coin: #f59e0b;
  
  /* Modern Light Theme Palette */
  --light-bg: #eef2f6;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-card-inner: rgba(241, 245, 249, 0.95);
  --card-border: rgba(255, 255, 255, 0.8);
  --card-border-subtle: rgba(203, 213, 225, 0.6);
  --card-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.6);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --font-display: 'Russo One', 'Lilita One', 'Outfit', 'Segoe UI', sans-serif;
  --font-3d: 'Lilita One', 'Russo One', 'Outfit', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Suppress Netlify Drawer & Badge Widget */
[data-netlify-drawer],
#netlify-drawer,
.netlify-badge,
iframe[src*="netlify"],
div[class*="netlify-drawer"],
button[class*="netlify-drawer"] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--light-bg);
  font-family: var(--font-body);
  color: var(--text-main);
  position: fixed;
  inset: 0;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

#game-container {
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
}

#game-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ===================================================
   OVERLAY LAYERS & MENUS
   =================================================== */

.overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: flex !important;
}

.menu-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.hud-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

/* Glassmorphism Light Panel Base */
.glass-panel, .menu-glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 28px;
}

.menu-glass-panel {
  width: 90%;
  max-width: 440px;
  margin: auto;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: floatUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes floatUp {
  0% { transform: translateY(30px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===================================================
   HEADS-UP DISPLAY (HUD)
   =================================================== */

#hud {
  pointer-events: none;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 16px) 16px env(safe-area-inset-bottom, 16px) 16px;
  z-index: 15;
}

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

.hud-stat-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.hud-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hud-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
}

.coin-card {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(255, 251, 235, 0.95);
}

.key-card {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-color: rgba(234, 179, 8, 0.6);
  background: rgba(254, 240, 138, 0.95);
}

.coin-icon {
  font-size: 18px;
  animation: spinCoin 3s infinite linear;
}

.multiplier-badge {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.35);
  transform: scale(1);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.multiplier-boosted {
  background: linear-gradient(135deg, #f59e0b, #ff4757) !important;
  transform: scale(1.15) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5) !important;
}

.hud-btn-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: var(--text-main);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: all 0.2s;
  pointer-events: auto;
}

.hud-btn-circle:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

/* Power-Up Active Bars */
.powerup-bars-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 180px;
}

.powerup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.powerup-bar.hidden {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
  display: none;
}

.pu-icon {
  font-size: 16px;
}

.pu-progress-bg {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.pu-progress-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  transition: width 0.1s linear;
}

.magnet-theme .pu-progress-fill { background: linear-gradient(90deg, #ff4757, #ff6b81); }
.multiplier-theme .pu-progress-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.hoverboard-theme .pu-progress-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.jetpack-theme .pu-progress-fill { background: linear-gradient(90deg, #00b4d8, #60a5fa); }
.sneakers-theme .pu-progress-fill { background: linear-gradient(90deg, #f59e0b, #fde047); }

.hoverboard-hint {
  align-self: center;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #059669;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
  animation: pulseHint 2s infinite ease-in-out;
  margin-bottom: 20px;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.7; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ===================================================
   START SCREEN & 3D CHARACTER SHOWCASE LAYOUT
   =================================================== */

.start-screen-layout {
  justify-content: space-between;
  align-items: center;
  padding: env(safe-area-inset-top, 14px) 14px env(safe-area-inset-bottom, 14px) 14px;
  pointer-events: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* 1. Top Header Bar (Subway Surfers Style) */
.start-top-bar {
  width: 100%;
  max-width: 600px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 24px;
  pointer-events: auto;
  z-index: 20;
}

.header-left-group, .header-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-top-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}

.btn-top-circle:active {
  transform: scale(0.9);
}

.logo-group {
  text-align: center;
}

.game-logo-compact {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.game-logo-compact .highlight {
  background: linear-gradient(135deg, #ff4757, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.stat-pill {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-pill.best-pill {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.stat-pill.coin-pill {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.stat-pill.key-pill {
  background: #fefce8;
  border-color: #fef08a;
  color: #a16207;
}

.stat-pill-icon {
  font-size: 14px;
}

/* 2. Middle Floating Side Docks (Subway Surfers Screen Layout) */
.home-middle-zone {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  pointer-events: none;
  margin-top: 8px;
  margin-bottom: auto;
  z-index: 18;
}

.home-dock-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  align-items: flex-start;
  max-width: 200px;
}

.home-dock-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  align-items: flex-end;
}

/* Floating Action Dock Buttons (Subway Surfers Style) */
.btn-dock-action {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 86px;
  justify-content: center;
}

.btn-dock-action:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

.btn-dock-action .dock-icon {
  font-size: 18px;
}

.btn-dock-action .dock-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.btn-dock-action .dock-badge {
  background: #ff4757;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.badge-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
  animation: badge-pulse 1.5s infinite;
  z-index: 10;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.btn-dock-action.highlight-dock {
  border-color: rgba(0, 210, 211, 0.6);
  background: rgba(240, 253, 250, 0.95);
}

/* 3. Word Hunt Widget in Left Dock */
.home-word-hunt-card {
  padding: 8px 10px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.word-hunt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.wh-tag {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  color: #0284c7;
}

.wh-reward {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: #b45309;
}

.word-hunt-letters {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.wh-letter-box {
  width: 22px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: var(--text-muted);
}

.wh-letter-box.collected {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

/* 4. Bottom Subway Surfers Floating Action Dock */
.start-bottom-bar {
  width: 100%;
  max-width: 440px;
  padding: 12px 16px;
  border-radius: 28px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

/* Character Quick Switcher Widget */
.home-character-widget {
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  box-sizing: border-box;
}

.btn-char-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-char-arrow:active {
  transform: scale(0.9);
  background: #f1f5f9;
}

.char-info-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  text-align: center;
}

.char-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gender-tag {
  font-size: 9px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.gender-boy {
  background: #e0f2fe;
  color: #0284c7;
}

.gender-girl {
  background: #fce7f3;
  color: #db2777;
}

.char-avatar-mini {
  font-size: 14px;
}

.home-char-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.btn-home-equip {
  border: none;
  font-family: var(--font-display);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: all 0.15s;
}

.btn-home-equip.equipped {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  cursor: default;
}

.btn-home-equip.can-equip {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.btn-home-equip.unlock {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

/* Subway Surfers Big Play Sprint Button */
.btn-subway-play {
  width: 100% !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 22px !important;
  padding: 14px 20px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.3) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-subway-play:active {
  transform: scale(0.96) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5) !important;
}

.btn-play-icon {
  font-size: 24px;
  animation: bouncePlay 1.5s infinite ease-in-out;
}

@keyframes bouncePlay {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.btn-play-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-subway-play .btn-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  line-height: 1.1;
}

.btn-subway-play .btn-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.9;
}

.pulse-anim {
  animation: pulseButton 2s infinite ease-in-out;
  will-change: transform;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 14px 32px rgba(16, 185, 129, 0.6); }
}

.btn-header-install {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  animation: pulseInstall 2s infinite ease-in-out;
  transition: all 0.2s;
}

.btn-header-install:active {
  transform: scale(0.94);
}

@keyframes pulseInstall {
  0%, 100% { box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35); }
  50% { box-shadow: 0 4px 18px rgba(2, 132, 199, 0.7); transform: scale(1.03); }
}

.position-relative {
  position: relative;
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff4757;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff4757;
  animation: pulseDot 1s infinite alternate;
}

.badge-dot.hidden {
  display: none;
}


@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

.btn-action-icon {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
  transition: all 0.2s;
}

.btn-action-icon:active {
  background: #f1f5f9;
  transform: scale(0.92);
}

.btn-action-icon.highlight-action {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}

.btn-action-icon.highlight-action .action-text-main {
  color: #15803d;
}

.action-icon {
  font-size: 18px;
}

.action-text-main {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  color: #0284c7;
  letter-spacing: 0.5px;
}

.action-text {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.pu-text-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  color: #0f172a;
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 4px;
}

.stat-label-text {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* PWA Banner */
.pwa-banner {
  margin-top: 14px;
  width: 100%;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  border: 1px solid #86efac;
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.12);
}

.pwa-banner.hidden {
  display: none !important;
}

.pwa-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #166534;
  text-align: left;
}

.pwa-mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}

.pwa-info strong {
  display: block;
  font-size: 12px;
  font-family: var(--font-display);
  color: #0f172a;
}

.pwa-info span {
  font-size: 10px;
  color: #64748b;
}

.btn-install {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-install:active {
  transform: scale(0.94);
}

/* ===================================================
   GAME OVER SCREEN (LIGHT MODE)
   =================================================== */

.gameover-badge {
  background: #ff4757;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.gameover-title {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.new-record-alert {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  animation: bounceRecord 1s infinite alternate ease-in-out;
}

.new-record-alert.hidden {
  display: none;
}

@keyframes bounceRecord {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.04); }
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.result-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.result-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.result-value {
  font-family: var(--font-display);
  font-size: 20px;
  margin-top: 4px;
  color: var(--text-main);
}

.gameover-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dual-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* ===================================================
   REVIVE / SAVE ME MODAL (HIGH Z-INDEX & INTERACTIVE)
   =================================================== */

#revive-modal {
  z-index: 1000 !important;
  pointer-events: auto !important;
}

#revive-modal.menu-active {
  display: flex !important;
  pointer-events: auto !important;
}

.revive-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px solid rgba(16, 185, 129, 0.8) !important;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.9) !important;
  border-radius: 32px;
  padding: 26px 22px;
  max-width: 380px;
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  pointer-events: auto !important;
  z-index: 1001 !important;
}

.revive-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.revive-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-main);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.revive-countdown-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #00d2d3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.65);
  margin-bottom: 12px;
  animation: pulseCountdown 1s infinite alternate ease-in-out;
}

@keyframes pulseCountdown {
  0% { transform: scale(0.95); box-shadow: 0 0 16px rgba(16, 185, 129, 0.4); }
  100% { transform: scale(1.08); box-shadow: 0 0 32px rgba(16, 185, 129, 0.85); }
}

.revive-hint {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
  font-weight: 600;
}

.btn-revive-glow {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 2px solid #86efac !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45) !important;
  margin-bottom: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.8px;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: all 0.2s ease;
}

.btn-revive-glow:active {
  transform: scale(0.96);
}

.btn-skip-revive {
  background: #f1f5f9;
  color: #64748b;
  border: 1.5px solid #cbd5e1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 16px;
  width: 100%;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: all 0.15s ease;
}

.btn-skip-revive:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

/* ===================================================
   GAME OVER SCREEN STYLING
   =================================================== */

.gameover-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px solid rgba(255, 71, 87, 0.5) !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22) !important;
  border-radius: 32px;
  padding: 26px 20px;
  max-width: 440px;
}

.coin-card-result {
  background: #fffbeb !important;
  border-color: #fde68a !important;
}

.coin-card-result .result-value {
  color: #b45309 !important;
}

.best-card-result {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

.best-card-result .result-value {
  color: #15803d !important;
}

.btn-restart-glow {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: 2px solid #86efac !important;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35) !important;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  padding: 14px 20px;
  border-radius: 18px;
  width: 100%;
  cursor: pointer;
}

.btn-accent-shop {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
  border: 1.5px solid #a5b4fc !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25) !important;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  padding: 12px 14px;
  border-radius: 16px;
  flex: 1;
}

.btn-accent-menu {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border: 1.5px solid #7dd3fc !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25) !important;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  padding: 12px 14px;
  border-radius: 16px;
  flex: 1;
}

.btn-accent-share {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: 1.5px solid #6ee7b7 !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25) !important;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  padding: 12px 14px;
  border-radius: 16px;
  flex: 1;
}

.btn-mystery-glow {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: #ffffff !important;
  border: 2px solid #d8b4fe !important;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4) !important;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  padding: 13px 18px;
  border-radius: 18px;
  width: 100%;
  cursor: pointer;
  margin-bottom: 8px;
}

/* ===================================================
   PAUSE MENU OVERLAY (SUBWAY SURFERS ENHANCED)
   =================================================== */

.pause-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px solid rgba(2, 132, 199, 0.5) !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25) !important;
  border-radius: 32px;
  padding: 26px 22px;
  max-width: 400px;
}

.pause-header-badge {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 14px;
  margin-bottom: 8px;
}

.pause-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.pause-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.pause-stat-pill {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pause-stat-pill.coin-pill {
  background: #fffbeb;
  border-color: #fde68a;
}

.pause-stat-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.pause-stat-val {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-main);
  margin-top: 2px;
}

.pause-stat-pill.coin-pill .pause-stat-val {
  color: #b45309;
}

.pause-buttons-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-resume-glow {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: 2px solid #86efac !important;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4) !important;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  padding: 14px 20px;
  border-radius: 18px;
  width: 100%;
  cursor: pointer;
}

.btn-pause-setting {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px solid #cbd5e1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.btn-pause-setting:active {
  background: #f1f5f9;
  transform: scale(0.97);
}

.btn-pause-quit {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border: 1.5px solid #7dd3fc !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25) !important;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  padding: 12px 18px;
  border-radius: 16px;
  width: 100%;
  cursor: pointer;
}

/* ===================================================
   SUBWAY SURFERS DAILY WORD HUNT & TOAST NOTIFICATIONS
   =================================================== */

.home-word-hunt-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #ffd700;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
  border-radius: 20px;
  padding: 10px 16px;
  margin-top: 8px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.word-hunt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wh-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #d97706;
  letter-spacing: 0.8px;
}

.wh-reward {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #10b981;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
}

.word-hunt-letters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.wh-letter-box {
  width: 38px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wh-letter-box.collected {
  background: linear-gradient(135deg, #ffd700, #ff9f1a);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wh-letter-box.missing {
  background: #f1f5f9;
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
}

/* In-Game HUD Mini Word Hunt Tracker (3-4s Auto-Hide Popup) */
.hud-word-hunt {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 5px 12px;
  margin-top: 6px;
  align-self: flex-start;
  border: 2px solid #ffd700;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  pointer-events: none;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-word-hunt.show-wh-popup {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.hud-wh-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  color: #d97706;
  letter-spacing: 0.5px;
}

.hud-wh-letters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-wh-box {
  width: 22px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  transition: all 0.2s;
}

.hud-wh-box.collected {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  color: #ffffff;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
  transform: scale(1.08);
}

.hud-wh-box.missing {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

/* Floating Game Toast Notification */
.game-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 30px;
  border: 2px solid #ffd700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-toast.show-toast {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.game-toast.hidden {
  display: none;
}

/* ===================================================
   MODALS (LIGHT MODE FROSTED GLASS)
   =================================================== */

.modal-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px;
  box-sizing: border-box;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-radius: 26px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  /* Smooth rendering on mobile */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding-right: 4px;
  padding-bottom: 12px;
  margin-top: 4px;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.modal-subtitle {
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.5px;
}

.modal-footer {
  margin-top: 10px;
  width: 100%;
}

.btn-modal-action {
  width: 100%;
  padding: 13px 18px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(255, 71, 87, 0.35);
}

.btn-modal-action .btn-text {
  font-size: 15px;
  letter-spacing: 0.5px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-main);
}

.btn-close-modal {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-close-modal:active {
  background: #e2e8f0;
  color: var(--text-main);
}

.shop-bank-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-display);
  color: #b45309;
}

.shop-items-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.item-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.item-info {
  flex: 1;
  text-align: left;
}

.item-info h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.item-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.level-indicator {
  display: flex;
  gap: 4px;
}

.level-indicator .dot {
  width: 14px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
}

.level-indicator .dot.active {
  background: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.4);
}

.btn-buy {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  font-family: var(--font-display);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  transition: transform 0.15s;
}

.btn-buy:active {
  transform: scale(0.92);
}

.btn-buy.maxed {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-buy .price-val {
  font-size: 12px;
}

.btn-buy .buy-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

/* ===================================================
   SKINS & CHARACTERS GRID (MALE & FEMALE)
   =================================================== */

.characters-modal-panel {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  overflow-y: auto;
  max-height: 58vh;
  padding: 4px 6px 16px 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.skins-grid::-webkit-scrollbar {
  width: 6px;
}
.skins-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.skin-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.skin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  border-color: #94a3b8;
}

.skin-card.selected {
  border-color: #ff3838;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(255, 56, 56, 0.25), 0 8px 24px rgba(255, 56, 56, 0.2);
}

.skin-preview-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.char-avatar-symbol {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.gender-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.gender-boy {
  background: #e0f2fe;
  color: #0369a1;
}

.gender-girl {
  background: #fdf2f8;
  color: #be185d;
}

.skin-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.skin-details h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.skin-subtitle {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.skin-action-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.skin-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
}

.skin-badge.owned {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  letter-spacing: 0.5px;
}

.btn-skin-action {
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 11px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s;
}

.btn-skin-action.can-equip {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-skin-action.unlock {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.btn-skin-action:active {
  transform: scale(0.94);
}

/* ===================================================
   MISSIONS & QUESTS STYLES (LIGHT MODE)
   =================================================== */

.missions-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.2s;
}

.mission-card.completed {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.mission-card.claimed {
  opacity: 0.6;
}

.mission-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mission-info {
  flex: 1;
  text-align: left;
}

.mission-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.mission-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mission-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2px;
}

.mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mission-count-text {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.mission-action-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-reward-tag {
  font-family: var(--font-display);
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 4px 8px;
  border-radius: 8px;
}

.btn-claim-mission {
  background: linear-gradient(135deg, #10b981, #0284c7);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mission-status.claimed {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  padding: 4px 8px;
}

/* ===================================================
   REVIVE MODAL STYLES (LIGHT MODE)
   =================================================== */

.revive-panel {
  gap: 12px;
}

.revive-badge {
  background: #ff4757;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
}

.revive-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-main);
}

.revive-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.revive-circle-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.25);
  background: #f0f9ff;
}

.revive-count {
  font-family: var(--font-display);
  font-size: 32px;
  color: #0284c7;
}

/* Help & Rules Modal Guide */
.help-guide {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.rules-card-highlight {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fde68a;
}

.rules-card-highlight h3 {
  color: #b45309 !important;
}

.help-section h3 {
  font-size: 13px;
  font-weight: 800;
  color: #0284c7;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-section li {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.help-section strong {
  color: #0f172a;
}

/* Pause Panel */
.pause-panel {
  gap: 14px;
}

.pause-panel h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-main);
}

.pause-stats {
  font-size: 15px;
  color: var(--text-muted);
}

.pause-stats strong {
  color: var(--text-main);
}

.btn-pause-setting {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s;
}

.btn-pause-setting:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

/* ===================================================
   SETTINGS MODAL & INTERACTIVE SWITCHES
   =================================================== */

.settings-panel {
  max-width: 480px;
  width: 90%;
  margin: auto;
  padding: 24px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  width: 100%;
}

.setting-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  text-align: left;
}

.setting-row strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.setting-row span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.setting-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.offline-status-card {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.setting-info {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.setting-icon-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.badge-green {
  background: #dcfce7;
  border-color: #86efac;
}

.setting-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.setting-info p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.status-pill-active {
  background: #10b981;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Toggle Switch UI Component (Supports both .toggle-switch and .switch) */
.toggle-switch, .switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  min-width: 52px;
}

.toggle-switch input, .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #10b981;
}

input:focus + .slider {
  box-shadow: 0 0 1px #10b981;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* ===================================================
   RESPONSIVE DESIGN & MULTI-DEVICE FRAMING
   (Mobile, Tablet & Laptop/Desktop)
   =================================================== */

/* Desktop Keyboard Controls Overlay */
.desktop-controls-hint {
  display: none;
  align-self: center;
  margin-top: 8px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

.kbd-pill {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-display);
  font-size: 10px;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 2px 0 #94a3b8;
}

/* --- Laptop & Desktop Layout (Screen width >= 768px) --- */
@media (min-width: 768px) {
  .desktop-controls-hint {
    display: flex;
  }

  .hoverboard-hint {
    display: none; /* Replaced by keyboard hint on desktop */
  }

  #hud {
    max-width: 720px;
    left: 50%;
    transform: translateX(-50%);
  }

  .start-screen-layout {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }

  .start-top-bar {
    max-width: 500px;
  }

  .home-character-widget {
    width: 100% !important;
    max-width: 100% !important;
  }

  .start-bottom-bar {
    max-width: 500px;
  }

  .menu-glass-panel {
    max-width: 480px;
  }

  .modal-content {
    max-width: 520px;
  }

  .btn-primary-action {
    padding: 16px 24px;
  }

  .btn-primary-action .btn-text {
    font-size: 18px;
  }
}

/* ===================================================
   INSTALL APP MODAL & TABS (iOS, Android, PC)
   =================================================== */

.install-panel,
.install-modal-content {
  max-width: 450px;
  width: 94vw;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  border-radius: 26px;
  box-sizing: border-box;
  overflow: hidden;
}

.install-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.install-brand-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  object-fit: cover;
}

.install-brand-sub {
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 1px;
}

.install-tabs {
  display: flex;
  gap: 5px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 16px;
  margin: 10px 0 12px 0;
  flex-shrink: 0;
}

.install-tab-btn {
  flex: 1;
  padding: 7px 4px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.install-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.install-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(88dvh - 130px);
}

.install-tab-content {
  display: none;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.25s ease-out;
}

.install-tab-content.active {
  display: flex;
}

.install-platform-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.ios-badge {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.android-badge {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.pc-badge {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.install-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.install-step-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.step-num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.step-details {
  flex: 1;
  text-align: left;
}

.step-details h4 {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.step-details p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.ios-icon-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  margin: 0 1px;
}

.highlight-step {
  color: #0284c7;
}

.install-benefits-row {
  display: flex;
  justify-content: space-around;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 8px 4px;
  margin-top: 4px;
  flex-shrink: 0;
}

.benefit-item {
  font-size: 10px;
  color: var(--text-muted);
}

.benefit-item strong {
  color: var(--text-main);
}

/* --- Large Monitors / 4K Displays (Screen width >= 1200px) --- */
@media (min-width: 1200px) {
  #hud {
    max-width: 800px;
  }
  
  .start-screen-layout {
    max-width: 540px;
  }
}

/* --- Tablet Devices (Screen width 600px - 1024px in portrait) --- */
@media (min-width: 600px) and (max-width: 1024px) {
  .menu-actions-grid {
    gap: 6px;
  }

  .btn-action-icon {
    padding: 10px 4px;
  }

  .action-text {
    font-size: 9px;
  }
}

/* --- Small & Standard Mobile Phones (< 480px) & Height Constrained Screens --- */
@media (max-width: 480px) {
  .start-screen-layout {
    padding: env(safe-area-inset-top, 10px) 10px env(safe-area-inset-bottom, 10px) 10px;
    gap: 6px;
  }

  .start-top-bar {
    padding: 8px 12px;
  }

  .home-character-widget {
    padding: 4px 6px;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
    margin-bottom: 0;
  }

  .start-bottom-bar {
    padding: 12px 10px;
    gap: 8px;
  }

  .btn-primary-action {
    padding: 13px 16px;
  }

  .btn-primary-action .btn-text {
    font-size: 17px;
  }

  .btn-primary-action .btn-sub {
    font-size: 10px;
  }

  .menu-actions-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
  }

  .btn-action-icon {
    padding: 8px 2px;
    min-height: 48px;
  }

  .action-text-main {
    font-size: 10px;
  }

  .action-text {
    font-size: 7.5px;
  }

  .skins-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .modal-content {
    max-height: 90vh;
    max-height: 90dvh;
    padding: 16px 14px;
    border-radius: 22px;
  }
}

/* --- Short Mobile Screens (Height <= 750px e.g. iPhone SE, landscape or with browser bars) --- */
@media (max-height: 750px) {
  .start-screen-layout {
    padding: env(safe-area-inset-top, 6px) 8px env(safe-area-inset-bottom, 6px) 8px;
  }

  .start-top-bar {
    padding: 6px 10px;
    margin-bottom: 2px;
  }

  .game-logo-compact {
    font-size: 15px;
  }

  .stat-pill {
    padding: 2px 8px;
    font-size: 11px;
  }

  .home-character-widget {
    padding: 4px 6px;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0;
    margin-bottom: 0;
  }

  .home-char-title {
    font-size: 14px;
  }

  .btn-char-arrow {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .start-bottom-bar {
    padding: 8px 10px;
    gap: 6px;
  }

  .btn-primary-action {
    padding: 10px 14px;
  }

  .btn-primary-action .btn-text {
    font-size: 15px;
  }

  .btn-primary-action .btn-sub {
    font-size: 9px;
  }

  .menu-actions-grid {
    gap: 3px;
  }

  .btn-action-icon {
    padding: 6px 1px;
    min-height: 42px;
  }

  .action-text-main {
    font-size: 9.5px;
  }

  .action-text {
    font-size: 7px;
  }

  .pwa-banner {
    padding: 6px 10px;
    margin-top: 2px;
  }

  .modal-content {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 12px 10px;
  }

  .modal-header {
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .modal-header h2 {
    font-size: 16px;
  }
}

/* ===================================================
   PAUSE SCREEN & IN-GAME PAUSE CONTROLS
   =================================================== */

#btn-pause {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 2px solid rgba(203, 213, 225, 0.9) !important;
  color: var(--text-main) !important;
  font-family: var(--font-display) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15) !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  z-index: 100 !important;
  touch-action: manipulation !important;
}

#btn-pause:active {
  transform: scale(0.9) !important;
  background: #e2e8f0 !important;
}

#pause-screen {
  z-index: 1000 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#pause-screen.menu-active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.pause-panel {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
  border-radius: 28px !important;
  padding: 30px 24px !important;
  width: 90% !important;
  max-width: 380px !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  pointer-events: auto !important;
  z-index: 1001 !important;
}

.pause-panel h2 {
  font-family: var(--font-display) !important;
  font-size: 26px !important;
  color: var(--text-main) !important;
  letter-spacing: 1px !important;
  margin-bottom: 4px !important;
}

.pause-stats {
  display: flex !important;
  gap: 16px !important;
  width: 100% !important;
  justify-content: center !important;
  margin-bottom: 6px !important;
}

.pause-stats p {
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--text-muted) !important;
  background: #f1f5f9 !important;
  padding: 8px 14px !important;
  border-radius: 14px !important;
  border: 1px solid #cbd5e1 !important;
}

.pause-stats strong {
  color: var(--text-main) !important;
  font-family: var(--font-display) !important;
  font-size: 16px !important;
  margin-left: 4px !important;
}

.btn-pause-setting {
  width: 100% !important;
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 16px !important;
  padding: 12px 16px !important;
  font-family: var(--font-display) !important;
  font-size: 14px !important;
  color: var(--text-main) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  touch-action: manipulation !important;
}

.btn-pause-setting:active {
  background: #e2e8f0 !important;
  transform: scale(0.97) !important;
}

#btn-resume {
  width: 100% !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 1002 !important;
  touch-action: manipulation !important;
}

#btn-quit-to-menu {
  width: 100% !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 1002 !important;
  touch-action: manipulation !important;
}

/* ===================================================
   3D TYPOGRAPHY & ARCADE TEXT SYSTEM
   =================================================== */

.text-3d-title {
  font-family: var(--font-3d) !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow:
    0 2px 0 #0284c7,
    0 4px 0 #0369a1,
    0 6px 0 #075985,
    0 8px 16px rgba(0, 0, 0, 0.4);
}

.text-3d-header {
  font-family: var(--font-3d) !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #1e293b;
  text-shadow:
    0 1.5px 0 #cbd5e1,
    0 3px 0 #94a3b8,
    0 5px 10px rgba(15, 23, 42, 0.15);
}

.text-3d-gold {
  color: #fef08a !important;
  text-shadow:
    0 2px 0 #eab308,
    0 4px 0 #ca8a04,
    0 6px 0 #854d0e,
    0 7px 14px rgba(0, 0, 0, 0.35) !important;
}

.text-3d-red {
  color: #ffffff !important;
  text-shadow:
    0 2px 0 #ef4444,
    0 4px 0 #dc2626,
    0 6px 0 #991b1b,
    0 8px 14px rgba(220, 38, 38, 0.4) !important;
}

.text-3d-green {
  color: #ffffff !important;
  text-shadow:
    0 2px 0 #22c55e,
    0 4px 0 #16a34a,
    0 6px 0 #15803d,
    0 8px 14px rgba(22, 163, 74, 0.4) !important;
}

/* Apply 3D Arcade text feel to main game title & branding */
.title-saurabh {
  font-family: var(--font-3d) !important;
  text-shadow:
    0 3px 0 #ea580c,
    0 6px 0 #c2410c,
    0 8px 0 #9a3412,
    0 10px 20px rgba(0, 0, 0, 0.4) !important;
}

.title-sprint {
  font-family: var(--font-3d) !important;
  text-shadow:
    0 3px 0 #0284c7,
    0 6px 0 #0369a1,
    0 8px 0 #075985,
    0 10px 20px rgba(2, 132, 199, 0.45) !important;
}

/* 3D Tactile Buttons */
.btn-primary-action,
.btn-start-action,
.btn-resume-glow,
.btn-restart-glow,
.btn-revive-glow {
  font-family: var(--font-3d) !important;
  letter-spacing: 1px;
  position: relative;
  border-bottom-width: 5px !important;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-primary-action:hover,
.btn-start-action:hover,
.btn-resume-glow:hover,
.btn-restart-glow:hover,
.btn-revive-glow:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary-action:active,
.btn-start-action:active,
.btn-resume-glow:active,
.btn-restart-glow:active,
.btn-revive-glow:active {
  transform: translateY(3px) !important;
  border-bottom-width: 2px !important;
}

/* ===================================================
   SETTINGS MODAL - ENHANCED 3D CONTROLS & SWITCHES
   =================================================== */

.settings-group {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-3d);
  font-size: 15px;
  color: #1e293b;
  letter-spacing: 0.3px;
}

.setting-ico {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

/* Modern iOS / Arcade Switch Toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 34px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

input:checked + .slider {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #ffffff;
}

.btn-settings-done {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border: 2px solid #7dd3fc !important;
  border-bottom: 4px solid #0369a1 !important;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35) !important;
  font-family: var(--font-3d) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  padding: 13px 20px !important;
  border-radius: 18px !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: transform 0.12s ease !important;
}

.btn-settings-done:active {
  transform: translateY(2px) !important;
  border-bottom: 2px solid #0369a1 !important;
}

/* ===================================================
   RULES / HOW TO PLAY MODAL - VISUAL GRAPHIC CARDS
   =================================================== */

.rules-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .rules-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.rule-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rule-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.rule-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.bg-cyan-soft {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 1.5px solid #7dd3fc;
}

.bg-orange-soft {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  border: 1.5px solid #fdba74;
}

.bg-blue-soft {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border: 1.5px solid #93c5fd;
}

.bg-purple-soft {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  border: 1.5px solid #d8b4fe;
}

.rule-info h4 {
  font-family: var(--font-3d);
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 2px;
}

.rule-info p {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  line-height: 1.3;
}

/* Power-ups breakdown list */
.rules-powerup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 14px;
}

.rule-pu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 12px;
}

.pu-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.pu-desc strong {
  font-family: var(--font-3d);
  font-size: 13px;
  color: #1e293b;
  display: block;
}

.pu-desc span {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.btn-got-it {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: 2px solid #86efac !important;
  border-bottom: 4px solid #047857 !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35) !important;
  font-family: var(--font-3d) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  padding: 13px 20px !important;
  border-radius: 18px !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: transform 0.12s ease !important;
}

.btn-got-it:active {
  transform: translateY(2px) !important;
  border-bottom: 2px solid #047857 !important;
}

/* ===================================================
   HEROES & HOVERBOARDS SHOWCASE CAROUSEL SLIDER STYLING
   =================================================== */

.showcase-stage-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
}

.btn-showcase-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  font-family: var(--font-3d);
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  touch-action: manipulation;
}

.btn-showcase-arrow:hover {
  transform: scale(1.08);
  border-color: #0284c7;
  color: #0284c7;
}

.btn-showcase-arrow:active {
  transform: scale(0.92);
  background: #f1f5f9;
}

.showcase-main-card {
  flex: 1;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 22px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  position: relative;
}

.characters-modal-panel, .boards-modal-panel {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
}

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

.showcase-rarity {
  font-family: var(--font-3d);
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.5px;
}

.showcase-3d-stage {
  width: 100%;
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
  margin-bottom: 8px;
  background: radial-gradient(circle at 50% 45%, #64748b 0%, #475569 55%, #334155 100%);
  border: 1.5px solid #64748b;
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.showcase-3d-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  display: block;
}

.stage-pedestal-ring {
  position: absolute;
  bottom: 8px;
  width: 115px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #00f5d4;
  background: radial-gradient(ellipse at center, rgba(0, 245, 212, 0.4) 0%, rgba(2, 132, 199, 0.12) 60%, transparent 80%);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.6);
  transform: rotateX(60deg);
  animation: pedestalPulse 2.5s infinite ease-in-out;
  z-index: 1;
}

.stage-pedestal-ring.board-ring {
  border-color: #fbbf24;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.45) 0%, rgba(217, 119, 6, 0.15) 60%, transparent 80%);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.6);
}

@keyframes pedestalPulse {
  0%, 100% { transform: rotateX(60deg) scale(0.95); opacity: 0.8; }
  50% { transform: rotateX(60deg) scale(1.05); opacity: 1.0; }
}

.showcase-hero-name {
  font-size: 18px !important;
  margin-bottom: 1px;
}

.showcase-hero-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.showcase-stats-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}

.showcase-stat-pill {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
}

.stat-name {
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
}

.stat-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 3px;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #00f5d4);
  border-radius: 4px;
}

.showcase-action-wrapper {
  width: 100%;
}

.btn-showcase-action {
  width: 100%;
  padding: 11px 16px;
  border-radius: 16px;
  font-family: var(--font-3d);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: transform 0.12s ease;
  touch-action: manipulation;
}

.btn-showcase-action.equipped {
  background: #ecfdf5;
  color: #059669;
  border: 2px solid #a7f3d0;
  cursor: default;
}

.btn-showcase-action.can-equip {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 2px solid #7dd3fc;
  border-bottom: 4px solid #0369a1;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.btn-showcase-action.can-equip:active {
  transform: translateY(2px);
  border-bottom: 2px solid #0369a1;
}

.btn-showcase-action.unlock {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: 2px solid #fde68a;
  border-bottom: 4px solid #b45309;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.btn-showcase-action.unlock:active {
  transform: translateY(2px);
  border-bottom: 2px solid #b45309;
}

.collection-section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-3d);
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  padding: 0 4px;
}

.showcase-thumb-strip {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.showcase-thumb-strip::-webkit-scrollbar {
  height: 5px;
}
.showcase-thumb-strip::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.showcase-thumb-item {
  min-width: 66px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  position: relative;
  touch-action: manipulation;
}

.showcase-thumb-item:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
}

.showcase-thumb-item.active-thumb {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: scale(1.06);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3), 0 6px 16px rgba(2, 132, 199, 0.25);
}

.showcase-thumb-item.equipped-thumb {
  border-color: #10b981;
}

.thumb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: var(--font-3d);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.thumb-name {
  font-family: var(--font-3d);
  font-size: 10px;
  color: #1e293b;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58px;
}

.thumb-badge {
  font-size: 8px;
  background: #10b981;
  color: #ffffff;
  border-radius: 6px;
  padding: 1px 4px;
  margin-top: 2px;
  font-weight: 900;
}

.thumb-lock {
  font-size: 8px;
  font-family: var(--font-3d);
  font-weight: 800;
  color: #94a3b8;
  margin-top: 2px;
}

/* =============================================
   RESPONSIVE DESIGN — Mobile / Tablet / Desktop
   ============================================= */

/* Rule icon circles — emoji sizing fix */
.rule-icon-circle {
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- MOBILE (max 480px) ---- */
@media (max-width: 480px) {
  /* HUD */
  .hud-top { padding: 6px 8px; gap: 4px; }
  .hud-card { padding: 4px 8px; min-width: 50px; }
  .hud-label { font-size: 8px; }
  .hud-val { font-size: 14px; }
  .hud-btn-circle { width: 34px; height: 34px; font-size: 14px; }
  .multiplier-badge { font-size: 13px; padding: 4px 8px; }

  /* Dock buttons */
  .btn-dock-action { min-width: 54px; padding: 8px 6px; }
  .dock-icon { font-size: 18px; }
  .dock-label { font-size: 8px; }
  .home-dock-left, .home-dock-right { gap: 6px; }

  /* Start bottom bar */
  .start-bottom-bar { padding: 10px 8px; flex-direction: column; gap: 8px; }
  .btn-primary-action { font-size: 14px; padding: 12px 20px; }
  .btn-subway-play { padding: 14px 24px; }
  .btn-text { font-size: 14px; }
  .btn-sub { font-size: 9px; }

  /* Modals */
  .modal-content { width: 96vw; max-width: 100%; padding: 14px; }
  .modal-header h2 { font-size: 15px; }
  .shop-item-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .item-icon-box { width: 42px; height: 42px; font-size: 18px; flex-shrink: 0; }
  .btn-buy { width: 100%; padding: 8px; font-size: 11px; }
  .shop-bank-bar { font-size: 13px; }

  /* Game Over */
  .gameover-panel { padding: 18px 14px; }
  .result-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .result-label { font-size: 9px; }
  .result-value { font-size: 18px; }
  .gameover-buttons { gap: 8px; }
  .dual-buttons { flex-direction: column; gap: 6px; }
  .btn-secondary { font-size: 12px; padding: 10px 16px; }

  /* Pause */
  .pause-panel { padding: 18px 14px; }
  .pause-title { font-size: 16px; }
  .pause-stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .pause-stat-pill { padding: 8px 10px; }
  .pause-stat-label { font-size: 9px; }
  .pause-stat-val { font-size: 16px; }

  /* Header */
  .home-header { padding: 10px 12px; }
  .menu-key-pill { font-size: 11px; padding: 5px 10px; }
  .menu-score-pill { font-size: 11px; padding: 5px 10px; }

  /* Hero showcase */
  .showcase-stage-container { padding: 0 4px; }
  .showcase-main-card { padding: 10px; }
  .showcase-3d-stage { height: 140px; }
  .btn-showcase-arrow { width: 32px; height: 32px; font-size: 16px; }
  .showcase-thumb-strip { gap: 6px; padding: 8px 4px; }
  .thumb-card { min-width: 56px; padding: 6px 4px; }

  /* Rules */
  .rules-cards-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rule-card { padding: 8px; }
  .rule-icon-circle { width: 38px; height: 38px; font-size: 16px; }
  .rule-text strong { font-size: 10px; }
  .rule-text span { font-size: 9px; }

  /* Missions */
  .mission-card { flex-direction: column; padding: 10px; }
  .mission-icon-box { font-size: 20px; }

  /* Power-up bars */
  .powerup-bars-container { gap: 4px; padding: 0 6px; }
  .powerup-bar { padding: 4px 8px; font-size: 9px; }

  /* Word hunt */
  .home-word-hunt-card { padding: 8px 10px; }
  .wh-tag { font-size: 9px; }
  .letter-tile { width: 24px; height: 24px; font-size: 11px; }
}

/* ---- TABLET (481px to 1024px) ---- */
@media (min-width: 481px) and (max-width: 1024px) {
  .hud-card { padding: 5px 10px; }
  .hud-label { font-size: 9px; }
  .hud-val { font-size: 15px; }

  .btn-dock-action { min-width: 62px; padding: 10px 8px; }
  .dock-icon { font-size: 20px; }
  .dock-label { font-size: 9px; }

  .modal-content { width: 88vw; max-width: 620px; }
  .shop-item-card { padding: 14px; }
  .item-icon-box { width: 48px; height: 48px; font-size: 22px; }

  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .dual-buttons { flex-direction: row; gap: 10px; }

  .rules-cards-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rule-icon-circle { width: 44px; height: 44px; font-size: 18px; }

  .showcase-3d-stage { height: 155px; }
  .showcase-thumb-strip { gap: 8px; }
  .thumb-card { min-width: 64px; }

  .start-bottom-bar { padding: 12px 16px; }
  .btn-subway-play { padding: 15px 28px; }
}

/* ---- DESKTOP (1025px+) ---- */
@media (min-width: 1025px) {
  .modal-content { max-width: 680px; }
  .modal-header h2 { font-size: 22px; }

  .shop-items-container { gap: 12px; }
  .shop-item-card { padding: 16px 18px; }
  .item-icon-box { width: 56px; height: 56px; font-size: 26px; }

  .result-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }

  .rules-cards-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .rule-icon-circle { width: 52px; height: 52px; font-size: 22px; }

  .btn-dock-action { min-width: 72px; padding: 12px 10px; }
  .dock-icon { font-size: 24px; }
  .dock-label { font-size: 10px; }

  .showcase-3d-stage { height: 180px; }
  .showcase-thumb-strip { gap: 10px; }
  .thumb-card { min-width: 72px; }
}

/* ---- Touch target minimum (all mobile/tablet) ---- */
@media (max-width: 1024px) {
  button, .btn-buy, .btn-dock-action, .btn-primary-action, .btn-secondary {
    min-height: 44px;
    touch-action: manipulation;
  }
  .btn-close-modal {
    min-width: 36px;
    min-height: 36px;
  }
}

/* Landscape phone: compact HUD */
@media (max-height: 480px) and (orientation: landscape) {
  .hud-top { padding: 4px 8px; }
  .hud-card { padding: 3px 8px; }
  .hud-val { font-size: 13px; }
  .start-bottom-bar { padding: 6px 12px; max-width: 540px; }
  .home-middle-zone { display: none !important; }
  .start-screen-layout { padding: 8px 12px; }
  .start-top-bar { padding: 5px 10px; }
  .game-logo-compact { font-size: 15px; }
  .stat-pill { padding: 3px 8px; font-size: 12px; }
  .btn-subway-play { padding: 10px 20px !important; }
  .modal-content { max-height: 94dvh; max-height: 94vh; }
}

/* ---- ULTRA-SMALL PHONES (< 360px) ---- */
@media (max-width: 359px) {
  .hud-card { padding: 3px 6px; min-width: 44px; }
  .hud-val { font-size: 12px; }
  .hud-label { font-size: 7px; }
  .hud-btn-circle { width: 30px; height: 30px; font-size: 13px; }
  .btn-dock-action { min-width: 48px; padding: 6px 4px; }
  .dock-icon { font-size: 16px; }
  .dock-label { font-size: 7px; }
  .home-dock-left, .home-dock-right { gap: 4px; }
  .stat-pill { padding: 3px 7px; font-size: 11px; }
  .game-logo-compact { font-size: 14px; }
  .modal-content { padding: 10px; }
  .modal-header h2 { font-size: 13px; }
  .btn-subway-play .btn-text { font-size: 12px; }
  .btn-subway-play .btn-sub { font-size: 8px; }
  .letter-tile { width: 20px; height: 20px; font-size: 9px; }
  .revive-countdown-circle { width: 60px; height: 60px; font-size: 26px; }
  .daily-streak-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .daily-card.day-7-super { grid-column: span 3; }
}

/* ===================================================
   NEW RETENTION & ENGAGEMENT FEATURES STYLES
   Daily Rewards, Lucky Spin, Trophies, Mystery Box
   =================================================== */

/* 1. Daily Rewards Calendar */
.daily-modal-panel {
  max-width: 440px;
}
.daily-streak-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.daily-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.daily-card.day-7-super {
  grid-column: span 2;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
}
.daily-card.today {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
  animation: today-pulse 2s infinite;
}
@keyframes today-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.daily-card.claimed {
  opacity: 0.65;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.daily-card-day {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #64748b;
}
.daily-card.today .daily-card-day {
  color: #d97706;
}
.daily-card-icon {
  font-size: 26px;
  line-height: 1;
}
.daily-card-reward {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
}
.daily-card-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 8px;
  background: #10b981;
  color: #ffffff;
}
.daily-card.claimed .daily-card-badge {
  background: #64748b;
}
.btn-claim-glow {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border: 2px solid #fde68a !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45) !important;
  width: 100%;
}
.btn-claim-glow:disabled {
  opacity: 0.55;
  filter: grayscale(0.8);
  cursor: not-allowed;
  animation: none !important;
}

/* 2. Lucky Spin Wheel */
.spin-modal-panel {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spin-wheel-stage {
  position: relative;
  width: min(280px, 80vw);
  height: min(280px, 80vw);
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: #ef4444;
  z-index: 20;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}
#spin-wheel-canvas {
  width: min(280px, 80vw) !important;
  height: min(280px, 80vw) !important;
  border-radius: 50%;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
}
.spin-status-banner {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #0284c7;
  background: rgba(224, 242, 254, 0.8);
  padding: 6px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  text-align: center;
}
.btn-spin-glow {
  background: linear-gradient(135deg, #ec4899, #db2777) !important;
  color: #ffffff !important;
  border: 2px solid #fbcfe8 !important;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.45) !important;
  width: 100%;
  padding: 13px 20px;
}

/* 3. Achievements Trophy Room */
.achievements-modal-panel {
  max-width: 520px;
}
.achievements-list-container {
  max-height: 55vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 2px;
}
.achievement-item-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.achievement-item-card.completed {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(240, 253, 244, 0.95);
}
.ach-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef08a, #facc15);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(250, 204, 21, 0.3);
}
.ach-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ach-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ach-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.ach-reward-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #d97706;
}
.ach-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}
.ach-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.ach-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.btn-claim-ach {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.ach-claimed-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  color: #10b981;
  padding: 4px 8px;
}

/* 4. Mystery Box Modal */
.mystery-modal-panel {
  max-width: 380px;
  text-align: center;
}
.mystery-unboxing-area {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mystery-box-3d-anim {
  font-size: 68px;
  line-height: 1;
  margin: 10px 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
  filter: drop-shadow(0 12px 20px rgba(168, 85, 247, 0.4));
}
.mystery-box-3d-anim:hover, .mystery-box-3d-anim:active {
  transform: scale(1.15) rotate(-6deg);
}
.mystery-box-shake {
  animation: crate-shake 0.5s ease;
}
@keyframes crate-shake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.12) rotate(-10deg); }
  40% { transform: scale(1.15) rotate(10deg); }
  60% { transform: scale(1.12) rotate(-8deg); }
  80% { transform: scale(1.08) rotate(6deg); }
}
.mystery-headline {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  color: #7c3aed;
  margin: 0;
}
.mystery-subtext {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}
.mystery-reward-display {
  margin-top: 14px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 2px solid #c4b5fd;
  border-radius: 18px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  animation: reward-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes reward-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.mystery-reward-icon {
  font-size: 36px;
  line-height: 1;
}
.mystery-reward-amount {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: #6d28d9;
}
.btn-mystery-action {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: #ffffff !important;
  border: 2px solid #e9d5ff !important;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4) !important;
  width: 100%;
}

/* Chinese text layout: keep the original game layout and controls. */
html[lang="zh-CN"] body, html[lang="zh-CN"] button { font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html[lang="zh-CN"] .dock-label, html[lang="zh-CN"] .hud-label { letter-spacing: 0; }
html[lang="zh-CN"] .stat-label-text { white-space: nowrap; letter-spacing: 0; }
html[lang="zh-CN"] .showcase-hero-title { line-height: 1.6; }
html[lang="zh-CN"] .thumb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
