/* Custom Variables and Palette */
:root {
  /* Explicit Design System Palette Specification */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-glass: rgba(15, 23, 42, 0.95);
  --border-glass: #334155;

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;

  --btn-primary-bg: #38BDF8;
  --btn-primary-text: #0F172A;
  --btn-secondary-bg: #1E293B;
  --btn-secondary-text: #F1F5F9;
  --btn-secondary-border: #334155;
  --accent-notification: #F59E0B;

  /* ═══ GOLD / ORO — Paleta Oro Metálico Real ═══ */
  /* #D4A017 = Oro profundo metálico – elimina el tono "paja" */
  --accent-gold: #D4A017;
  --accent-gold-bright: #F5C842;
  --accent-gold-light: #FFE082;
  --gold: #D4A017;
  --gold-dim: rgba(212, 160, 23, 0.15);
  --gold-border: rgba(212, 160, 23, 0.45);
  --gold-glow: rgba(212, 160, 23, 0.6);

  /* Resources â€” rich, high-contrast accessible colors */
  --res-wood-bg: rgba(6, 78, 59, 0.75);
  --res-wood-border: #10b981;
  --res-wood-text: #6ee7b7;
  --res-wood-glow: rgba(16, 185, 129, 0.45);

  --res-brick-bg: rgba(120, 40, 10, 0.55);
  --res-brick-border: #ea580c;
  --res-brick-text: #fdba74;
  --res-brick-glow: rgba(234, 88, 12, 0.4);

  --res-sheep-bg: rgba(101, 163, 13, 0.65);
  --res-sheep-border: #84cc16;
  --res-sheep-text: #bef264;
  --res-sheep-glow: rgba(132, 204, 22, 0.5);

  --res-wheat-bg: rgba(100, 70, 8, 0.55);
  --res-wheat-border: #d97706;
  --res-wheat-text: #fde68a;
  --res-wheat-glow: rgba(217, 119, 6, 0.4);

  --res-ore-bg: rgba(44, 50, 100, 0.55);
  --res-ore-border: #818cf8;
  --res-ore-text: #c7d2fe;
  --res-ore-glow: rgba(129, 140, 248, 0.4);

  /* Unified Bottom HUD Dock Clearance */
  --bottom-dock-height: 80px;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto !important;
  position: relative !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch !important;
  background: #090e1a;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  user-select: none;
  -webkit-user-select: none;
  /* Edge-to-Edge Safe area for notched & standalone mobile phones */
  padding-top: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Board Canvas Lock Mode ONLY when playing game */
html.in-game,
body.in-game,
html.canvas-mode,
body.canvas-mode {
  overflow: hidden !important;
  position: fixed !important;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

/* Custom Global Luxury Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.5), rgba(212, 175, 55, 0.7));
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.9);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.6) rgba(15, 23, 42, 0.7);
}

#app-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}

body.in-game #app-container,
body.canvas-mode #app-container {
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

/* Allow native touch scrolling only in list elements */
.right-panels-container,
.logs-list,
.players-container,
.hud-cards-list,
.lobby-main,
.room-lobby-main {
  touch-action: pan-y !important;
}

/* Screen Transitions */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.screen:not(.active) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Optimization: Inactive screens stop GPU animations and transitions */
.screen:not(.active) * {
  animation: none !important;
  transition: none !important;
}

/* Mobile GPU Thermal Protection */
@media (hover: none) and (pointer: coarse) {

  /* On mobile touch devices, disable multi-pass Gaussian blur on heavy overlays to prevent GPU overheating */
  .modal-overlay,
  .game-overlay,
  .friends-modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(4, 8, 20, 0.94) !important;
  }
}

.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Strict Game Screen Isolation & Scroll Prevention */
#game-screen {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.in-game #lobby-screen,
body.in-game #room-lobby-screen,
body.in-game .tab-bar-bottom,
body.in-game .app-header {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Home / Lobby Screen Background with Custom Art & Vertical Scrolling */
#lobby-screen {
  background: linear-gradient(180deg, rgba(8, 15, 30, 0.72) 0%, rgba(8, 15, 30, 0.88) 100%),
    url('../assets/images/hex_board_hero.webp') center center / cover no-repeat fixed;
  background-image: linear-gradient(180deg, rgba(8, 15, 30, 0.72) 0%, rgba(8, 15, 30, 0.88) 100%),
    image-set(url('../assets/images/hex_board_hero.webp') type('image/webp'), url('../assets/images/hex_board_hero.jpg') type('image/jpeg'));
  overflow: hidden !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  height: 100% !important;
  max-height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

#room-lobby-screen {
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.92) 0%, rgba(7, 11, 20, 0.98) 100%) !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ==========================================================================
   ✨ KMKZ LUXURY CYBER-HEX LOADER (AAA Gaming Grade & GPU Accelerated)
   ========================================================================== */
#loading-screen {
  background: #000000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  position: fixed;
  inset: 0;
  overflow: hidden;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

#loading-screen:not(.active) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.kmkz-loading-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  background: #000000 !important;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.kmkz-loading-video.video-playing {
  opacity: 1;
}

@media (max-aspect-ratio: 16/10) {
  .kmkz-loading-video {
    object-fit: cover;
  }
}

/* WebKit iOS Media Controls & Play Button Suppression */
.kmkz-loading-video::-webkit-media-controls,
.kmkz-loading-video::-webkit-media-controls-start-playback-button,
.kmkz-loading-video::-webkit-media-controls-play-button,
.kmkz-loading-video::-webkit-media-controls-panel,
.kmkz-loading-video::-webkit-media-controls-overlay-play-button,
.kmkz-loading-video::-webkit-media-controls-enclosure,
video#kmkz-loading-video::-webkit-media-controls,
video#kmkz-loading-video::-webkit-media-controls-start-playback-button,
video#kmkz-loading-video::-webkit-media-controls-play-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
}

/* --- Atmospheric Ambient Backdrops --- */
.loader-ambient-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.loader-ambient-glow-center {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 95vw);
  height: min(600px, 95vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.06) 45%, transparent 70%);
  filter: blur(28px);
  animation: loaderAmbientPulse 4s ease-in-out infinite alternate;
}

.loader-ambient-glow-secondary {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 120vw);
  height: min(800px, 120vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 60%);
  filter: blur(40px);
}

.loader-hex-grid {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  opacity: 0.16;
  background-image:
    radial-gradient(rgba(245, 158, 11, 0.28) 1.5px, transparent 1.5px),
    radial-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px);
  background-size: 36px 36px, 18px 18px;
  background-position: 0 0, 9px 9px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 75%);
  animation: loaderGridShift 20s linear infinite;
}

@keyframes loaderGridShift {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(36px);
  }
}

@keyframes loaderAmbientPulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.92);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* --- Floating Hex/Ember Micro-Particles --- */
.loader-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loader-particles .particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  opacity: 0;
  animation: floatEmberParticle 4.5s ease-in infinite;
}

.loader-particles .p1 {
  left: 20%;
  bottom: 15%;
  animation-delay: 0s;
  animation-duration: 4.8s;
}

.loader-particles .p2 {
  left: 40%;
  bottom: 10%;
  animation-delay: 0.9s;
  animation-duration: 5.2s;
  width: 5px;
  height: 5px;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
}

.loader-particles .p3 {
  left: 60%;
  bottom: 12%;
  animation-delay: 1.8s;
  animation-duration: 4.4s;
}

.loader-particles .p4 {
  left: 80%;
  bottom: 18%;
  animation-delay: 2.6s;
  animation-duration: 5.6s;
  width: 3px;
  height: 3px;
}

.loader-particles .p5 {
  left: 32%;
  bottom: 8%;
  animation-delay: 3.3s;
  animation-duration: 4.9s;
}

.loader-particles .p6 {
  left: 68%;
  bottom: 5%;
  animation-delay: 1.2s;
  animation-duration: 5.4s;
  background: #38bdf8;
}

@keyframes floatEmberParticle {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }

  25% {
    opacity: 0.85;
  }

  80% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: translateY(-160px) scale(1.4);
  }
}

/* --- Loader Centered Stage --- */
.catian-luxury-loader-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: clamp(36px, 12vh, 100px);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  z-index: 2;
  pointer-events: none;
}

/* --- Kinetic Emblem Stage (Orbital Rings + Medallion) --- */
.kmkz-loading-coin-stage {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: auto;
}

.kmkz-emblem-stage {
  position: relative;
  width: clamp(180px, 50vw, 220px);
  height: clamp(180px, 50vw, 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.loader-orbital-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: center center;
}

.ring-clockwise {
  animation: loaderOrbitalRotate 16s linear infinite;
}

.ring-counter {
  animation: loaderHaloCounterRotate 24s linear infinite;
}

.loader-orbital-ring .orbital-track {
  fill: none;
  stroke: rgba(245, 158, 11, 0.15);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.loader-orbital-ring .orbital-segment {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.loader-orbital-ring .seg-1 {
  stroke: #fbbf24;
  stroke-dasharray: 48 160;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9));
}

.loader-orbital-ring .seg-2 {
  stroke: #38bdf8;
  stroke-dasharray: 32 180;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.9));
}

.loader-orbital-ring .seg-3 {
  stroke: #f59e0b;
  stroke-dasharray: 60 150;
}

.loader-hex-halo {
  position: absolute;
  width: 224px;
  height: 224px;
  pointer-events: none;
  transform-origin: center center;
}

.loader-hex-halo .hex-laser-edge {
  fill: none;
  stroke: rgba(245, 158, 11, 0.38);
  stroke-width: 1.6;
  stroke-dasharray: 85 130;
  stroke-dashoffset: 0;
  animation: hexLaserRun 5s linear infinite;
}

.loader-hex-halo .hex-node {
  fill: #fef08a;
  filter: drop-shadow(0 0 5px #fbbf24);
  animation: hexNodePulse 2.2s ease-in-out infinite alternate;
}

@keyframes loaderOrbitalRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes loaderHaloCounterRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

@keyframes hexLaserRun {
  0% {
    stroke-dashoffset: 430;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes hexNodePulse {
  0% {
    opacity: 0.4;
    transform: scale(0.85);
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 7px #ffffff);
    transform: scale(1.15);
  }
}

/* --- 3D Rotating Gold KMKZ Coin Medallion --- */
.kmkz-coin-3d-scene {
  width: clamp(100px, 30vw, 130px);
  height: clamp(100px, 30vw, 130px);
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.kmkz-coin-3d-disc {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: kmkzCoinSpin3D 4.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  will-change: transform;
}

@keyframes kmkzCoinSpin3D {
  0% {
    transform: rotateY(0deg) rotateX(8deg);
  }
  50% {
    transform: rotateY(180deg) rotateX(-8deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(8deg);
  }
}

.kmkz-coin-3d-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 0 35px rgba(245, 158, 11, 0.45),
    inset 0 0 14px rgba(254, 240, 138, 0.5);
}

.kmkz-coin-front {
  transform: rotateY(0deg) translateZ(3px);
}

.kmkz-coin-back {
  transform: rotateY(180deg) translateZ(3px);
}

.kmkz-coin-texture {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

.kmkz-coin-specular-light {
  position: absolute;
  inset: -60%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 48%,
    rgba(254, 240, 138, 0.6) 52%,
    transparent 65%
  );
  transform: rotate(25deg);
  animation: kmkzCoinSpecularSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes kmkzCoinSpecularSweep {
  0%, 15% {
    transform: translateX(-120%) rotate(25deg);
    opacity: 0;
  }
  35% {
    opacity: 0.9;
  }
  65%, 100% {
    transform: translateX(120%) rotate(25deg);
    opacity: 0;
  }
}

.kmkz-coin-3d-rim {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2.5px solid rgba(254, 240, 138, 0.7);
  box-shadow:
    0 0 15px rgba(245, 158, 11, 0.6),
    inset 0 0 8px rgba(217, 119, 6, 0.8);
  pointer-events: none;
  transform: translateZ(1px);
}

/* --- Brand Typography & Subtitle --- */
.loader-brand-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  z-index: 2;
}

.catian-luxury-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  margin-top: 0;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.loader-brand-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 4px;
  user-select: none;
}

.loader-brand-tagline .tagline-dot {
  color: #afa40b;
  font-size: 0.7rem;
  filter: drop-shadow(0 0 6px #c49209e5);
}

/* --- Dynamic Progress Bar & Spark --- */
.loader-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(380px, 86vw);
  margin-top: 14px;
  z-index: 2;
  pointer-events: auto;
}

.loader-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(10, 16, 29, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.85), inset 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 12px rgba(245, 158, 11, 0.2);
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #38bdf8 100%);
  background-size: 200% 100%;
  animation: progressGradientShimmer 2s linear infinite;
  position: relative;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.75);
}

@keyframes progressGradientShimmer {
  0% {
    background-position: 100% 0%;
  }

  100% {
    background-position: -100% 0%;
  }
}

.loader-progress-fill .progress-spark {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff, 0 0 18px #38bdf8;
}

.loader-progress-percentage {
  font-family: 'Montserrat', 'Inter', monospace;
  font-size: 0.76rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* --- Status Pill & Glowing Indicator Orb --- */
.loader-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-top: 12px;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  flex-shrink: 0;
  animation: statusDotPulse 1.6s ease-in-out infinite;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-indicator-dot.connected {
  background: #34d399 !important;
  box-shadow: 0 0 12px #34d399 !important;
  animation: none !important;
}

@keyframes statusDotPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 0 12px #fbbf24;
  }
}

#cold-start-status {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

/* --- TEXTO: DE IZQUIERDA A DERECHA --- */
.catian-luxury-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  margin-top: 0;
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: 3.2rem;
  font-weight: 900;
}

.logo-text-branding {
  margin-top: 0 !important;
  font-size: 3.56rem !important;
  font-weight: 900 !important;
  letter-spacing: 5px !important;
  filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.75)) !important;
  user-select: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.logo-text-branding .char {
  margin: 0 4px !important;
  font-size: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.char {
  background: linear-gradient(180deg, #FFFFFF 0%, #FEF08A 35%, #F59E0B 75%, #B45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fbbf24;
  margin: 0 4px;
  font-size: inherit;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  display: inline-block;
  transition: transform 0.2s ease;
}

.char:hover {
  transform: translateY(-1px) scale(1.05);
}

/* Recorrido perimetral del lÃ¡ser */
@keyframes laserRun {
  0% {
    stroke-dashoffset: 540;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

/* Latido de luz del nÃºcleo 3D */
@keyframes cubeGlow {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes nodePulse {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  100% {
    opacity: 0.9;
    filter: drop-shadow(0 0 4px #FFFCF0);
  }
}

/* Header Logo */

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  position: relative;
  height: auto;
  min-width: 0 !important;
  width: auto !important;
  max-width: fit-content !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.app-logo-img {
  height: 130px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s ease;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 15;
  pointer-events: auto;
}

.app-logo-img:hover {
  transform: translateY(-50%) scale(1.04);
}

.header-logo-img {
  height: 52px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(251, 191, 36, 0.35));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
  vertical-align: middle;
  display: block;
}

.header-logo-img:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.6));
}

.login-logo-img {
  width: auto;
  height: 85px;
  max-width: 250px;
  object-fit: contain;
  filter: drop-shadow(0 4px 18px rgba(251, 191, 36, 0.45));
  margin-bottom: 8px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo-img:hover {
  transform: scale(1.05) translateY(-2px);
}

@media (max-width: 600px) {
  .logo {
    min-width: 0 !important;
    width: auto !important;
    max-width: fit-content !important;
    flex-shrink: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .logo-text-branding {
    font-size: 1.7rem !important;
    letter-spacing: 1.5px !important;
  }

  .logo-text-branding .char {
    margin: 0 2px !important;
  }

  .header-logo-img {
    height: 42px;
    max-width: 140px;
  }

  .login-logo-img {
    height: 68px;
    max-width: 200px;
  }

  .app-logo-img {
    height: 60px;
    max-width: 140px;
  }
}

.logo span {
  color: var(--accent-gold);
}

.user-stats-bar {
  display: flex;
  gap: 15px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.stat-badge.gold {
  border-color: rgba(255, 190, 59, 0.3);
  color: var(--accent-gold);
}

/* ==========================================================================
   HEXAGONAL GRID CONTAINER LOBBY & CENTERING SCROLL SNAP
   ========================================================================== */
.hex-grid-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 72px);
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain;
  padding: 20px 0 100px 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hex-grid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* TRUE REGULAR POINTY-TOP HEXAGON CONTAINER */
.hex-card {
  width: min(430px, calc(100vw - 20px));
  height: min(496px, calc((100vw - 20px) * 1.1547));
  aspect-ratio: 1 / 1.1547;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  opacity: 0.82;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform, opacity;
  box-sizing: border-box;
}

/* Active Centered Hexagon Card (Static positioning, moves only with scroll) */
.hex-card.hex-card-active,
.hex-card:focus-within {
  opacity: 1;
  transform: scale(1.0);
  z-index: 10;
}

/* True Regular Pointy-Top Hexagonal Frame Backdrop */
.hex-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.5));
  transition: filter 0.4s ease, transform 0.4s ease;
}

.hex-card.hex-card-active .hex-card-inner {
  filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.9));
}

/* Progressive Glowing Laser Border for Hexagon Containers */
.hex-laser-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.hex-laser-bg {
  fill: none;
  stroke: rgba(245, 158, 11, 0.22);
  stroke-width: 4;
}

.hex-laser-progress {
  fill: none;
  stroke-width: 7.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1490;
  stroke-dashoffset: 1490;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.75));
  transition: stroke-dashoffset 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: stroke-dashoffset;
}

.hex-card.hex-card-active .hex-laser-progress {
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.9));
}

/* Rectangular Container for Account ID Recovery at the end */
.hex-card.recovery-card {
  aspect-ratio: auto !important;
  min-height: auto !important;
  height: auto !important;
}

.rectangular-card-inner {
  width: 100%;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), inset 0 0 25px rgba(245, 158, 11, 0.08);
  border-radius: 24px;
  padding: 24px 20px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hex-card.hex-card-active .rectangular-card-inner {
  border-color: #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.5);
}

/* Inner Gold Hexagon Border Outline Overlay */
.hex-card-inner::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 1;
}

/* Content Container Inside Safe Rectangular Zone of Regular Hexagon */
.hex-card-content {
  position: absolute;
  z-index: 2;
  inset: 12% 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 4px;
}

/* Custom Sleek Scrollbar for Hexagon Content */
.hex-card-content::-webkit-scrollbar {
  width: 4px;
}

.hex-card-content::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.6);
  border-radius: 4px;
}

.hex-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid #f59e0b;
  color: #fbbf24;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hex-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  margin: 0;
}

.hex-desc {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 320px;
  margin: 0;
}

.lobby-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 190, 59, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .lobby-hero-card:hover::before {
    opacity: 1;
  }
}

.lobby-hero-card h2 {
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.lobby-hero-card p {
  font-size: 0.9rem;
  margin-bottom: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: var(--accent-teal);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.btn-hero {
  padding: 14px 32px;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
}

/* Rooms Card â€” Full-width below hero */
.lobby-rooms-card {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  padding: 20px 16px;
  align-items: center;
  box-sizing: border-box;
}

.lobby-rooms-card h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.lobby-rooms-card p {
  font-size: 0.85rem;
  margin-bottom: 14px;
}

/* Secondary Grid: Profile, Leaderboard, Tutorial â€” mobile-first & overflow-proof */
.lobby-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Card Styling (Luxury Glassmorphism) */
.card {
  background: rgba(20, 25, 35, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px 16px;
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.2s;
}

.card:nth-child(4) {
  animation-delay: 0.3s;
}

.card:nth-child(5) {
  animation-delay: 0.4s;
}

/* Disable hover scale on touch â€” causes jank */
@media (hover: hover) {
  .card:hover {
    transform: scale(1.02) translateY(-4px);
    border-color: rgba(255, 190, 59, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.card p {
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Profile Card & Input Rows */
.input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.input-row button {
  padding: 10px 16px;
  font-size: 0.9rem;
  box-shadow: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-item.select-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.detail-item label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-item select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.profile-recovery-box {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
  width: 100%;
  box-sizing: border-box;
}

.recovery-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.recovery-row {
  margin-bottom: 10px;
}

.recovery-row:last-child {
  margin-bottom: 0;
}

.recovery-row input {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-family: monospace;
  text-align: center;
  color: var(--text-muted);
}

#profile-userid-restore-input {
  color: var(--text-main);
}

.recovery-row button {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Global Leaderboard Card */
.leaderboard-table-container {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  background: rgba(10, 16, 30, 0.65);
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
}



.loading-cell {
  text-align: center !important;
  padding: 20px !important;
  color: var(--text-muted) !important;
}

.btn-tutorial-start {
  margin-top: auto;
  width: 100%;
}

/* Room Lobby Screen Base Styles */
.room-lobby-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px 60px 12px;
  overflow: visible !important;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
  flex-shrink: 0;
  touch-action: pan-y !important;
}

.room-code-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.room-code-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.room-code-title span {
  color: var(--accent-gold);
  font-family: monospace;
  letter-spacing: 2px;
}

.room-share-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.room-share-actions button {
  flex: 1;
  max-width: 160px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.room-lobby-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.players-lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  box-sizing: border-box;
}

/* Buttons */
button {
  font-family: inherit;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--gradient-logo-btn);
  color: #ffffff !important;
  font-weight: 800;
  padding: 14px 24px;
  font-size: 1rem;
  min-height: 48px;
  box-shadow: 0 4px 18px rgba(180, 83, 9, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  position: relative;
  overflow: hidden;
  border: 1.5px solid #fde047;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: transform 0.5s ease, opacity 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary:hover {
  background: var(--gradient-logo-hover);
  color: #ffffff !important;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
}

.btn-accent {
  background: linear-gradient(135deg, var(--logo-teal), #0f766e);
  color: #fff;
  padding: 14px 24px;
  font-size: 1rem;
  min-height: 48px;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.5);
}

.btn-accent::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: transform 0.5s ease, opacity 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.btn-accent:hover::after {
  left: 150%;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #5eead4, var(--accent-teal));
  box-shadow: 0 8px 25px rgba(45, 212, 191, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 14px 20px;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-danger:hover {
  background: linear-gradient(145deg, #f87171, #ef4444);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
}

.btn-danger:active {
  transform: translateY(0);
}

.btn-sm {
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Shop grid */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
}

.btn-buy {
  background: rgba(255, 190, 59, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 190, 59, 0.3);
  padding: 8px 16px;
}

.btn-buy:hover {
  background: var(--accent-gold);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Matchmaking Queue Overlay */
#queue-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

.spinner {
  width: 48px;
  height: 48px;
  background: conic-gradient(from 0deg, var(--accent-gold), transparent 70%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: spinHex 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 15px auto;
}

.spinner::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(20, 25, 35, 1);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes spinHex {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   GAME SCREEN LAYOUT â€” Board-First Design
   ========================================= */
#game-screen .game-layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.board-area {
  flex: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

#kmkz-board-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* 2.5D Isometric Board & Tactile Volumetric Depth */
.board-area.board-isometric-view,
.board-isometric-view {
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

.board-isometric-view #kmkz-board-canvas {
  transform: perspective(1200px) rotateX(16deg) scale(1.02);
  transform-origin: 50% 55%;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.6));
}

.kmkz-ambient-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(2, 6, 23, 0.42) 100%);
}

/* =========================================
   GAME SCREEN STYLE â€” HUD & Panels
   ========================================= */
.game-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  z-index: 10;
  gap: 12px;
}



.timer-progress-container {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.timer-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-teal), #60a5fa);
  transition: width 1s linear, background-color 0.5s ease;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
}

.phase-badge {
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: var(--accent-teal);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* â”€â”€â”€ BOARD-FIRST LAYOUT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.game-layout {
  flex: 1;
  position: relative;
  /* anchor for floating panels */
  overflow: hidden;
  min-height: 0;
  background: #070c18;
}

/* Board fills 100% */
.board-area {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* â”€â”€â”€ FLOATING PANEL BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.game-sidebar,
.controls-sidebar {
  position: absolute;
  top: 16px;
  max-height: calc(100% - 150px);
  background: rgba(8, 14, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 20;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.35s ease;
}

.game-sidebar {
  width: 170px;
  padding: 10px;
  gap: 8px;
}

.controls-sidebar {
  width: 240px;
  padding: 14px;
  gap: 10px;
}

/* Left panel â€” players */
.game-sidebar {
  left: 16px;
}

/* Right panel â€” controls */
.controls-sidebar {
  right: 16px;
}

/* Collapsed state */
.game-sidebar.collapsed {
  transform: translateX(calc(-170px - 20px));
  opacity: 0;
  pointer-events: none;
}

.controls-sidebar.collapsed {
  transform: translateX(calc(240px + 20px));
  opacity: 0;
  pointer-events: none;
}

/* â”€â”€â”€ PANEL TOGGLE BUTTONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.panel-toggle {
  position: absolute;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8, 14, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.panel-toggle:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Left Toggles */
#toggle-players {
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

/* Right Toggles */
#toggle-logs {
  right: 16px;
  top: 16px;
  left: auto;
  transform: none;
}

#toggle-buildings {
  right: 16px;
  top: 60px;
  left: auto;
  transform: none;
}

#toggle-dev-cards {
  right: 16px;
  top: 104px;
  left: auto;
  transform: none;
}

#toggle-bank {
  right: 16px;
  top: 148px;
  left: auto;
  transform: none;
}

/* Shift left toggles when panel is open */
.game-sidebar:not(.collapsed)~#toggle-players {
  left: calc(170px + 24px);
}


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

.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--text-muted);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.player-row.active-turn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02));
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2), inset 0 0 10px rgba(251, 191, 36, 0.05);
  transform: translateX(4px);
}

.player-row.red {
  border-left-color: #ff4a5a;
}

.player-row.blue {
  border-left-color: #3498db;
}

.player-row.orange {
  border-left-color: #e67e22;
}

.player-row.green {
  border-left-color: #2ecc71;
}

.player-info {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.player-name {
  font-weight: 600;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 135px;
}

.player-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* =========================================
   RESOURCE CARDS â€” Rich Colored Design
   ========================================= */
.my-cards-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.res-card {
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 80px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.2s ease;
  cursor: default;
}

.res-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.res-card:hover::before {
  opacity: 1;
}

/* Accent top bar */
.res-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

/* WOOD */
.res-card.wood {
  background: var(--res-wood-bg);
  border-color: var(--res-wood-border);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.2), inset 0 1px 0 rgba(134, 239, 172, 0.1);
}

.res-card.wood::after {
  background: linear-gradient(90deg, #22c55e, #15803d);
}

.res-card.wood::before {
  background: var(--res-wood-glow);
}

.res-card.wood:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
}

/* BRICK */
.res-card.brick {
  background: var(--res-brick-bg);
  border-color: var(--res-brick-border);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.2), inset 0 1px 0 rgba(253, 186, 116, 0.1);
}

.res-card.brick::after {
  background: linear-gradient(90deg, #f97316, #c2410c);
}

.res-card.brick::before {
  background: var(--res-brick-glow);
}

.res-card.brick:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
}

/* SHEEP */
.res-card.sheep {
  background: var(--res-sheep-bg);
  border-color: var(--res-sheep-border);
  box-shadow: 0 4px 16px rgba(132, 204, 22, 0.2), inset 0 1px 0 rgba(217, 249, 157, 0.1);
}

.res-card.sheep::after {
  background: linear-gradient(90deg, #a3e635, #65a30d);
}

.res-card.sheep::before {
  background: var(--res-sheep-glow);
}

.res-card.sheep:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(132, 204, 22, 0.35);
}

/* WHEAT */
.res-card.wheat {
  background: var(--res-wheat-bg);
  border-color: var(--res-wheat-border);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.2), inset 0 1px 0 rgba(253, 230, 138, 0.1);
}

.res-card.wheat::after {
  background: linear-gradient(90deg, #fbbf24, #92400e);
}

.res-card.wheat::before {
  background: var(--res-wheat-glow);
}

.res-card.wheat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35);
}

/* ORE */
.res-card.ore {
  background: var(--res-ore-bg);
  border-color: var(--res-ore-border);
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.2), inset 0 1px 0 rgba(199, 210, 254, 0.1);
}

.res-card.ore::after {
  background: linear-gradient(90deg, #a5b4fc, #4f46e5);
}

.res-card.ore::before {
  background: var(--res-ore-glow);
}

.res-card.ore:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.35);
}

.res-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.res-card-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* Header color per resource */
.res-card.wood .res-card-header {
  color: var(--res-wood-text);
}

.res-card.brick .res-card-header {
  color: var(--res-brick-text);
}

.res-card.sheep .res-card-header {
  color: var(--res-sheep-text);
}

.res-card.wheat .res-card-header {
  color: var(--res-wheat-text);
}

.res-card.ore .res-card-header {
  color: var(--res-ore-text);
}

.res-card-count {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s ease;
}

.res-card-count.pop {
  transform: scale(1.4);
  color: var(--accent-gold);
}

/* Control panel buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-action {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.88rem;
  text-align: left;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Build cost pill inline in button */
.build-cost {
  display: flex;
  gap: 3px;
  align-items: center;
  opacity: 0.75;
  font-size: 0.82rem;
}

.cost-item {
  padding: 1px 3px;
  border-radius: 4px;
  line-height: 1;
}

.cost-item.wood {
  color: var(--res-wood-text);
}

.cost-item.brick {
  color: var(--res-brick-text);
}

.cost-item.sheep {
  color: var(--res-sheep-text);
}

.cost-item.wheat {
  color: var(--res-wheat-text);
}

.cost-item.ore {
  color: var(--res-ore-text);
}

.btn-action:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-action:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Dice */
.dice-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.die {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #fff, #e2e8f0);
  color: #000;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 1);
}

@keyframes diceRoll {
  0% {
    transform: rotate(0deg) scale(1) translateY(0);
  }

  25% {
    transform: rotate(-15deg) scale(1.1) translateY(-5px);
  }

  50% {
    transform: rotate(15deg) scale(1.1) translateY(0);
  }

  75% {
    transform: rotate(-15deg) scale(1.1) translateY(-5px);
  }

  100% {
    transform: rotate(0deg) scale(1) translateY(0);
  }
}

.die.rolling {
  animation: diceRoll 0.25s infinite;
  color: var(--accent-gold);
  background: linear-gradient(135deg, #fff, #fef08a);
}

/* Dice Skins */
.die.die-ruby {
  background: linear-gradient(135deg, #ef4444, #991b1b) !important;
  color: #ffffff !important;
  border: 2px solid #f87171 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.die.die-fire {
  background: linear-gradient(135deg, #ff6b00, #b91c1c) !important;
  color: #fef08a !important;
  border: 2px solid #f97316 !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  text-shadow: 0 0 8px rgba(254, 240, 138, 0.8) !important;
}

.die.die-gold {
  background: linear-gradient(135deg, #fef08a, #d97706) !important;
  color: #451a03 !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.8), inset 0 -3px 0 rgba(120, 53, 15, 0.4) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.die.die-neon {
  background: linear-gradient(135deg, #06b6d4, #7c3aed) !important;
  color: #ffffff !important;
  border: 2px solid #22d3ee !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.4) !important;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.9) !important;
}

.die.die-cosmic {
  background: linear-gradient(135deg, #3b0764, #1e1b4b) !important;
  color: #e9d8fd !important;
  border: 2px solid #a855f7 !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.5) !important;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.9) !important;
}

/* Hide helper */
.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Global Modal Overlays */
.game-overlay,
.friends-modal-overlay,
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  background: rgba(2, 6, 23, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.game-overlay.hidden,
.friends-modal-overlay.hidden,
.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Inactivity Warning & Session Suspended Overlays (Highest Priority z-index) */
#modal-inactivity-warning,
#modal-session-suspended {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 9999999 !important;
  background: rgba(2, 6, 23, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(8px, 3vw, 16px) !important;
}

#modal-inactivity-warning.hidden,
#modal-session-suspended.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --- CUSTOM ROOM LOBBY STYLES --- */
.lobby-action-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.lobby-action-row .btn-accent {
  width: 100%;
}

.join-room-box {
  display: flex;
  gap: 8px;
  width: 100%;
}

.join-room-box input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-main);
  padding: 12px;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
}

.join-room-box button {
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 1rem;
}

.join-room-box input:focus {
  border-color: var(--accent-teal);
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.room-lobby-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 16px 20px 50px 20px;
  box-sizing: border-box;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}



.room-lobby-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(360px, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.room-players-card,
.room-config-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 22px !important;
  padding: 22px !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.room-players-card:hover,
.room-config-card:hover {
  border-color: rgba(251, 191, 36, 0.25) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(251, 191, 36, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

@media (max-width: 768px) {
  .room-code-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-share-actions {
    width: 100%;
  }

  .room-share-actions button {
    flex: 1;
  }

  .room-lobby-layout {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .room-lobby-main {
    padding: 10px 8px 40px 8px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .room-players-card,
  .room-config-card {
    padding: 14px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

.players-lobby-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 8px !important;
  margin: 10px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lobby-player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 40, 55, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  width: 100%;
  box-sizing: border-box;
}

.lobby-player-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 190, 59, 0.3);
  background: rgba(40, 50, 70, 0.7);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.lobby-player-item.bot {
  border-color: rgba(0, 210, 196, 0.2);
  color: var(--accent-teal);
}

.btn-remove-bot {
  background: rgba(255, 74, 90, 0.15);
  color: var(--accent-danger);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-bot:hover {
  background: var(--accent-danger);
  color: #fff;
}

.lobby-bot-controls {
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════
   COMPACT ROSTER & BOT CONTROLS (#view-panel-players)
   ═══════════════════════════════════════════════════════════════════ */
.lobby-match-roster-controls {
  display: flex !important;
  gap: 10px !important;
  align-items: stretch !important;
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.config-group.config-players-count-group {
  flex: 0 0 160px !important;
  margin-bottom: 0 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.compact-roster-label {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-bottom: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.compact-roster-select {
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 2px 8px !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.compact-roster-select:focus {
  border-color: #38bdf8 !important;
}

.lobby-bot-management-card {
  flex: 1 1 auto !important;
  margin-top: 0 !important;
  width: auto !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 6px 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  grid-template-rows: auto auto !important;
  column-gap: 8px !important;
  row-gap: 4px !important;
  align-items: center !important;
}

/* 👥 Collapsible Online Friends Accordion */
.lobby-online-friends-invite {
  margin-top: 8px !important;
  margin-bottom: 4px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-top: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.lobby-friends-accordion-toggle {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 10px !important;
  background: linear-gradient(135deg, rgba(20, 30, 52, 0.72) 0%, rgba(12, 19, 35, 0.88) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  border-radius: 9px !important;
  color: #e2e8f0 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  box-sizing: border-box !important;
}

.lobby-friends-accordion-toggle:hover {
  background: linear-gradient(135deg, rgba(28, 42, 72, 0.82) 0%, rgba(16, 26, 48, 0.95) 100%) !important;
  border-color: rgba(56, 189, 248, 0.42) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 12px rgba(56, 189, 248, 0.12) !important;
}

.friends-toggle-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #4ade80 !important;
  letter-spacing: 0.4px !important;
  font-size: 0.73rem !important;
  font-weight: 800 !important;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.2) !important;
}

.friends-toggle-title .online-dot-pulse {
  margin-right: 0 !important;
  flex-shrink: 0 !important;
}

.friends-toggle-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Static modern refresh pill - zero rotate/spin animation */
.btn-refresh-friends-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: 0.3px !important;
  color: #38bdf8 !important;
  padding: 2px 7px !important;
  height: 22px !important;
  min-height: 22px !important;
  border-radius: 6px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  cursor: pointer !important;
  user-select: none !important;
  box-sizing: border-box !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-refresh-friends-pill .refresh-pill-svg {
  flex-shrink: 0 !important;
  stroke: currentColor !important;
}

.btn-refresh-friends-pill:hover {
  background: rgba(56, 189, 248, 0.24) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.28) !important;
  transform: none !important;
}

.btn-refresh-friends-pill:active {
  background: rgba(56, 189, 248, 0.35) !important;
  transform: scale(0.96) !important;
}

.friends-toggle-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 5px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.lobby-friends-accordion-toggle[aria-expanded="true"] .friends-toggle-arrow {
  transform: rotate(180deg) !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.lobby-friends-body {
  max-height: 165px !important;
  overflow-y: auto !important;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin-top 0.2s ease !important;
  opacity: 1 !important;
  margin-top: 6px !important;
  padding-right: 2px !important;
  scrollbar-width: thin !important;
}

.lobby-friends-body::-webkit-scrollbar {
  width: 4px !important;
}

.lobby-friends-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 4px !important;
}

.lobby-friends-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25) !important;
  border-radius: 4px !important;
}

.lobby-friends-body::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.45) !important;
}

.lobby-friends-body.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  margin-top: 0 !important;
  pointer-events: none !important;
}

.loading-friends-msg {
  text-align: center !important;
  color: #94a3b8 !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  padding: 12px 8px !important;
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 8px !important;
  border: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

/* ⚙️ Pre-Game Match Settings Summary Card (#lobby-match-summary-card) */
.lobby-match-summary-card {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 7px !important;
  margin-bottom: 5px !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.94) 100%) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.32) !important;
  border-radius: 12px !important;
  padding: 8px 11px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.lobby-match-summary-card:hover {
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(251, 191, 36, 0.15) !important;
}

.summary-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
}

.summary-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.summary-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #f59e0b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.btn-summary-quick-edit {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 6px !important;
  color: #fbbf24 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.btn-summary-quick-edit:hover {
  background: rgba(245, 158, 11, 0.32) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.summary-chips-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 4px !important;
}

.summary-chip {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 3px 2px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  min-width: 0 !important;
  cursor: pointer !important;
}

.summary-chip:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  transform: translateY(-1px) !important;
}

.summary-chip .chip-icon {
  font-size: 0.85rem !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
}

.summary-chip .chip-val {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  letter-spacing: 0.2px !important;
}

.bot-diff-header {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 2px !important;
}

.bot-diff-title {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.bot-diff-current-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  letter-spacing: 0.3px !important;
}

.bot-diff-current-badge.easy {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.bot-diff-current-badge.normal {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.bot-diff-current-badge.hard {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bot-diff-selector {
  grid-column: 1 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px !important;
  margin-bottom: 0 !important;
}

.bot-diff-pill-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 4px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

.bot-diff-pill-btn:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #ffffff;
  transform: translateY(-1px);
}

.diff-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.diff-indicator-dot.easy {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.diff-indicator-dot.normal {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.diff-indicator-dot.hard {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.diff-indicator-dot.impossible {
  background: #c084fc;
  box-shadow: 0 0 8px #a855f7;
}

.bot-diff-pill-btn[data-diff="easy"].active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
  font-weight: 800;
}

.bot-diff-pill-btn[data-diff="normal"].active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  font-weight: 800;
}

.bot-diff-pill-btn[data-diff="hard"].active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
  font-weight: 800;
}

.bot-diff-pill-btn[data-diff="impossible"].active {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.24);
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
  font-weight: 800;
}

.bot-actions-row {
  grid-column: 2 !important;
  display: flex !important;
  align-items: stretch !important;
  margin: 0 !important;
  height: 100% !important;
}

.btn-lobby-bot-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  flex: 0 0 auto !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
}

.btn-add-single-bot {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

.btn-add-single-bot.bot-just-added {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  pointer-events: none !important;
  opacity: 0.75 !important;
  transform: scale(0.97) !important;
}

.btn-add-single-bot:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-fill-all-bots {
  background: rgba(56, 189, 248, 0.18);
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
}

.btn-fill-all-bots:hover {
  background: rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.player-role-tag.bot-tag.diff-easy {
  background: rgba(34, 197, 94, 0.2) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
}

.player-role-tag.bot-tag.diff-normal {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}

.player-role-tag.bot-tag.diff-hard {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}

.player-role-tag.bot-tag.diff-impossible {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(225, 29, 72, 0.22)) !important;
  border: 1px solid rgba(192, 132, 252, 0.6) !important;
  color: #f3e8ff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.28) !important;
}

.bot-tag-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.bot-tag-clickable:hover {
  filter: brightness(1.25);
  transform: scale(1.05);
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.config-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.config-group select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-main);
  padding: 12px;
  font-size: 16px;
  /* Prevent iOS zoom */
  font-family: inherit;
  min-height: 48px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
}

.config-group select:focus {
  border-color: var(--accent-teal);
  outline: 3px solid var(--accent-gold);
  /* WCAG 2.4.7 Focus Visible */
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

select option {
  background-color: #1e2837;
  /* Solid dark background for contrast */
  color: #ffffff;
  font-weight: 500;
}

.lobby-start-controls {
  margin-top: 16px;
}

/* Persistent Chat Notification Pulse Animation */
.btn-nav-chat.chat-notify-pulse,
#dock-toggle-chat.chat-notify-pulse,
#toggle-chat.chat-notify-pulse {
  animation: chatBadgePulse 1.2s infinite ease-in-out !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.85), inset 0 0 8px rgba(251, 191, 36, 0.45) !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(217, 119, 6, 0.55)) !important;
  color: #ffffff !important;
}

@keyframes chatBadgePulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.7));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px rgba(251, 191, 36, 1));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.7));
  }
}

/* --- SHOP & COLLECTION RESPONSIVE CARDS SYSTEM --- */
#shop-items-grid,
#collection-items-grid {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 0 !important;
}

#collection-items-grid.test-mode,
#collection-items-grid[data-tab="test"] {
  display: block !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  max-width: 100% !important;
}

.pcard-collection-wrap.is-test-active .collection-preview-header {
  display: none !important;
}

.pcard-collection-wrap.is-test-active {
  padding: 10px 10px 14px 10px !important;
}


.shop-card-hex {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  align-items: center !important;
  min-height: 235px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 10px 12px !important;
  border-radius: 18px !important;
  background: radial-gradient(130% 120% at 50% 0%, var(--card-glow, rgba(56, 189, 248, 0.08)) 0%, rgba(14, 21, 38, 0.85) 55%, rgba(8, 13, 25, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.shop-card-hex:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Rarities */
.shop-card-hex.rarity-rare {
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2) !important;
}

.shop-card-hex.rarity-epic {
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.25) !important;
}

.shop-card-hex.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3) !important;
}

.shop-card-hex.state-equipped {
  border-color: #10b981 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.98)) !important;
}

/* Action Buttons */
.btn-shop-action {
  width: 100% !important;
  padding: 8px 6px !important;
  border-radius: 10px !important;
  font-weight: 900 !important;
  font-size: 0.78rem !important;
  text-align: center !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35) !important;
}

.btn-shop-action.btn-buy:hover {
  filter: brightness(1.1) !important;
  transform: scale(1.02) !important;
}

.btn-shop-action.btn-equip {
  background: linear-gradient(135deg, #38bdf8, #2563eb) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35) !important;
}

.btn-shop-action.btn-equip:hover {
  filter: brightness(1.1) !important;
  transform: scale(1.02) !important;
}

.btn-shop-action.btn-active {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid #10b981 !important;
  cursor: default !important;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {

  #shop-items-grid,
  #collection-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)) !important;
    gap: 8px !important;
  }

  .shop-card-hex {
    min-height: 195px !important;
    padding: 10px 8px !important;
    border-radius: 14px !important;
  }

  .btn-shop-action,
  .btn-equip-collection {
    padding: 7px 4px !important;
    font-size: 0.74rem !important;
  }
}

/* --- FRIEND ONLINE DISCREET TOP POPUP (Swipe-to-Dismiss & Auto-Timer) --- */
.friend-online-popup {
  position: fixed !important;
  top: max(16px, env(safe-area-inset-top, 16px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px 13px 14px !important;
  width: 82vw !important;
  max-width: 440px !important;
  min-width: 280px !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.98)) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.75) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(52, 211, 153, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  animation: friendPopupTopSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  touch-action: none !important;
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  will-change: transform, opacity !important;
  overflow: hidden !important;
}

.friend-online-popup.dragging {
  cursor: grabbing !important;
  transition: none !important;
  animation: none !important;
}

.friend-online-popup.swiping-back {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
}

.friend-online-popup.dismissing {
  animation: friendPopupTopSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards !important;
  pointer-events: none !important;
}

.friend-online-popup.swiped-up {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease !important;
  transform: translate(-50%, -90px) scale(0.92) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.friend-online-popup.swiped-left {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease !important;
  transform: translate(calc(-50% - 100vw), 0) rotate(-12deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.friend-online-popup.swiped-right {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease !important;
  transform: translate(calc(-50% + 100vw), 0) rotate(12deg) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.friend-online-popup .popup-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: 2px solid #34d399;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.friend-online-popup .popup-info {
  flex: 1;
  min-width: 0;
}

.friend-online-popup .popup-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-online-popup .popup-badge {
  font-size: 0.7rem;
  color: #34d399;
  font-weight: 700;
}

.friend-online-popup .popup-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-online-popup .popup-btn-invite {
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.friend-online-popup .popup-btn-invite:hover {
  transform: scale(1.04);
}

.friend-online-popup .popup-progress-bar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.friend-online-popup .popup-progress-fill {
  height: 100% !important;
  width: 100% !important;
  background: linear-gradient(90deg, #34d399, #10b981) !important;
  transform-origin: left !important;
  animation: friendPopupProgress 5s linear forwards !important;
}

@keyframes friendPopupProgress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@keyframes friendPopupTopSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes friendPopupTopSlideOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -45px) scale(0.92);
  }
}

/* --- HUD GOLD CHOICE BAR — Modo Mina de Oro (Inline HUD) --- */
.hud-gold-choice-bar {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(20, 12, 0, 0.97), rgba(50, 28, 0, 0.97));
  border: 2px solid var(--accent-gold);
  border-radius: 18px;
  padding: 10px 12px;
  z-index: 90;
  box-shadow: 0 0 24px var(--gold-glow), 0 8px 30px rgba(0, 0, 0, 0.7);
  animation: goldBarSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes goldBarSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hud-gold-choice-bar.hidden {
  display: none !important;
}

.hud-gold-choice-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-gold-choice-title {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--accent-gold-bright, #F5C842);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-shadow: 0 0 12px var(--gold-glow);
}

.hud-gold-choice-options {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.btn-gold-choice-option {
  flex: 1 1 0px;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1.5px solid rgba(212, 160, 23, 0.35);
  background: rgba(212, 160, 23, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  color: #f8fafc;
}

.btn-gold-choice-option .gold-opt-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.btn-gold-choice-option .gold-opt-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  white-space: nowrap;
}

.btn-gold-choice-option:hover,
.btn-gold-choice-option:active {
  background: rgba(212, 160, 23, 0.3);
  border-color: var(--accent-gold);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-gold-choice-option.wood {
  border-color: var(--res-wood-border);
  background: var(--res-wood-bg);
}

.btn-gold-choice-option.brick {
  border-color: var(--res-brick-border);
  background: var(--res-brick-bg);
}

.btn-gold-choice-option.sheep {
  border-color: var(--res-sheep-border);
  background: var(--res-sheep-bg);
}

.btn-gold-choice-option.wheat {
  border-color: var(--res-wheat-border);
  background: var(--res-wheat-bg);
}

.btn-gold-choice-option.ore {
  border-color: var(--res-ore-border);
  background: var(--res-ore-bg);
}

@media (max-width: 768px) {
  .hud-gold-choice-bar {
    padding: 8px 8px;
    border-radius: 14px;
    gap: 6px;
  }

  .hud-gold-choice-title {
    font-size: 0.75rem;
    letter-spacing: 0.3px;
  }

  .hud-gold-choice-options {
    gap: 4px;
  }

  .btn-gold-choice-option {
    padding: 6px 2px;
    border-radius: 10px;
  }

  .btn-gold-choice-option .gold-opt-icon {
    font-size: 1.15rem;
  }

  .btn-gold-choice-option .gold-opt-label {
    font-size: 0.7rem;
  }
}

/* Gold glow pulse on in-gold-mode state of the HUD */
.my-resources-hud.in-gold-mode {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  box-shadow: 0 0 20px var(--gold-glow);
  transition: outline 0.2s ease, box-shadow 0.2s ease;
}

/* --- GOLD CHOICE OVERLAY STYLES --- */

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 19, 26, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.overlay-content {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 30px rgba(255, 190, 59, 0.2);
  border-radius: 24px;
  padding: 30px 20px;
  max-width: 520px;
  width: 92%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.overlay-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.overlay-content p {
  color: var(--text-main);
  font-size: 0.92rem;
}

.gold-options-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

@media (max-width: 600px) {
  .gold-options-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .gold-options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

.btn-gold-option {
  padding: 12px 6px;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-gold-option:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.btn-gold-option.wood {
  background: var(--res-wood-bg);
  border-color: var(--res-wood-border);
  color: var(--res-wood-text);
}

.btn-gold-option.brick {
  background: var(--res-brick-bg);
  border-color: var(--res-brick-border);
  color: var(--res-brick-text);
}

.btn-gold-option.sheep {
  background: var(--res-sheep-bg);
  border-color: var(--res-sheep-border);
  color: var(--res-sheep-text);
}

.btn-gold-option.wheat {
  background: var(--res-wheat-bg);
  border-color: var(--res-wheat-border);
  color: var(--res-wheat-text);
}

.btn-gold-option.ore {
  background: var(--res-ore-bg);
  border-color: var(--res-ore-border);
  color: var(--res-ore-text);
}

.progress-bar-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar {
  background: var(--accent-gold);
  height: 100%;
  width: 100%;
}

.progress-bar.animating {
  animation: progressShrink 3s linear forwards;
}

@keyframes progressShrink {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* Selected option in multi-select action choice */
.btn-gold-option.selected {
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
  transform: scale(1.05);
}

/* --- TRADE OVERLAY STYLES (MOBILE FIRST) --- */
.trade-content {
  max-width: 680px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.trade-modal-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 0;
}

.btn-close-modal,
.btn-close-hud,
.btn-hud-close-trade,
.btn-close-inspect,
.btn-close-star-forge,
.btn-close-drawer,
.btn-close-rewards,
.popup-btn-close,
.modal-close-btn,
.close-modal-btn,
.btn-close,
.modal-close,
[class*="btn-close"],
[class*="close-btn"],
[id^="btn-close-"],
[id$="-close-btn"],
[id$="-btn-close"],
#btn-kmkz-close-notifs,
#btn-close-dm,
#btn-close-rules,
#btn-close-settings,
#btn-close-friends,
#btn-close-dev-logs,
#btn-close-bank {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
  padding: 0 !important;
  line-height: 1 !important;
  z-index: 1000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.btn-close-modal:empty::before,
.btn-close-hud:empty::before,
.btn-hud-close-trade:empty::before,
.btn-close-inspect:empty::before,
.btn-close-star-forge:empty::before,
.btn-close-drawer:empty::before,
.btn-close-rewards:empty::before,
.popup-btn-close:empty::before,
.modal-close-btn:empty::before,
.close-modal-btn:empty::before,
.btn-close:empty::before,
.modal-close:empty::before,
[class*="btn-close"]:empty::before,
[class*="close-btn"]:empty::before,
[id^="btn-close-"]:empty::before,
[id$="-close-btn"]:empty::before,
[id$="-btn-close"]:empty::before {
  content: '✕' !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #ef4444 !important;
  line-height: 1 !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}

.btn-close-modal:hover,
.btn-close-hud:hover,
.btn-hud-close-trade:hover,
.btn-close-inspect:hover,
.btn-close-star-forge:hover,
.btn-close-drawer:hover,
.btn-close-rewards:hover,
.popup-btn-close:hover,
.modal-close-btn:hover,
.close-modal-btn:hover,
.btn-close:hover,
.modal-close:hover,
[class*="btn-close"]:hover,
[class*="close-btn"]:hover,
[id^="btn-close-"]:hover,
[id$="-close-btn"]:hover,
[id$="-btn-close"]:hover,
#btn-kmkz-close-notifs:hover,
#btn-close-dm:hover,
#btn-close-rules:hover,
#btn-close-settings:hover,
#btn-close-friends:hover,
#btn-close-dev-logs:hover,
#btn-close-bank:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.05) translateZ(0) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.btn-close-modal:hover:empty::before,
.btn-close-hud:hover:empty::before,
.btn-hud-close-trade:hover:empty::before,
.btn-close-inspect:hover:empty::before,
.btn-close-star-forge:hover:empty::before,
.btn-close-drawer:hover:empty::before,
.btn-close-rewards:hover:empty::before,
.popup-btn-close:hover:empty::before,
.modal-close-btn:hover:empty::before,
.close-modal-btn:hover:empty::before,
.btn-close:hover:empty::before,
.modal-close:hover:empty::before,
[class*="btn-close"]:hover:empty::before,
[class*="close-btn"]:hover:empty::before,
[id^="btn-close-"]:hover:empty::before,
[id$="-close-btn"]:hover:empty::before,
[id$="-btn-close"]:hover:empty::before {
  color: #ffffff !important;
}

.popup-btn-close:active,
.modal-close-btn:active,
.close-modal-btn:active,
.btn-close:active,
.modal-close:active,
[class*="btn-close"]:active,
[class*="close-btn"]:active,
[id^="btn-close-"]:active,
[id$="-close-btn"]:active,
[id$="-btn-close"]:active,
#btn-kmkz-close-notifs:active,
#btn-close-dm:active,
#btn-close-rules:active,
#btn-close-settings:active,
#btn-close-friends:active,
#btn-close-dev-logs:active,
#btn-close-bank:active {
  background: rgba(239, 68, 68, 0.38) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(0.94) translateZ(0) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45) !important;
  transition: transform 0.08s ease, background-color 0.08s ease !important;
}

/* Visual Trade Summary Card */
.trade-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.summary-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.give-box .summary-label {
  color: #f87171;
}

.want-box .summary-label {
  color: #4ade80;
}

.summary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}

.empty-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.summary-badge {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-badge.wood {
  background: var(--res-wood-bg);
  border-color: var(--res-wood-border);
}

.summary-badge.brick {
  background: var(--res-brick-bg);
  border-color: var(--res-brick-border);
}

.summary-badge.sheep {
  background: var(--res-sheep-bg);
  border-color: var(--res-sheep-border);
}

.summary-badge.wheat {
  background: var(--res-wheat-bg);
  border-color: var(--res-wheat-border);
}

.summary-badge.ore {
  background: var(--res-ore-bg);
  border-color: var(--res-ore-border);
}

.summary-arrow {
  font-size: 1.6rem;
  color: var(--accent-gold);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

/* Quick Presets Bar */
.trade-presets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.presets-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-preset:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-preset-clear {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-preset-clear:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

/* Layout for Give and Want sections */
.trade-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
  .trade-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.trade-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-side h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.give-side h3 {
  color: #f87171;
}

.want-side h3 {
  color: #4ade80;
}

.trade-selectors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-res-control {
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

.trade-res-control.wood {
  background: var(--res-wood-bg);
  border-color: var(--res-wood-border);
}

.trade-res-control.brick {
  background: var(--res-brick-bg);
  border-color: var(--res-brick-border);
}

.trade-res-control.sheep {
  background: var(--res-sheep-bg);
  border-color: var(--res-sheep-border);
}

.trade-res-control.wheat {
  background: var(--res-wheat-bg);
  border-color: var(--res-wheat-border);
}

.trade-res-control.ore {
  background: var(--res-ore-bg);
  border-color: var(--res-ore-border);
}

.trade-ctrl-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-trade-dec,
.btn-trade-inc {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: #fff;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-trade-dec:hover,
.btn-trade-inc:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.06);
}

.btn-trade-dec:active,
.btn-trade-inc:active {
  transform: scale(0.92);
}

.res-info-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-emoji-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.res-my-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.res-my-count .my-amt {
  color: var(--accent-gold);
}

.btn-trade-dec:disabled,
.btn-trade-inc:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.05);
}

.trade-amt {
  font-size: 1.15rem;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

.bank-valid-glow {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6) !important;
  animation: pulseCardLimit 1.5s infinite ease-in-out;
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.trade-actions button {
  flex: 1 1 180px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 8px 14px;
  box-sizing: border-box;
}

.dev-cards-hud {
  position: fixed !important;
  top: auto !important;
  bottom: calc(var(--bottom-dock-height, 80px) + 10px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(540px, calc(100vw - 28px)) !important;
  max-width: 540px;
  background: rgba(13, 20, 36, 0.96) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.45) !important;
  border-radius: 20px !important;
  padding: 14px 18px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.25) !important;
  z-index: 2500 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-items: center !important;
  box-sizing: border-box !important;
  transition: opacity 0.2s ease !important;
}

.dev-cards-hud.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -30px);
}

/* --- BUILDINGS HUD --- */
.buildings-hud {
  position: absolute;
  top: 60px;
  right: 60px;
  bottom: auto;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.buildings-hud.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
}

.buildings-list {
  display: flex;
  gap: 15px;
}

.building-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hud-header {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hud-cards-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 4px !important;
}

.hud-dev-card {
  position: relative;
  width: 100px;
  height: 140px;
  border-radius: 14px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}

.hud-dev-card:hover:not(.locked):not(.played) {
  transform: translateY(-12px) scale(1.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(251, 191, 36, 0.2);
  border-color: var(--accent-gold);
}

/* Card Glow Effect */
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.card-emoji {
  font-size: 2rem;
  margin-top: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.card-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  padding: 0 4px;
}

/* Card Themes */
.card-knight {
  background: radial-gradient(circle at center, #1e293b, #0f172a);
  border-color: rgba(99, 102, 241, 0.25);
}

.card-road {
  background: radial-gradient(circle at center, #064e3b, #022c22);
  border-color: rgba(16, 185, 129, 0.25);
}

.card-plenty {
  background: radial-gradient(circle at center, #78350f, #451a03);
  border-color: rgba(245, 158, 11, 0.25);
}

.card-monopoly {
  background: radial-gradient(circle at center, #581c87, #3b0764);
  border-color: rgba(168, 85, 247, 0.25);
}

.card-vp {
  background: radial-gradient(circle at center, #14532d, #052e16);
  border-color: rgba(34, 197, 94, 0.25);
}

/* Played State */
.hud-dev-card.played {
  opacity: 0.4;
  filter: grayscale(80%);
  cursor: default;
  pointer-events: none;
}

.played-badge {
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

/* Locked State */
.hud-dev-card.locked {
  opacity: 0.7;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.card-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  position: absolute;
  bottom: 8px;
}

.locked-badge {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* --- TOAST NOTIFICATIONS SYSTEM --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000000 !important;
  pointer-events: none;
  max-width: 90vw;
}

@media (max-width: 768px) {
  #toast-container {
    top: 14px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 420px;
    align-items: center;
  }
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  transform: translateY(-120%);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 197, 94, 0.25);
  background: rgba(15, 23, 42, 0.95);
}

.toast.warning {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.25);
}

.toast.danger,
.toast.error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.25);
}

.toast.show {
  transform: translateY(0);
}

.toast.hide {
  transform: translateY(-120%);
  opacity: 0;
}

/* --- FLOATING CANCEL ACTION BUTTON --- */
.floating-cancel-action {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  pointer-events: auto;
}

.btn-cancel-mode {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.95));
  color: #ffffff;
  border: 1.5px solid #fca5a5;
  padding: 10px 22px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5), 0 0 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cancel-mode:active {
  transform: scale(0.95);
}

.bank-resources-hud {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 16, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid var(--accent-gold);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(251, 191, 36, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 320px;
  max-width: 90vw;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.bank-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.bank-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.btn-close-hud {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a0aec0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-close-hud:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.55);
  transform: scale(1.05);
}

.bank-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
}

.bank-res-grid .res-card-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bank-res-grid .res-card-hud:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.bank-res-grid .res-card-hud.wood {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.9));
}

.bank-res-grid .res-card-hud.brick {
  border-color: rgba(234, 88, 12, 0.5);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.2), rgba(15, 23, 42, 0.9));
}

.bank-res-grid .res-card-hud.sheep {
  border-color: rgba(132, 204, 22, 0.5);
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.2), rgba(15, 23, 42, 0.9));
}

.bank-res-grid .res-card-hud.wheat {
  border-color: rgba(234, 179, 8, 0.5);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(15, 23, 42, 0.9));
}

.bank-res-grid .res-card-hud.ore {
  border-color: rgba(203, 213, 225, 0.5);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(15, 23, 42, 0.95));
}

.bank-res-grid .res-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.bank-res-grid .res-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 10px;
  border-radius: 8px;
}



.player-card-compact {
  flex: 1 1 0px;
  min-width: 175px;
  max-width: 250px;
  border-radius: 14px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Color theme borders & subtle background tint (Color visible ONLY on border and subtle background tint) */
.player-card-compact.red {
  border: 1.5px solid rgba(239, 68, 68, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(239, 68, 68, 0.14) 100%);
}

.player-card-compact.red.active-turn {
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6), inset 0 0 8px rgba(239, 68, 68, 0.2) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(239, 68, 68, 0.24) 100%) !important;
}

.player-card-compact.blue {
  border: 1.5px solid rgba(59, 130, 246, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(59, 130, 246, 0.14) 100%);
}

.player-card-compact.blue.active-turn {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.6), inset 0 0 8px rgba(59, 130, 246, 0.2) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(59, 130, 246, 0.24) 100%) !important;
}

.player-card-compact.green {
  border: 1.5px solid rgba(34, 197, 94, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(34, 197, 94, 0.14) 100%);
}

.player-card-compact.green.active-turn {
  border-color: #22c55e !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6), inset 0 0 8px rgba(34, 197, 94, 0.2) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(34, 197, 94, 0.24) 100%) !important;
}

.player-card-compact.orange {
  border: 1.5px solid rgba(249, 115, 22, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(249, 115, 22, 0.14) 100%);
}

.player-card-compact.orange.active-turn {
  border-color: #f97316 !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.6), inset 0 0 8px rgba(249, 115, 22, 0.2) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(249, 115, 22, 0.24) 100%) !important;
}

.player-card-compact.yellow,
.player-card-compact.white {
  border: 1.5px solid rgba(234, 179, 8, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(234, 179, 8, 0.14) 100%);
}

.player-card-compact.yellow.active-turn,
.player-card-compact.white.active-turn {
  border-color: #eab308 !important;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.6), inset 0 0 8px rgba(234, 179, 8, 0.2) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(234, 179, 8, 0.24) 100%) !important;
}

/* Row 1: Header Identity & Timer */
.player-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.player-card-identity {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.player-color-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.player-color-dot.blue {
  background-color: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.player-color-dot.red {
  background-color: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.player-color-dot.orange {
  background-color: #f97316;
  box-shadow: 0 0 6px #f97316;
}

.player-color-dot.white,
.player-color-dot.yellow {
  background-color: #eab308;
  box-shadow: 0 0 6px #eab308;
}

.player-color-dot.green {
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.player-user-tag {
  font-size: 0.82rem;
  line-height: 1;
  flex-shrink: 0;
}

.player-card-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.player-timer-pill {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: monospace;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 6px;
  border-radius: 12px;
  flex-shrink: 0;
}

.player-timer-pill.my-turn {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.4);
}

/* Row 2: Main Stats Badges */
.player-card-stats-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  flex-wrap: nowrap;
}

.player-vp-badge {
  font-size: 0.76rem;
  font-weight: 900;
  color: #fde047;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(180, 83, 9, 0.22));
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.cards-count-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.res-over-limit-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(239, 68, 68, 0.35);
  border: 1px solid rgba(239, 68, 68, 0.6);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  animation: overLimitPulse 1.5s infinite ease-in-out;
}

@keyframes overLimitPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

.special-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.special-card-badge.road-badge {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fef3c7;
  border: 1px solid #f59e0b;
}

.special-card-badge.army-badge {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fee2e2;
  border: 1px solid #ef4444;
}

/* Row 3: Pieces Strip */
.player-card-pieces-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.piece-item {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.piece-item b {
  color: #ffffff;
  font-weight: 800;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.06);
    filter: brightness(1.25);
  }
}

.dev-card-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  margin: 8px 0 4px 0;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.dev-card-section-title.played-section {
  color: #94a3b8;
  border-bottom-color: rgba(148, 163, 184, 0.2);
  margin-top: 12px;
}

.turn-status-banner {
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.turn-status-banner.my-turn-banner {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.turn-timer-mono {
  font-family: monospace;
  font-weight: 800;
}

.timer-progress-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(15, 23, 42, 0.8);
  z-index: 1000;
  pointer-events: none;
}

.timer-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-teal), #60a5fa);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
  transition: width 1s linear, background 0.3s ease;
}

/* Prominent Setup Action Banner â€” Positioned neatly below players top bar */
.setup-action-banner {
  position: relative;
  margin: 4px auto 0 auto;
  width: fit-content;
  max-width: 90vw;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(96, 165, 250, 0.6);
  border-radius: 24px;
  padding: 5px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(59, 130, 246, 0.3);
  z-index: 65;
  animation: bannerGlowPulse 2s infinite ease-in-out;
  pointer-events: auto !important;
  white-space: nowrap;
}

@keyframes bannerGlowPulse {

  0%,
  100% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 12px rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(96, 165, 250, 0.6);
  }
}

.setup-banner-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.setup-banner-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.setup-banner-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: #93c5fd;
}

/* Floating 3D Dice HUD */
.floating-dice-hud {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: linear-gradient(160deg, rgba(20, 30, 48, 0.95), rgba(10, 16, 28, 0.98));
  padding: 4px 10px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 55;
  cursor: pointer;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Glowing/shining state when it's your turn to roll */
.floating-dice-hud:not(.disabled) {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: diceGlowPulse 2s infinite ease-in-out;
}

@keyframes diceGlowPulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(251, 191, 36, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(251, 191, 36, 1);
  }
}

.floating-dice-hud:hover:not(.disabled) {
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-dice-hud.disabled {
  opacity: 0.78;
  pointer-events: none;
  filter: none;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Individual 3D Die Cube Styles */
.floating-dice-hud .die {
  --cube-sz: 34px;
  --cube-half: 17px;
  width: var(--cube-sz);
  height: var(--cube-sz);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 600px;
  transform-style: preserve-3d;
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ensure 3D dice container NEVER has flat 2D backgrounds, borders, or box shadows leaking through */
#floating-dice .die.has-cube-3d,
#floating-dice[class*="skin-"] .die.has-cube-3d,
.floating-dice-hud .die.has-cube-3d,
.floating-dice-hud[class*="skin-"] .die.has-cube-3d,
.die.has-cube-3d,
.die.has-cube-3d[class*="skin-"] {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  width: var(--cube-sz, 34px) !important;
  height: var(--cube-sz, 34px) !important;
}

/* Base Shadow underneath each 3D Die */
.die-shadow-3d {
  position: absolute;
  width: 26px;
  height: 6px;
  left: 4px;
  bottom: -3px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0) 75%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1.5px);
  transform: scale(1);
  opacity: 0.85;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 1;
}

/* Physical 3D Cube Container */
.die-cube {
  width: var(--cube-sz, 34px);
  height: var(--cube-sz, 34px);
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  z-index: 2;
}

/* Subtle Interactive Lift on Hover when Active (keeps cube faces orthogonal and crisp) */
.floating-dice-hud:not(.disabled):hover #die-1,
.floating-dice-hud:not(.disabled):hover #die-2 {
  transform: translateY(-2px) scale(1.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-dice-hud:not(.disabled):hover .die-shadow-3d {
  transform: scale(0.9);
  opacity: 0.6;
}

/* Subtle Idle Floating Breath when Ready to Roll */
.floating-dice-hud:not(.disabled):not(.rolling-anim) #die-1 {
  animation: diceIdleFloatDie1 2.2s ease-in-out infinite;
}
.floating-dice-hud:not(.disabled):not(.rolling-anim) #die-2 {
  animation: diceIdleFloatDie2 2.2s ease-in-out infinite 0.16s;
}

@keyframes diceIdleFloatDie1 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes diceIdleFloatDie2 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Internal Ambient Occlusion Core to prevent hollow seams on beveled edges */
.die-cube-core {
  position: absolute;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  left: 2px;
  top: 2px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  transform: translateZ(0px);
  pointer-events: none;
}

/* Authentic 6 Faces of the 3D Cube */
.die-face {
  position: absolute;
  width: var(--cube-sz, 34px);
  height: var(--cube-sz, 34px);
  left: 0;
  top: 0;
  border-radius: 7px;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  padding: 12% !important;
  place-items: center !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2), inset 0 1px 1.5px rgba(255, 255, 255, 0.65), 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  user-select: none;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%);
  color: #0f172a;
}

/* Spatial 3D Orientation of the 6 Faces (Opposites sum to 7: 1-6, 2-5, 3-4) */
.die-face-1 { transform: rotateY(0deg) translateZ(var(--cube-half, 17px)); }
.die-face-6 { transform: rotateY(180deg) translateZ(var(--cube-half, 17px)); }
.die-face-3 { transform: rotateY(90deg) translateZ(var(--cube-half, 17px)); }
.die-face-4 { transform: rotateY(-90deg) translateZ(var(--cube-half, 17px)); }
.die-face-5 { transform: rotateX(90deg) translateZ(var(--cube-half, 17px)); }
.die-face-2 { transform: rotateX(-90deg) translateZ(var(--cube-half, 17px)); }

/* ==========================================================================
   KMKZ ULTRA-FLUID 3D DICE ROLL PHYSICS & ANIMATION
   ========================================================================== */

.floating-dice-hud {
  perspective: 700px;
  transform-style: preserve-3d;
}

.floating-dice-hud.rolling-anim {
  animation: kmkzDiceContainerThrust 0.65s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none !important;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  border-color: #fbbf24 !important;
}

@keyframes kmkzDiceContainerThrust {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-7px) scale(1.06); }
  60% { transform: translateY(-3px) scale(1.03); }
  85% { transform: translateY(2px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

/* Shadow pulsation & height dynamics while rolling */
.floating-dice-hud .die.is-rolling-3d .die-shadow-3d {
  animation: kmkzDiceShadowPulse 0.44s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes kmkzDiceShadowPulse {
  0% { transform: scale(1); opacity: 0.85; filter: blur(1.5px); }
  50% { transform: scale(0.58) translateY(2px); opacity: 0.3; filter: blur(3px); }
  100% { transform: scale(0.92); opacity: 0.8; filter: blur(1.5px); }
}

/* Die 1: High-energy 3D physical continuous tumble across X, Y, Z */
.die-cube.tumble-3d-die1,
.die.tumble-die-1 {
  animation: kmkzDiceTumbleDie1 0.44s infinite linear !important;
}

@keyframes kmkzDiceTumbleDie1 {
  0% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  25% {
    transform: translateY(-16px) rotateX(190deg) rotateY(170deg) rotateZ(-20deg) scale(1.08);
  }
  50% {
    transform: translateY(-3px) rotateX(380deg) rotateY(350deg) rotateZ(15deg) scale(1.02);
  }
  75% {
    transform: translateY(-13px) rotateX(560deg) rotateY(530deg) rotateZ(-10deg) scale(1.06);
  }
  100% {
    transform: translateY(0) rotateX(720deg) rotateY(720deg) rotateZ(0deg) scale(1);
  }
}

/* Die 2: Divergent counter-rotational tumble path */
.die-cube.tumble-3d-die2,
.die.tumble-die-2 {
  animation: kmkzDiceTumbleDie2 0.48s infinite linear !important;
}

@keyframes kmkzDiceTumbleDie2 {
  0% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  25% {
    transform: translateY(-18px) rotateX(-190deg) rotateY(-200deg) rotateZ(25deg) scale(1.1);
  }
  50% {
    transform: translateY(-4px) rotateX(-370deg) rotateY(-390deg) rotateZ(-15deg) scale(1.03);
  }
  75% {
    transform: translateY(-15px) rotateX(-550deg) rotateY(-570deg) rotateZ(20deg) scale(1.07);
  }
  100% {
    transform: translateY(0) rotateX(-720deg) rotateY(-720deg) rotateZ(0deg) scale(1);
  }
}

/* Settle Bounce: Physical elastic impact when dice hit the surface */
.die.dice-settle-bounce,
.order-3d-die.dice-settle-bounce {
  animation: kmkzDiceSettleBounce 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes kmkzDiceSettleBounce {
  0% {
    transform: scale(1.18) translateY(-4px) rotate(-4deg);
    filter: brightness(1.2);
  }
  35% {
    transform: scale(0.94) translateY(2px) rotate(3deg);
    filter: brightness(1.08);
  }
  65% {
    transform: scale(1.04) translateY(-1px) rotate(-1deg);
  }
  85% {
    transform: scale(0.98) translateY(0) rotate(1deg);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
    filter: brightness(1);
  }
}

/* Gold landing flash effect on the capsule */
.floating-dice-hud.dice-landing-impact {
  animation: kmkzDiceImpactGlow 0.5s ease-out;
}

@keyframes kmkzDiceImpactGlow {
  0% {
    box-shadow: 0 0 32px rgba(251, 191, 36, 0.95), inset 0 0 15px rgba(251, 191, 36, 0.6);
  }
  100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Smooth fade-out for initial turn order overlay */
.dice-roll-order-overlay.order-modal-fade-out {
  opacity: 0 !important;
  transform: scale(0.96) !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
  pointer-events: none !important;
}

/* Floating Dice Pips & Pip Dots - Precision 3x3 Grid Layout */
.floating-dice-hud .die .die-inner {
  width: 100%;
  height: 100%;
  position: relative;
  box-sizing: border-box;
}

.floating-dice-hud .die .die-inner.die-pips-face,
#floating-dice .die .die-inner.die-pips-face {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  padding: 13% !important;
  box-sizing: border-box !important;
  place-items: center !important;
}

.floating-dice-hud .die .die-val-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.floating-dice-hud .die .die-pip,
#floating-dice .die .die-pip,
.die .die-pip {
  position: static !important;
  width: clamp(5.5px, 20%, 9.5px) !important;
  height: clamp(5.5px, 20%, 9.5px) !important;
  max-width: 85% !important;
  max-height: 85% !important;
  background: currentColor !important;
  border-radius: 50% !important;
  box-shadow: inset 0 1px 1.5px rgba(0, 0, 0, 0.6), 0 0.5px 0.8px rgba(255, 255, 255, 0.45) !important;
  pointer-events: none !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: auto !important;
}

.die-face .die-pip.pip-top-left,
.order-3d-die .die-pip.pip-top-left,
.floating-dice-hud .die .die-pip.pip-top-left,
#floating-dice .die .die-pip.pip-top-left,
.die .die-pip.pip-top-left {
  grid-area: 1 / 1 !important;
}

.die-face .die-pip.pip-top-right,
.order-3d-die .die-pip.pip-top-right,
.floating-dice-hud .die .die-pip.pip-top-right,
#floating-dice .die .die-pip.pip-top-right,
.die .die-pip.pip-top-right {
  grid-area: 1 / 3 !important;
}

.die-face .die-pip.pip-mid-left,
.order-3d-die .die-pip.pip-mid-left,
.floating-dice-hud .die .die-pip.pip-mid-left,
#floating-dice .die .die-pip.pip-mid-left,
.die .die-pip.pip-mid-left {
  grid-area: 2 / 1 !important;
}

.die-face .die-pip.pip-center,
.order-3d-die .die-pip.pip-center,
.floating-dice-hud .die .die-pip.pip-center,
#floating-dice .die .die-pip.pip-center,
.die .die-pip.pip-center {
  grid-area: 2 / 2 !important;
}

.die-face .die-pip.pip-mid-right,
.order-3d-die .die-pip.pip-mid-right,
.floating-dice-hud .die .die-pip.pip-mid-right,
#floating-dice .die .die-pip.pip-mid-right,
.die .die-pip.pip-mid-right {
  grid-area: 2 / 3 !important;
}

.die-face .die-pip.pip-bottom-left,
.order-3d-die .die-pip.pip-bottom-left,
.floating-dice-hud .die .die-pip.pip-bottom-left,
#floating-dice .die .die-pip.pip-bottom-left,
.die .die-pip.pip-bottom-left {
  grid-area: 3 / 1 !important;
}

.die-face .die-pip.pip-bottom-right,
.order-3d-die .die-pip.pip-bottom-right,
.floating-dice-hud .die .die-pip.pip-bottom-right,
#floating-dice .die .die-pip.pip-bottom-right,
.die .die-pip.pip-bottom-right {
  grid-area: 3 / 3 !important;
}

/* Face 1: Prominent center ace pip */
.floating-dice-hud .die[data-val="1"] .die-pip.pip-center,
#floating-dice .die[data-val="1"] .die-pip.pip-center,
.die[data-val="1"] .die-pip.pip-center {
  width: clamp(7.5px, 28%, 13px) !important;
  height: clamp(7.5px, 28%, 13px) !important;
}

/* Default skin pips: Ivory white with dark charcoal pips (red center only for face 1) */
#floating-dice.skin-dice_default .die .die-pip,
#floating-dice.skin-default .die .die-pip,
.floating-dice-hud.skin-dice_default .die .die-pip,
.floating-dice-hud.skin-default .die .die-pip,
.die.skin-dice_default .die-pip,
.die.skin-default .die-pip {
  background: #111827 !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.55), 0 0.5px 0.5px rgba(255, 255, 255, 0.5) !important;
}

#floating-dice.skin-dice_default .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-default .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_default .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-default .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_default[data-val="1"] .die-pip.pip-center,
.die.skin-default[data-val="1"] .die-pip.pip-center {
  background: #dc2626 !important;
  box-shadow: inset 0 1px 1px rgba(185, 28, 28, 0.6), 0 0.5px 0.5px rgba(255, 255, 255, 0.5) !important;
}

/* Top HUD Bar with Black-to-Transparent Top-to-Bottom Gradient */
.game-hud-top {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: auto !important;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: none !important;
  z-index: 100;
  box-shadow: none !important;
  gap: 10px;
  box-sizing: border-box;
}

.hud-top-left,
.hud-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ⬡ Hexagonal HUD Icon Buttons */
.btn-hud-icon,
.btn-nav-social {
  width: 48px;
  height: 48px;
  min-width: 48px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  background: #0f172a !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  flex-shrink: 0;
  box-shadow: none !important;
}

.btn-hud-icon:hover,
.btn-hud-icon:active,
.btn-nav-social:hover {
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  color: #0f172a !important;
  border: none !important;
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.6));
}

/* (Old duplicate top-bank-bar styling removed) */



.phase-badge {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Timer progress bar */
.timer-progress-container {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 195;
  pointer-events: none;
}

.timer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 1s linear;
}



.player-card-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  height: 32px;
}

.player-card-compact.active-turn {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.cards-count-badge,
.res-over-limit-badge {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.turn-status-banner {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  margin-left: 4px;
}

/* Long-press Feedback pulse for Fast Trade */
.res-card-hud.holding-press {
  animation: cardPressPulse 0.4s infinite alternate ease-in-out !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7) !important;
}

@keyframes cardPressPulse {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.08);
  }
}

/* Container for right-side panels to prevent overlapping */
.right-panels-container {
  position: absolute;
  top: 104px;
  right: 14px;
  width: 320px;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  z-index: 300;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* Main Board Area Wrapper */
.game-layout {
  position: relative;
  width: 100%;
  flex-grow: 1;
  overflow: hidden;
}

.board-area {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* =========================================
   FLOATING ROBBER PLACEMENT HUD NOTICE
   ========================================= */
.robber-notice-hud {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: rgba(26, 15, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.25);
  pointer-events: none;
  animation: robberNoticePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.robber-notice-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulseDot 1.2s infinite ease-in-out;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.5;
  }
}

.robber-notice-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.robber-notice-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.robber-notice-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

@keyframes robberNoticePop {
  0% {
    transform: translate(-50%, -15px) scale(0.9);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Custom scrollbar for right-panels-container */
.right-panels-container::-webkit-scrollbar {
  width: 4px;
}

.right-panels-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Ensure individual HUDs style correctly when inside the container */
.right-panels-container .logs-hud,
.right-panels-container .buildings-hud,
.right-panels-container .dev-cards-hud {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-height: none !important;
  pointer-events: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.right-panels-container .logs-hud.hidden,
.right-panels-container .buildings-hud.hidden,
.right-panels-container .dev-cards-hud.hidden,
.my-resources-hud.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.bank-label {
  color: #fbbf24;
  /* amber-400 */
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-right: 4px;
}

.bank-res {
  padding: 3px 6px;
  border-radius: 10px;
  min-width: 45px;
}

.hud-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0 4px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.my-resources-hud:hover .hud-drag-handle {
  opacity: 1;
  color: var(--accent-gold);
}

.my-resources-hud {
  position: absolute;
  bottom: 20px;
  left: 20px;
  top: auto;
  transform: none;
  background: rgba(10, 18, 32, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  z-index: 80;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: bottom 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.my-resources-hud.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 190, 59, 0.4) !important;
  z-index: 9999 !important;
}

.my-resources-hud.user-dragged {
  bottom: auto !important;
  right: auto !important;
  transform: none !important;
  transition: opacity 0.3s ease !important;
}

/* =========================================
   BOTTOM ACTION BAR â€” Floating toolbar
   ========================================= */
.action-bar-bottom {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: calc(50% - 30px);
  min-height: 72px;
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  z-index: 50;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Right actions group: Tirar Dados + Pasar Turno inline */
.action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.action-bar-right .btn-primary,
.action-bar-right .btn-secondary {
  height: 42px;
  /* Matching the dice height */
  padding: 0 16px;
  font-size: 0.88rem;
  white-space: nowrap;
  border-radius: 12px;
}

/* Glowing/shining state for Pass Turn button when active */
#btn-end-turn:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  /* Vibrant Emerald Green */
  color: #ffffff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: passGlowPulse 1.8s infinite ease-in-out;
  cursor: pointer;
  font-weight: 700;
}

#btn-end-turn:not(:disabled):hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
  transform: translateY(-1px);
}

@keyframes passGlowPulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  }

  50% {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.65);
  }
}

/* --- PASS TURN INACTIVITY REMINDER (7s+ Idle on Turn) --- */
.pass-btn-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pass-turn-reminder-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  transform: none;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #fbbf24;
  border-radius: 20px;
  padding: 4px 10px;
  color: #fde68a;
  font-weight: 800;
  font-size: 0.74rem;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(251, 191, 36, 0.35);
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: passReminderFloat 2s infinite ease-in-out;
  max-width: min(180px, calc(100vw - 20px));
}

.pass-turn-reminder-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 22px;
  left: auto;
  transform: none;
  border-width: 5px;
  border-style: solid;
  border-color: #fbbf24 transparent transparent transparent;
}

.pass-turn-reminder-bubble.hidden {
  display: none !important;
  opacity: 0 !important;
}

@keyframes passReminderFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

#btn-end-turn.remind-pass-pulse:not(:disabled) {
  animation: passReminderAttention 1.2s infinite ease-in-out !important;
  border-color: #fbbf24 !important;
}

@keyframes passReminderAttention {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.8), 0 0 15px rgba(16, 185, 129, 0.5);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(251, 191, 36, 0), 0 0 24px rgba(251, 191, 36, 0.7);
    transform: scale(1.08);
  }
}

/* Vertical separator */
.action-bar-sep {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  margin: 0 4px;
}

/* Build buttons group */
.action-bar-builds {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex: 1;
}

.action-bar-builds .btn-action {
  height: 44px;
  padding: 0 12px;
  font-size: 0.82rem;
  flex-shrink: 0;
  border-radius: 10px;
  white-space: nowrap;
}


/* Each resource tactile playing card in the HUD */
.res-card-hud {
  position: relative;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 64px;
  height: 86px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation !important;
}

/* Card Top Gloss Overlay */
.res-card-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 13px 13px 0 0;
  pointer-events: none;
}

.res-card-hud:hover {
  transform: translateY(-6px) scale(1.08);
  z-index: 10;
}

/* Zero vs Has-Cards State */
.res-card-hud.is-zero {
  opacity: 0.55;
  filter: grayscale(0.35);
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.res-card-hud.has-cards {
  opacity: 1;
  filter: none;
  transform: scale(1);
}

/* Color themes per resource */
.res-card-hud.wood {
  background: linear-gradient(160deg, #15803d 0%, #166534 50%, #052e16 100%);
  border-color: rgba(74, 222, 128, 0.35);
}

.res-card-hud.wood.has-cards {
  border-color: #22c55e;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-card-hud.brick {
  background: linear-gradient(160deg, #c2410c 0%, #9a3412 50%, #431407 100%);
  border-color: rgba(251, 146, 60, 0.35);
}

.res-card-hud.brick.has-cards {
  border-color: #f97316;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-card-hud.sheep {
  background: linear-gradient(160deg, #65a30d 0%, #4d7c0f 50%, #1a2e05 100%);
  border-color: rgba(163, 230, 53, 0.35);
}

.res-card-hud.sheep.has-cards {
  border-color: #84cc16;
  box-shadow: 0 6px 20px rgba(132, 204, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-card-hud.wheat {
  background: linear-gradient(160deg, #d97706 0%, #b45309 50%, #451a03 100%);
  border-color: rgba(251, 191, 36, 0.35);
}

.res-card-hud.wheat.has-cards {
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-card-hud.ore {
  background: linear-gradient(160deg, #475569 0%, #334155 50%, #0f172a 100%);
  border-color: rgba(203, 213, 225, 0.35);
}

.res-card-hud.ore.has-cards {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(148, 163, 184, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-card-hud.total {
  background: linear-gradient(160deg, #334155 0%, #1e293b 50%, #0f172a 100%);
  border-color: rgba(148, 163, 184, 0.35);
  margin-left: 4px;
}

.res-card-hud.total.has-cards {
  border-color: #94a3b8;
  box-shadow: 0 6px 20px rgba(148, 163, 184, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.res-emoji {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease;
}

.res-card-hud:hover .res-emoji {
  transform: scale(1.15) rotate(-3deg);
}

.res-hud-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.res-count-badge {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.res-count {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
}

.res-count.pop {
  transform: scale(1.6);
  color: var(--accent-gold);
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.9);
}

/* TOTAL CARD HUD & OVER-LIMIT RED ALERT */
.res-card-hud.total.exceeded-limit {
  background: linear-gradient(160deg, #991b1b 0%, #7f1d1d 50%, #450a0a 100%) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  animation: pulseCardLimit 0.9s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.res-count.exceeded-limit {
  color: #fef08a !important;
  text-shadow: 0 0 12px rgba(239, 68, 68, 1) !important;
  font-weight: 900 !important;
}

@keyframes pulseCardLimit {
  0% {
    transform: scale(1);
    border-color: #ef4444;
  }

  100% {
    transform: scale(1.08);
    border-color: #f87171;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.95), inset 0 0 10px rgba(248, 113, 113, 0.5);
  }
}

.res-over-limit {
  color: #ef4444 !important;
  font-weight: 800 !important;
  background: rgba(239, 68, 68, 0.22);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  font-size: 0.75rem;
  animation: pulseOverLimitText 1.2s infinite alternate;
}

@keyframes pulseOverLimitText {
  0% {
    opacity: 0.85;
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.8));
  }
}

/* =========================================
   RESPONSIVE â€” Scale UP from mobile base
   ========================================= */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .logo {
    font-size: 1.8rem;
  }

  .lobby-main {
    padding: 24px 5%;
    gap: 22px;
  }

  .lobby-hero-card {
    padding: 40px 32px 36px;
  }

  .lobby-hero-card h2 {
    font-size: 2rem;
  }

  .lobby-hero-card p {
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.76rem;
    padding: 4px 14px;
  }

  .btn-hero {
    padding: 16px 40px;
    font-size: 1.1rem;
  }

  .lobby-rooms-card {
    padding: 30px 28px;
  }

  .lobby-rooms-card h2 {
    font-size: 1.45rem;
  }

  .lobby-secondary {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .card {
    padding: 32px 28px;
    border-radius: 22px;
    gap: 18px;
  }

  .card h2 {
    font-size: 1.6rem;
  }

  .room-lobby-main {
    padding: 24px 30px;
  }

  .room-code-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
  }

  .room-code-title {
    font-size: 1.4rem;
  }

  .room-share-actions {
    width: auto;
  }

  .room-share-actions button {
    flex: none;
  }

  .room-lobby-layout {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .players-lobby-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .lobby-main {
    padding: 30px 8%;
    gap: 28px;
  }

  .lobby-hero-card {
    padding: 48px 40px;
  }

  .lobby-hero-card h2 {
    font-size: 2.4rem;
  }

  .lobby-hero-card p {
    font-size: 1.05rem;
  }

  .btn-hero {
    padding: 18px 48px;
    font-size: 1.2rem;
  }

  .lobby-rooms-card {
    padding: 36px 40px;
  }

  .lobby-rooms-card h2 {
    font-size: 1.6rem;
  }

  .lobby-secondary {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .card {
    padding: 36px;
    border-radius: 24px;
    gap: 20px;
  }

  .card h2 {
    font-size: 1.8rem;
  }

  .room-lobby-main {
    padding: 30px 40px;
  }

  .room-lobby-layout {
    gap: 32px;
  }

  .room-code-header {
    padding: 16px 24px;
    border-radius: 16px;
  }

  .room-code-title {
    font-size: 1.5rem;
  }
}

/* =========================================
   GAME SCREEN â€” Responsive (max-width)
   ========================================= */
@media (max-width: 1024px) {

  /* Panels become smaller on tablet */
  .game-sidebar {
    width: 145px;
    padding: 8px;
    gap: 6px;
  }

  .controls-sidebar {
    width: 200px;
    padding: 10px;
    gap: 8px;
  }

  .game-sidebar.collapsed {
    transform: translateX(calc(-145px - 20px));
  }

  .controls-sidebar.collapsed {
    transform: translateX(calc(200px + 20px));
  }

  .my-resources-hud {
    bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 6px 8px;
  }

  #dev-cards-hud:not(.hidden)~.my-resources-hud {
    bottom: 120px;
  }
}

@media (max-width: 768px) {

  /* Toggles: Grouped cleanly at top edges */
  #toggle-players {
    top: 60px;
    left: 10px;
  }

  #toggle-dev-cards {
    top: 60px;
    right: 10px;
  }

  #toggle-buildings {
    top: 104px;
    right: 10px;
  }

  #toggle-logs {
    top: 148px;
    right: 10px;
  }

  #toggle-bank {
    top: 192px;
    right: 10px;
    left: auto !important;
  }

  /* Sidebars and HUDs: Compact floating modals next to toggles */
  .game-sidebar {
    width: 180px;
    max-width: calc(100vw - 70px);
    max-height: 260px;
    top: 60px;
    bottom: auto;
  }

  .dev-cards-hud:not(.right-panels-container *),
  .buildings-hud:not(.right-panels-container *),
  .logs-hud:not(.right-panels-container *) {
    width: 270px;
    max-width: calc(100vw - 70px);
    max-height: 260px;
    top: 60px;
    bottom: auto;
  }

  /* Right Panels Container on Mobile */
  .right-panels-container {
    width: 270px !important;
    max-width: calc(100vw - 70px) !important;
    right: 50px !important;
    top: 60px !important;
    bottom: auto !important;
    max-height: 380px !important;
    padding-right: 0 !important;
  }

  .right-panels-container .logs-hud,
  .right-panels-container .buildings-hud,
  .right-panels-container .dev-cards-hud {
    max-height: 320px !important;
    overflow-y: hidden !important;
  }

  .bank-resources-hud {
    width: auto;
    max-width: calc(100vw - 20px);
    max-height: 100px;
    top: 10px !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    justify-content: center;
    z-index: 900;
    padding: 4px 8px !important;
    gap: 6px !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease !important;
  }

  .bank-resources-hud .res-card-hud {
    min-width: unset !important;
    padding: 4px 8px !important;
  }

  .bank-resources-hud .bank-label {
    font-size: 0.75rem !important;
  }

  .game-sidebar {
    left: 50px;
  }

  .players-top-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .player-card-compact {
    flex: 1 1 0px !important;
    min-width: 0 !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
  }

  .setup-action-banner {
    padding: 6px 14px;
    margin-top: 4px;
  }

  .setup-banner-text {
    font-size: 0.8rem;
  }

  .setup-banner-sub {
    font-size: 0.72rem;
  }

  .dev-cards-hud:not(.right-panels-container *),
  .buildings-hud:not(.right-panels-container *),
  .logs-hud:not(.right-panels-container *) {
    right: 50px;
  }

  .game-sidebar h3 {
    display: none;
  }

  .game-sidebar.collapsed {
    transform: translateY(-200%);
    opacity: 0;
  }

  /* Bottom Actions: Unified Thumb Dock */
  .action-bar-bottom {
    overflow: visible !important;
    max-height: none !important;
  }

  .action-bar-middle {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .action-bar-middle button {
    flex: 1;
    height: 44px;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
  }

  .action-bar-right {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .action-bar-right button,
  .action-bar-right .floating-dice-hud {
    flex: 1;
    height: 44px;
    box-sizing: border-box;
  }

  .action-bar-builds {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 5px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .action-bar-sep {
    display: none;
  }

  /* My Resources: Anchored just above the action bar for constant visibility */
  .my-resources-hud {
    top: auto;
    bottom: 126px;
    /* Sits right on top of action-bar (action-bar ends at ~116px) */
    left: 10px;
    width: calc(100% - 20px);
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 5px;
    padding: 8px;
    border-radius: 16px;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease !important;
  }

  body.build-menu-open .my-resources-hud {
    bottom: 345px !important;
    /* Shift up to sit on top of build menu */
  }

  .res-card-hud {
    min-width: unset;
    height: 68px;
    padding: 4px 2px;
    flex: 1;
    align-items: center;
  }

  .res-hud-label {
    font-size: 0.7rem;
    letter-spacing: 0.2px;
    line-height: 1;
  }

  .res-emoji {
    font-size: 1.15rem;
  }

  .res-count-badge {
    padding: 1px 4px;
    min-width: 22px;
    border-radius: 8px;
  }

  .res-count {
    font-size: 0.9rem;
  }

  /* App Headers: already mobile-first, minor tweaks */
  .logo {
    font-size: 1.3rem !important;
  }

  .user-stats-bar {
    gap: 5px !important;
  }

  .stat-badge {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 12px !important;
  }

  #btn-leave-room {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  /* Build Menu Popup on mobile */
  .build-menu-popup {
    width: 280px;
    max-width: calc(100vw - 20px);
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.6);
    padding: 8px;
    gap: 6px;
    border-radius: 12px;
    z-index: 950;
  }

  .build-menu-popup .btn-action {
    height: 38px;
    font-size: 0.8rem;
    padding: 0 10px;
  }

  /* Trade overlay mobile adjustments */
  .trade-content {
    padding: 16px !important;
    max-width: 340px !important;
  }

  .trade-layout {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px !important;
  }

  .trade-side {
    width: 100% !important;
    gap: 8px !important;
  }

  .trade-side h3 {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
    text-align: center !important;
  }

  .trade-selectors {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .trade-res-control {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px 8px !important;
    min-height: 38px !important;
    font-size: 0.9rem !important;
  }

  .btn-trade-dec,
  .btn-trade-inc {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
  }

  .trade-center {
    font-size: 1.8rem !important;
    margin: 4px 0 !important;
    transform: rotate(90deg) !important;
    /* Rotate arrows for vertical layout */
  }

  /* Removed conflicting .game-hud-top here */

  .game-hud-top .btn-danger {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
  }



  .game-hud-top .phase-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }

  /* Right Panels Container: ensure 3 panels fit and don't overflow */
  .right-panels-container {
    width: 280px !important;
    max-width: calc(100vw - 20px) !important;
    right: 10px !important;
    /* align near toggles */
    top: 60px !important;
    bottom: auto !important;
    max-height: calc(100vh - 200px) !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
    z-index: 990 !important;
  }

  .right-panels-container .logs-hud,
  .right-panels-container .buildings-hud,
  .right-panels-container .dev-cards-hud {
    max-height: 340px !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    border-width: 1px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .right-panels-container .buildings-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  .right-panels-container .building-item {
    font-size: 0.9rem !important;
    padding: 4px 8px !important;
    gap: 4px !important;
  }

  .right-panels-container .hud-cards-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    padding: 6px 2px !important;
  }

  .right-panels-container .hud-dev-card {
    flex-shrink: 0 !important;
    min-width: 85px !important;
    width: 85px !important;
    scroll-snap-align: start !important;
    height: 115px !important;
    padding: 6px 4px !important;
    gap: 2px !important;
    font-size: 0.7rem !important;
    border-radius: 10px !important;
  }

  .right-panels-container .hud-dev-card .card-emoji {
    font-size: 1.2rem !important;
  }

  .right-panels-container .hud-dev-card .card-title {
    font-size: 0.75rem !important;
    font-weight: bold !important;
  }

  .right-panels-container .hud-dev-card .card-desc {
    display: none !important;
    /* Hide description on mobile to save space */
  }

  .right-panels-container .hud-dev-card .played-badge {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }
}

/* ==========================================================================
   MODERN UI REDESIGN â€” Top Header, Player Cards Bar & Touch Controls
   ========================================================================== */

/* Top HUD Controls */
.hud-top-left,
.hud-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hud-icon {
  background: #0f172a !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  color: #fff;
  width: 44px;
  height: 44px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
}

.btn-hud-icon:hover {
  background: #1e293b !important;
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(56, 189, 248, 0.5));
}

/* ROW 3: Dedicated Full-Width Top Bank Stock Bar (Transparent Floating Row) */
.top-bank-bar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  padding: 6px 14px;
  width: 100% !important;
  box-sizing: border-box !important;
  cursor: pointer;
  user-select: none;
  z-index: 200 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none !important;
}

.top-bank-bar * {
  pointer-events: auto !important;
}

.top-bank-bar:hover {
  background: transparent !important;
}

/* Hide horizontal player cards bar when user clicks top HUD toggle */
#game-screen.top-bar-hidden .players-top-bar {
  display: none !important;
}

.top-bank-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.top-bank-emoji {
  font-size: 0.9rem;
}

/* Detailed Bank Grid Modal */
.bank-res-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.bank-res-grid .res-card-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}



/* Player Compact Card */
.player-card-compact {
  flex: 1;
  min-width: 175px;
  max-width: 260px;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

/* Color theme borders */
.player-card-compact.red {
  border-left: 4px solid #ef4444;
}

.player-card-compact.blue {
  border-left: 4px solid #3b82f6;
}

.player-card-compact.green {
  border-left: 4px solid #10b981;
}

.player-card-compact.orange {
  border-left: 4px solid #f97316;
}



.player-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

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

.player-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cards-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
}

.res-over-limit-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 1px 6px;
  border-radius: 10px;
  animation: pulseWarning 1.5s infinite ease-in-out;
}

@keyframes pulseWarning {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.player-card-stats-row {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-top: 2px;
}

.player-card-pieces-row {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  margin-top: 1px;
}

.turn-status-banner {
  margin-top: 4px;
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(96, 165, 250, 0.5);
  color: #93c5fd;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.turn-status-banner.my-turn-banner {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.5), rgba(59, 130, 246, 0.7));
  color: #ffffff;
  border-color: #60a5fa;
}

.turn-status-banner.waiting-banner {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  justify-content: center;
  box-shadow: none;
}

.turn-timer-mono {
  font-family: monospace;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

/* Floating Left Circular Actions */
.floating-left-actions {
  position: absolute;
  bottom: 85px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 12;
}

.btn-circle-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.btn-circle-action:hover {
  background: rgba(30, 41, 59, 0.95);
  transform: scale(1.08);
  border-color: var(--accent-gold);
}

/* Bottom Action Bar Controls */
.action-bar-right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-action-round {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  touch-action: manipulation;
}

.btn-action-round.trade {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
}

.btn-action-round.devcard {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  border-color: #a78bfa;
}

.btn-action-round.debug {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #f87171;
}

.btn-action-round.pass {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fbbf24;
}

.btn-action-round:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.btn-action-round:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-action-round:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* ---------- Game Logs Organic Notice Ticker ---------- */
#logs-hud.logs-hud,
.logs-hud,
.organic-notice-ticker {
  position: absolute !important;
  top: var(--logs-hud-top, calc(env(safe-area-inset-top, 0px) + 128px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: min(92vw, 540px) !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 1050 !important;
  pointer-events: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#logs-hud.hidden,
.logs-hud.hidden,
.organic-notice-ticker.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(-8px) scale(0.96) !important;
}

#logs-hud.ticker-fade-out,
.organic-notice-ticker.ticker-fade-out {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(-6px) scale(0.96) !important;
  pointer-events: none !important;
}

#logs-hud:not(.hidden),
.logs-hud:not(.hidden),
.organic-notice-ticker:not(.hidden) {
  display: flex !important;
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

#logs-hud #game-logs-list,
.logs-hud .logs-list,
.organic-notice-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Organic Notice Pill */
.organic-notice-pill {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  max-width: 100% !important;
  padding: 5px 14px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 12px rgba(251, 191, 36, 0.15) !important;
  color: #f8fafc !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  animation: organicNoticeEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.organic-notice-pill.pill-expanded {
  pointer-events: auto !important;
}

.organic-notice-pill.pill-history-item {
  opacity: 0.75 !important;
  transform: scale(0.96) !important;
}

.organic-notice-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 1px 7px !important;
  background: rgba(56, 189, 248, 0.18) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  border-radius: 9999px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.organic-notice-text {
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: min(78vw, 420px) !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

@keyframes organicNoticeEnter {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logs-list::-webkit-scrollbar {
  width: 4px;
}

.logs-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.log-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: 6px;
  border-left: 3px solid var(--accent-gold);
  line-height: 1.3;
  animation: popIn 0.3s ease;
}

.log-item .log-turn {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  display: block;
}

/* Build Menu Popup */
.build-menu-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  left: auto;
  transform: none;
  background: rgba(10, 16, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
  z-index: 100;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(251, 191, 36, 0.2);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.build-menu-popup.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
}

.build-menu-popup .btn-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.build-menu-popup .btn-action:hover:not(:disabled) {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--accent-gold);
  transform: translateX(3px);
  color: var(--accent-gold);
}

.build-menu-popup .btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.build-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cost-item {
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* Prominent Setup Placement Banner (Positioned naturally below bank bar) */
.setup-action-banner {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 8px auto !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 6px 18px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1.5px solid var(--accent-gold) !important;
  border-radius: 30px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  width: fit-content !important;
  max-width: 92vw !important;
  box-sizing: border-box !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  pointer-events: auto !important;
}

.setup-action-banner.my-turn {
  border-color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.98) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.45), 0 6px 20px rgba(0, 0, 0, 0.7) !important;
  animation: none !important;
}

.setup-banner-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.setup-banner-text {
  font-size: 0.9rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.setup-banner-sub {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
  white-space: nowrap;
}

.btn-nav-banner {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.btn-nav-banner:hover {
  background: rgba(56, 189, 248, 0.32);
  border-color: #38bdf8;
}

.btn-nav-banner.banner-off {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.setup-action-banner.banner-collapsed {
  display: none !important;
}

.top-bank-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 4px 16px !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  z-index: 55 !important;
  position: relative !important;
  cursor: pointer !important;
  pointer-events: none !important;
  margin: 0 !important;
}

.top-bank-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 3px 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.top-bank-item:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 600px) {
  .setup-action-banner {
    top: 50px;
    padding: 8px 14px;
    gap: 6px;
  }

  .setup-banner-icon {
    font-size: 1.2rem;
  }

  .setup-banner-text {
    font-size: 0.8rem;
  }

  .setup-banner-sub {
    font-size: 0.75rem;
  }
}

/* Discard Overlay & Selectors Grid */
.discard-selectors-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  width: 100%;
}

.discard-selectors-grid .trade-res-control {
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.discard-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
}

/* =========================================
   GAME OVERLAYS & FLOATING HUD PANELS
   ========================================= */

.game-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.game-overlay.hidden {
  display: none !important;
}

.overlay-content {
  background: rgba(10, 18, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-compact {
  max-width: 440px;
  width: 100%;
}

.trade-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}

.trade-modal-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 0;
}

.btn-close-modal,
.btn-close-hud {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.45) !important;
  color: #ef4444 !important;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  line-height: 1;
}

.btn-close-modal:hover,
.btn-close-hud:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

.right-panels-container>* {
  pointer-events: auto;
}

.dev-cards-hud {
  background: rgba(10, 18, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75);
  color: #ffffff;
  max-height: 50vh;
  overflow-y: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dev-cards-hud.hidden {
  display: none !important;
}

.hud-header {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.buildings-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.building-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.log-entry {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid #fbbf24;
  line-height: 1.35;
}

/* Bank detail grid */
.bank-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.bank-res {
  height: 70px !important;
  min-width: unset !important;
  padding: 6px !important;
}

/* =========================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================= */

@media (max-width: 768px) {

  /* 1. TOP HUD HEADER (Fixed Top - Fits inside 360px+ screens without overflow) */
  /* 1. TOP HUD HEADER (Fixed Top) */
  .hud-top-nav-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
  }

  #game-phase-indicator {
    display: none !important;
  }

  #btn-bank-mobile {
    display: flex !important;
  }

  /* Top Header Exit & Action Buttons */
  #btn-exit-game,
  .game-hud-top .btn-hud-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
    background: #0f172a !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  .game-hud-top .btn-hud-icon:hover,
  #btn-exit-game:hover {
    transform: translateY(-2px) !important;
    background: #1e293b !important;
    filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.5)) !important;
  }

  #btn-exit-game .btn-text {
    display: none !important;
  }

  #btn-exit-game .btn-icon {
    display: block !important;
    font-size: 1.35rem !important;
  }



  .timer-progress-container {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 5px !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.5) !important;
  }

  /* 2. PLAYERS LIST TOP BAR (Fixed under Header - Transparent) */
  .players-top-bar {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 10px !important;
    gap: 8px !important;
    z-index: 100 !important;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }

  .player-card-compact {
    flex-shrink: 0 !important;
    min-width: 200px !important;
    max-width: 260px !important;
    height: auto !important;
    min-height: 86px !important;
    font-size: 0.86rem !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
  }

  .player-card-name {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
  }

  .vp-badge-circle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    font-size: 1.2rem !important;
    border-width: 2px !important;
  }

  .cards-count-badge {
    font-size: 0.8rem !important;
    padding: 2px 7px !important;
    font-weight: 700 !important;
  }

  .player-card-stats-row {
    font-size: 0.8rem !important;
    gap: 10px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
  }

  .player-card-pieces-row {
    font-size: 0.76rem !important;
    gap: 8px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600 !important;
  }

  /* 3. PROMPT BANNER & POPUPS (Positioned naturally below Bank Bar) */
  .setup-action-banner {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: fit-content !important;
    max-width: calc(100vw - 24px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    z-index: 50 !important;
    margin: 6px auto !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.98)) !important;
    border: 1px solid rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.35) !important;
    backdrop-filter: blur(12px) !important;
    pointer-events: auto !important;
  }

  .right-panels-container {
    position: fixed !important;
    top: 158px !important;
    right: 8px !important;
    left: auto !important;
    width: min(320px, calc(100vw - 16px)) !important;
    max-height: calc(100vh - 280px) !important;
    z-index: 950 !important;
  }

  .bank-resources-hud {
    position: fixed !important;
    top: 158px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(340px, calc(100vw - 16px)) !important;
    max-height: calc(100vh - 280px) !important;
    z-index: 950 !important;
    padding: 8px 12px !important;
  }



  .res-card-hud {
    padding: 3px 6px !important;
    border-radius: 10px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    box-sizing: border-box !important;
    height: auto !important;
  }

  .res-emoji {
    font-size: clamp(1.1rem, 4vw, 1.5rem) !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
    line-height: 1 !important;
  }

  .res-hud-label {
    font-size: clamp(0.48rem, 1.7vw, 0.6rem) !important;
    letter-spacing: 0.2px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .res-count-badge {
    padding: 2px 4px !important;
    min-width: 18px !important;
    border-radius: 8px !important;
  }

  .res-count {
    font-size: clamp(0.95rem, 3.2vw, 1.2rem) !important;
    font-weight: 900 !important;
  }

  /* 5. ACTION BAR BOTTOM — full-width bottom dock */
  .action-bar-bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 64px !important;
    max-height: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 8px 12px 12px !important;
    gap: 7px !important;
    z-index: 900 !important;
    background: rgba(9, 17, 32, 0.97) !important;
    backdrop-filter: blur(22px) !important;
    border-radius: 20px 20px 0 0 !important;
    border-top: 1.5px solid rgba(251, 191, 36, 0.28) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.8) !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
  }


  .action-bar-bottom::-webkit-scrollbar {
    display: none !important;
  }

  .action-bar-left-controls,
  .action-bar-right-controls {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }



  .action-bar-right-controls .btn-action-round {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 16px !important;
    font-size: 1.45rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }

  .action-bar-right-controls .btn-action-round:not([disabled]):hover {
    transform: translateY(-3px) scale(1.06) !important;
    filter: brightness(1.2) !important;
  }

  .action-bar-right-controls #btn-buy-dev-card {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.4) !important;
  }

  .action-bar-right-controls #btn-end-turn {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    border: 2px solid #a78bfa !important;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.4) !important;
  }

  #btn-roll-dice,
  #btn-pass-turn {
    height: 52px !important;
    min-height: 52px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
  }

  #floating-dice {
    height: 50px !important;
    min-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  #floating-dice .die:not(.has-cube-3d) {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.55rem !important;
    line-height: 48px !important;
    border-radius: 9px !important;
    font-weight: 900 !important;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  #floating-dice:not([class*="skin-"]) .die:not(.has-cube-3d) {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f8fafc 45%, #e2e8f0 85%, #cbd5e1 100%) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1.5px 2px rgba(255, 255, 255, 0.9), inset 0 -1.5px 2px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
  }

  #floating-dice:not(.disabled):hover .die:not(.has-cube-3d) {
    transform: scale(1.08) rotate(-4deg) !important;
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.6) !important;
  }

  /* Floating Left Actions (Logs icon) */
  .floating-left-actions {
    position: fixed !important;
    bottom: 152px !important;
    left: 10px !important;
    z-index: 880 !important;
  }

  /* Mobile Container Responsiveness Fixes */
  .overlay-content {
    max-width: 95vw !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
  }

  .lobby-main {
    padding: 12px 10px !important;
    gap: 16px !important;
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .card,
  .lobby-hero-card,
  .lobby-rooms-card,
  .profile-card,
  .leaderboard-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: min-content !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
    padding: 18px 14px !important;
    margin-bottom: 0 !important;
  }

  .lobby-hero-card h2 {
    font-size: 1.35rem !important;
    margin: 4px 0 6px 0 !important;
    line-height: 1.25 !important;
  }

  .lobby-hero-card p {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
    color: rgba(255, 255, 255, 0.88) !important;
    max-width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .btn-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
  }

  .profile-details-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .recovery-row,
  .join-room-box,
  .input-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .recovery-row input,
  .join-room-box input,
  .input-row input {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .leaderboard-table-container {
    max-height: 280px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .hud-panel,
  .bank-resources-hud,
  .dev-cards-hud,
  .buildings-hud,
  .logs-hud {
    max-height: calc(100vh - 240px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 480px) {
  .phase-badge {
    display: none !important;
  }

  .btn-hud-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1.05rem !important;
    border-radius: 10px !important;
  }

  #btn-exit-game {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .action-bar-bottom {
    padding: 7px 10px 11px !important;
    height: auto !important;
    min-height: 0 !important;
  }


  .action-bar-right-controls .btn-action-round {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    font-size: 1.1rem !important;
    border-radius: 10px !important;
  }

  #floating-dice .die:not(.has-cube-3d) {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.15rem !important;
    line-height: 36px !important;
    border-radius: 8px !important;
  }

  .btn-trade-dec,
  .btn-trade-inc {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
    line-height: 26px !important;
  }
}

/* =========================================
   UI SCALE & COLLAPSE CONTROLS
   ========================================= */

/* Top Bar Hidden Mode (Ocultar Barra Superior) */
#game-screen.top-bar-hidden .players-top-bar {
  display: none !important;
}

#game-screen.top-bar-hidden .setup-action-banner {
  top: 52px !important;
}

#game-screen.top-bar-hidden .right-panels-container {
  top: 52px !important;
}

#game-screen.top-bar-hidden .bank-resources-hud {
  top: 52px !important;
}

/* UI Scale: Small (Pequeño - 85%) */
#game-screen.ui-scale-sm .game-hud-top {
  transform: scale(0.95);
  transform-origin: top center;
}

#game-screen.ui-scale-sm .players-top-bar {
  transform: scale(0.95);
  transform-origin: top center;
}

#game-screen.ui-scale-sm .my-resources-hud:not(.user-dragged) {
  transform: scale(1.1);
  transform-origin: bottom center;
}

#game-screen.ui-scale-sm .action-bar-bottom {
  transform: scale(0.85);
  transform-origin: bottom center;
}

/* UI Scale: Large (Grande - 115%) */
#game-screen.ui-scale-lg .game-hud-top {
  transform: scale(1.15);
  transform-origin: top center;
}

#game-screen.ui-scale-lg .players-top-bar {
  transform: scale(1.15);
  transform-origin: top center;
}

#game-screen.ui-scale-lg .my-resources-hud:not(.user-dragged) {
  transform: scale(1.15);
  transform-origin: bottom center;
}

#game-screen.ui-scale-lg .action-bar-bottom {
  transform: scale(1.15);
  transform-origin: bottom center;
}

/* =========================================
   BRAND LOGO ACCENT & BUTTON COLOR SYSTEM
   ========================================= */
.btn-hud-icon {
  background: #0f172a !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: none !important;
}

.btn-hud-icon:hover {
  border: none !important;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.5)) !important;
}

.btn-hud-icon.panel-open,
.btn-hud-icon:active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 60%, #78350f 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  border: none !important;
  filter: drop-shadow(0 4px 14px rgba(217, 119, 6, 0.65)) !important;
}

.btn-action-round {
  background: rgba(10, 19, 36, 0.94) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.btn-action-round:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
}

.btn-action-round.active,
.btn-action-round:active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 60%, #78350f 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  border: 1.5px solid #fde047 !important;
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.65) !important;
}

/* =========================================
   ACHIEVEMENT TOAST BANNER & VICTORY MODAL
   ========================================= */
.achievement-toast-banner {
  position: fixed !important;
  top: 66px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 1500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  padding: 12px 20px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96)) !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4), 0 0 20px rgba(245, 158, 11, 0.3) !important;
  animation: toastBannerSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  width: 95vw !important;
  max-width: 95vw !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

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

@keyframes toastBannerSlideIn {
  0% {
    transform: translate(-50%, -40px) scale(0.85);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

.achievement-toast-icon {
  font-size: 2.2rem;
  animation: crownPulse 1.2s infinite ease-in-out;
}

@keyframes crownPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

.achievement-toast-title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.achievement-toast-desc {
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 600;
}

/* Victory & Game Over Modal â€” Fits 100% in viewport without scrolling */
/* ==========================================================================
   IMPERIAL VICTORY & GAME OVER DASHBOARD — FULLSCREEN RESPONSIVE
   ========================================================================== */

#game-over-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background: rgba(5, 9, 18, 0.94) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  touch-action: auto !important;
}

#game-over-overlay:not(.hidden) {
  pointer-events: auto !important;
  touch-action: auto !important;
}

#game-over-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.game-over-modal-imperial {
  position: relative !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.1) 0%, rgba(12, 18, 34, 0.99) 42%, #070b14 100%) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: victoryFadeIn 0.28s ease-out forwards !important;
}

@keyframes victoryFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fixed Top Dashboard Header */
.game-over-header-bar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: max(12px, env(safe-area-inset-top, 12px)) 24px 12px 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 29, 0.94) 100%);
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  z-index: 20;
  box-sizing: border-box;
}

.game-over-header-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.game-over-header-text {
  min-width: 0;
  flex: 1;
}

.game-over-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.go-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  white-space: nowrap;
}

.victory-glow-rays {
  position: absolute;
  top: -80px;
  left: 36px;
  width: 220px;
  height: 220px;
  background: conic-gradient(from 0deg at 50% 50%, rgba(251, 191, 36, 0.12) 0deg, transparent 45deg, rgba(251, 191, 36, 0.12) 90deg, transparent 135deg, rgba(251, 191, 36, 0.12) 180deg, transparent 225deg, rgba(251, 191, 36, 0.12) 270deg, transparent 315deg, rgba(251, 191, 36, 0.12) 360deg);
  border-radius: 50%;
  pointer-events: none;
  animation: rotateRays 25s linear infinite;
  z-index: 1;
}

@keyframes rotateRays {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.victory-glow-center {
  position: absolute;
  top: -20px;
  left: 16px;
  width: 200px;
  height: 110px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.victory-crown-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(217, 119, 6, 0.25));
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: victoryCrownPulse 2.8s infinite ease-in-out;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

@keyframes victoryCrownPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.28);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.52);
  }
}

.victory-title-imperial {
  position: relative;
  z-index: 2;
  font-family: 'Cinzel', serif, system-ui;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0.8px;
  background: linear-gradient(180deg, #ffffff 10%, #fbbf24 85%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.victory-subtitle-imperial {
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin: 3px 0 0 0;
  font-weight: 600;
  line-height: 1.35;
}

.victory-close-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  color: #f8fafc !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  z-index: 25 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
}

.victory-close-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  transform: scale(1.04) !important;
}

.victory-close-btn:active {
  transform: scale(0.96) !important;
}

/* Dedicated internal scrollable body */
.game-over-scroll-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  pointer-events: auto !important;
  touch-action: pan-y !important;
  padding: 20px 24px 28px 24px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.go-dashboard-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.game-over-scroll-body::-webkit-scrollbar {
  width: 7px;
}

.game-over-scroll-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

.game-over-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 8px;
}

.game-over-scroll-body::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.65);
}

/* Floating Re-Open Victory Summary Button */
.btn-reopen-victory-modal {
  position: fixed !important;
  top: 68px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.7) !important;
  color: #fbbf24 !important;
  padding: 8px 18px !important;
  border-radius: 24px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(251, 191, 36, 0.3) !important;
  animation: floatPulse 2.5s infinite ease-in-out !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}

.btn-reopen-victory-modal:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.04) !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 1), rgba(15, 23, 42, 1)) !important;
  border-color: #f59e0b !important;
}

/* Hero Grid: Winner Spotlight + Personal Rewards */
.go-hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.winner-spotlight-card {
  position: relative;
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.92) 0%, rgba(13, 20, 38, 0.96) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.42);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), inset 0 0 24px rgba(251, 191, 36, 0.05);
  box-sizing: border-box;
  min-width: 0;
}

.winner-spotlight-top {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.winner-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.35));
  border: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.32);
}

.winner-avatar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.winner-avatar-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px dashed rgba(251, 191, 36, 0.5);
  animation: rotateRays 14s linear infinite;
}

.winner-info-wrap {
  flex: 1;
  min-width: 0;
}

.winner-tag {
  font-size: 0.68rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  display: block;
}

.winner-player-name {
  font-size: 1.25rem !important;
  font-weight: 900;
  color: #ffffff;
  margin: 2px 0 6px 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.winner-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.winner-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.winner-stat-pill.secondary {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.36);
  color: #7dd3fc;
}

/* Integrated Victory Formula Breakdown */
.winner-vp-breakdown-card {
  position: relative;
  background: rgba(9, 14, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-sizing: border-box;
  text-align: left;
}

.vp-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  gap: 8px;
}

.vp-breakdown-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vp-breakdown-meta {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.vp-breakdown-items {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.vp-formula-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
}

.vp-formula-chip.chip-settlement {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(30, 41, 59, 0.85));
}

.vp-formula-chip.chip-city {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(30, 41, 59, 0.85));
}

.vp-formula-chip.chip-road {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(30, 41, 59, 0.85));
}

.vp-formula-chip.chip-army {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(30, 41, 59, 0.85));
}

.vp-formula-chip.chip-devcard {
  border-color: rgba(52, 211, 153, 0.4);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(30, 41, 59, 0.85));
}

.vp-formula-chip.chip-bonus {
  border-color: rgba(236, 72, 153, 0.4);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(30, 41, 59, 0.85));
}

.vp-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vp-chip-math {
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
}

.vp-chip-math strong {
  color: #f8fafc;
  font-size: 0.8rem;
}

.vp-chip-pts {
  color: #fbbf24;
  font-weight: 900;
  font-size: 0.76rem;
  background: rgba(251, 191, 36, 0.12);
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.vp-formula-op {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 900;
}

.vp-formula-chip.chip-total {
  border-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.3));
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
}

.vp-formula-chip.chip-total .vp-total-pts {
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 900;
}

/* Rewards Panel */
.victory-rewards-banner {
  background: linear-gradient(145deg, rgba(20, 29, 49, 0.92) 0%, rgba(13, 20, 38, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.go-rewards-title {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #94a3b8;
}

.reward-box {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  width: 100% !important;
  box-sizing: border-box !important;
}

.reward-box.trophy-reward {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(30, 41, 59, 0.82) 100%);
}

.reward-box.gold-reward {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(30, 41, 59, 0.82) 100%);
}

.reward-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.reward-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reward-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.reward-label {
  font-size: 0.72rem;
  color: #e2e8f0;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.reward-sublabel {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

.reward-value-animated {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.reward-value-animated.trophy-val {
  color: #38bdf8;
}

.reward-value-animated.gold-val {
  color: #fbbf24;
}

/* Shared Section Header */
.go-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.go-section-meta {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 700;
}

/* Match Statistics Grid */
.game-stats-card-imperial {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  width: 100%;
  box-sizing: border-box;
}

.stats-header-title {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fbbf24;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.stats-grid-imperial {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.stat-box-imperial {
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 64px;
  box-sizing: border-box;
  min-width: 0;
  transition: border-color 0.15s ease;
}

.stat-box-imperial:hover {
  border-color: rgba(251, 191, 36, 0.35);
}

.stat-box-left {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.stat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-lbl {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.15;
}

.stat-val.highlight-cyan {
  color: #38bdf8;
}

.stat-val.highlight-gold {
  color: #fbbf24;
}

.stat-val.highlight-emerald {
  color: #34d399;
}

.stat-val.highlight-ruby {
  color: #f87171;
}

/* Scoreboard: Desktop Table + Mobile Stacked Cards */
.match-players-table-imperial {
  width: 100%;
  box-sizing: border-box;
}

.final-scoreboard-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 20px;
  padding: 16px 18px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.go-scoreboard-desktop {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.go-scoreboard-mobile {
  display: none;
}

.final-scoreboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 0.84rem;
  text-align: left;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.final-scoreboard-table thead tr {
  background: rgba(10, 15, 29, 0.8);
}

.final-scoreboard-table th {
  padding: 8px 10px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.final-scoreboard-table th.th-rank {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  padding-left: 12px;
}

.final-scoreboard-table th.th-vp,
.final-scoreboard-table th.th-stat,
.final-scoreboard-table th.th-elo {
  text-align: center;
}

.final-scoreboard-table th.th-gold {
  text-align: right;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  padding-right: 12px;
  color: #fbbf24;
}

.go-table-row {
  background: rgba(30, 41, 59, 0.5);
}

.go-table-row.is-me {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.78));
}

.go-table-row.is-winner td {
  border-top: 1px solid rgba(251, 191, 36, 0.25);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.final-scoreboard-table td {
  padding: 10px;
  vertical-align: middle;
}

.final-scoreboard-table td.td-rank {
  border-radius: 10px 0 0 10px;
  font-weight: 900;
  white-space: nowrap;
  padding-left: 12px;
}

.final-scoreboard-table td.td-vp {
  text-align: center;
  font-weight: 900;
  color: #fbbf24;
  font-size: 0.95rem;
}

.final-scoreboard-table td.td-stat {
  text-align: center;
  font-weight: 800;
  color: #e2e8f0;
}

.final-scoreboard-table td.td-tactic {
  text-align: center;
  font-weight: 700;
  font-size: 0.76rem;
  color: #cbd5e1;
  white-space: nowrap;
}

.final-scoreboard-table td.td-elo {
  text-align: center;
  font-weight: 800;
  white-space: nowrap;
}

.final-scoreboard-table td.td-gold {
  text-align: right;
  font-weight: 900;
  color: #fbbf24;
  border-radius: 0 10px 10px 0;
  white-space: nowrap;
  padding-right: 12px;
}

.go-player-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.go-player-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.player-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.final-player-name {
  font-weight: 800;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.go-badge-me {
  font-size: 0.62rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 800;
  text-transform: uppercase;
}

.go-badge-bot {
  font-size: 0.6rem;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 800;
}

/* Micro-breakdown inside scoreboard */
.player-mini-vp-breakdown {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.68rem;
  color: #94a3b8;
}

.mini-vp-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.3;
  font-size: 0.68rem;
  white-space: nowrap;
}

.mini-vp-tag.settlement {
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.mini-vp-tag.city {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde047;
}

.mini-vp-tag.road {
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.mini-vp-tag.army {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.mini-vp-tag.dev {
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

/* Mobile Stacked Player Cards */
.go-player-card-mobile {
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.go-player-card-mobile.is-me {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.85));
  border-color: rgba(56, 189, 248, 0.42);
}

.go-player-card-mobile.is-winner {
  border-color: rgba(251, 191, 36, 0.45);
}

.go-mobile-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.go-mobile-player-id {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}

.go-mobile-rank {
  font-weight: 900;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
}

.go-mobile-name {
  font-weight: 800;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.go-mobile-vp-pill {
  flex-shrink: 0;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.go-mobile-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.go-mobile-metric {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.go-mm-lbl {
  font-size: 0.64rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

.go-mm-val {
  font-size: 0.8rem;
  color: #f8fafc;
  font-weight: 800;
}

.go-mobile-rewards-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
}

/* Calibrated SVG Dice Distribution Chart */
.dice-chart-wrapper-imperial {
  width: 100%;
  box-sizing: border-box;
}

.go-dice-chart-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 16px 18px;
  width: 100%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  box-sizing: border-box;
}

.go-dice-chart-title {
  color: #38bdf8;
  font-size: 0.84rem;
  margin: 0;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.6px;
}

.go-dice-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}

.go-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.go-legend-swatch {
  width: 12px;
  height: 8px;
  border-radius: 3px;
  display: inline-block;
}

.go-legend-swatch.real {
  background: #64748b;
}

.go-legend-swatch.hot {
  background: #38bdf8;
}

.go-legend-swatch.seven {
  background: #ef4444;
}

.go-legend-swatch.curve {
  width: 16px;
  height: 0;
  border-top: 2.5px dashed #fbbf24;
  border-radius: 0;
}

.go-dice-svg-wrap {
  width: 100%;
  overflow: hidden;
}

.go-dice-svg {
  width: 100%;
  height: auto;
  display: block;
}

.go-dice-empty {
  text-align: center;
  padding: 20px 12px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Fixed Bottom Action Footer */
.game-over-footer-imperial {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 1168px !important;
  margin: 0 auto !important;
  padding: 12px 24px max(14px, env(safe-area-inset-bottom, 14px)) 24px !important;
  background: rgba(9, 14, 26, 0.98) !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.28) !important;
  box-sizing: border-box !important;
  z-index: 20 !important;
}

.btn-imperial-action {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 12px 16px !important;
  border: none !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  letter-spacing: 0.5px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.btn-imperial-action:hover {
  transform: translateY(-2px);
}

.btn-imperial-action:active {
  transform: translateY(1px);
}

.btn-imperial-lobby {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #031826;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
}

.btn-imperial-lobby:hover {
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.55);
}

.btn-imperial-play {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}

.btn-imperial-play:hover {
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.55);
}

.btn-imperial-action:focus-visible,
.victory-close-btn:focus-visible {
  outline: 3px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  .game-over-modal-imperial,
  .victory-glow-rays,
  .victory-crown-badge,
  .winner-avatar-glow {
    animation: none !important;
  }
}

/* Tablet Responsive */
@media (max-width: 900px) {
  .go-hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

/* Mobile Responsive (< 640px) */
@media (max-width: 640px) {
  .game-over-header-bar {
    padding: max(10px, env(safe-area-inset-top, 10px)) 12px 10px 12px;
    gap: 10px;
  }

  .victory-crown-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .victory-title-imperial {
    font-size: 1.12rem !important;
  }

  .victory-subtitle-imperial {
    font-size: 0.74rem !important;
  }

  .game-over-scroll-body {
    padding: 12px 12px 18px 12px !important;
  }

  .go-dashboard-container {
    gap: 12px;
  }

  .winner-spotlight-card,
  .victory-rewards-banner,
  .game-stats-card-imperial,
  .final-scoreboard-card,
  .go-dice-chart-card {
    padding: 12px;
    border-radius: 16px;
  }

  .winner-avatar-wrap {
    width: 44px;
    height: 44px;
  }

  .winner-player-name {
    font-size: 1.05rem !important;
  }

  .stats-grid-imperial {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .stat-box-imperial {
    min-height: 56px;
    padding: 8px 10px;
  }

  .stat-val {
    font-size: 0.94rem;
  }

  .go-scoreboard-desktop {
    display: none;
  }

  .go-scoreboard-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .go-dice-legend {
    gap: 8px 12px;
    font-size: 0.68rem;
  }

  .game-over-footer-imperial {
    gap: 8px !important;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom, 12px)) 12px !important;
  }

  .btn-imperial-action {
    padding: 10px 8px !important;
    font-size: 0.78rem !important;
    min-height: 46px !important;
    border-radius: 12px !important;
    gap: 6px !important;
  }
}

.final-scoreboard-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Active Game Reconnect Banner on Play Page */
#play-active-game-banner {
  display: none;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
  border: 2px solid #fbbf24;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: pulseGoldGlow 2.5s infinite alternate;
  width: 100%;
  box-sizing: border-box;
}

#play-active-game-banner .active-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#play-active-game-banner .active-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#play-active-game-banner .active-banner-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px #fbbf24);
}

#play-active-game-banner .active-banner-title {
  margin: 0;
  color: #fbbf24;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

#play-active-game-banner .active-banner-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

#play-active-game-banner .active-banner-desc {
  margin: 4px 0 0 0;
  font-size: 0.84rem;
  color: #cbd5e1;
}

#play-active-game-banner .active-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#play-active-game-banner .btn-active-rejoin {
  padding: 10px 18px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.45);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

#play-active-game-banner .btn-active-rejoin:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

#play-active-game-banner .btn-active-dismiss {
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  color: #fca5a5;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

#play-active-game-banner .btn-active-dismiss:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

@media (max-width: 380px) {
  .victory-title-imperial {
    font-size: 1.2rem !important;
  }

  .btn-imperial-action {
    padding: 8px 4px !important;
    font-size: 0.72rem !important;
  }
}

/* =========================================
   MOBILE LEADERBOARD CARD VISIBILITY FIX
   ========================================= */
@media (max-width: 768px) {
  .leaderboard-card {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: auto !important;
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  .leaderboard-card .hex-card-inner {
    clip-path: none !important;
    border-radius: 22px !important;
    border: 2px solid rgba(245, 158, 11, 0.45) !important;
    padding: 18px 14px !important;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(245, 158, 11, 0.1) !important;
  }

  .leaderboard-card .hex-card-inner::after {
    display: none !important;
  }

  .leaderboard-table-container {
    max-height: 320px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    margin-top: 10px !important;
    border-radius: 14px !important;
    background: rgba(10, 16, 30, 0.75) !important;
  }


}

/* =========================================
   DICE 7 ANNOUNCEMENT BANNER
   ========================================= */
.dice-seven-banner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, rgba(45, 10, 10, 0.94) 0%, rgba(20, 5, 5, 0.94) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(239, 68, 68, 0.65);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(239, 68, 68, 0.35);
  animation: diceSevenPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90vw;
  width: 440px;
}

.dice-seven-banner.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dice-seven-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
  animation: pulseSevenIcon 1s infinite alternate ease-in-out;
}

@keyframes pulseSevenIcon {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.18) rotate(5deg);
  }
}

.dice-seven-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dice-seven-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #f87171;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.dice-seven-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
  font-weight: 500;
}

@keyframes diceSevenPop {
  0% {
    transform: translate(-50%, -20px) scale(0.88);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* =========================================
   DEV CARD DRAWN MODAL OVERLAY
   ========================================= */
.dev-card-drawn-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: fadeIn 0.3s ease;
}

.dev-card-drawn-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dev-card-drawn-box {
  width: 320px;
  max-width: 90vw;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  border: 2px solid #fbbf24;
  border-radius: 28px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(251, 191, 36, 0.4);
  animation: devCardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes devCardPop {
  0% {
    transform: scale(0.7) translateY(30px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.dev-card-drawn-badge {
  font-size: 0.76rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
  background: rgba(251, 191, 36, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.dev-card-drawn-icon {
  font-size: 3.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.6));
  margin: 6px 0;
}

.dev-card-drawn-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
}

.dev-card-drawn-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.dev-card-drawn-footer {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

/* =========================================
   HOLD-AND-DRAG QUICK BANK TRADE PICKER
   ========================================= */
/* ==========================================================================
   CENTERED RADIAL BANK TRADE SELECTOR WITH PROMINENT CANCEL BUTTON
   ========================================================================== */
.quick-trade-picker {
  position: fixed !important;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 140px) !important;
  left: 50% !important;
  top: auto !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 10000 !important;
  background: linear-gradient(145deg, rgba(13, 20, 38, 0.98), rgba(10, 14, 26, 0.99)) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 2px solid rgba(251, 191, 36, 0.75) !important;
  border-radius: 26px !important;
  padding: 14px 16px 16px 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(251, 191, 36, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: min(380px, calc(100vw - 28px)) !important;
  max-width: 380px !important;
  animation: quickPickerPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  touch-action: none !important;
  user-select: none !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

.quick-trade-picker.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes quickPickerPop {
  0% {
    transform: translate(-50%, 14px) scale(0.92);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

.radial-trade-header-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}

.radial-giving-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  font-size: 0.82rem !important;
  color: #f8fafc !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2) !important;
}

.giving-label {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.5px !important;
}

.giving-amount {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #fff !important;
}

.giving-amount strong {
  font-weight: 900 !important;
  color: #fbbf24 !important;
  font-size: 0.95rem !important;
}

.giving-ratio-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
}

.radial-prompt-text {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-align: center !important;
}

/* 4-Node 2x2 Grid + Central Cancel */
.quick-trade-options {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 2px 0 !important;
  box-sizing: border-box !important;
}

.quick-opt-btn.radial-node {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease !important;
  user-select: none !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: 100% !important;
}

.quick-opt-btn.radial-node:hover,
.quick-opt-btn.radial-node.highlighted {
  transform: translateY(-2px) scale(1.03) !important;
  border-color: #fbbf24 !important;
  background: rgba(45, 55, 75, 0.98) !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45) !important;
}

.radial-node-icon {
  font-size: 1.55rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

.radial-node-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.radial-node-name {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.1 !important;
}

.radial-node-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #4ade80 !important;
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  padding: 0.5px 5px !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
}

/* Distinct color accents for each resource node */
.quick-opt-btn.radial-node.wood {
  border-color: rgba(34, 197, 94, 0.35) !important;
}

.quick-opt-btn.radial-node.brick {
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.quick-opt-btn.radial-node.sheep {
  border-color: rgba(168, 85, 247, 0.35) !important;
}

.quick-opt-btn.radial-node.wheat {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.quick-opt-btn.radial-node.ore {
  border-color: rgba(100, 116, 139, 0.45) !important;
}

/* Central / Full-width Cancel Button */
.quick-opt-btn.radial-cancel-btn {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  margin-top: 4px !important;
  user-select: none !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.quick-opt-btn.radial-cancel-btn:hover,
.quick-opt-btn.radial-cancel-btn.highlighted {
  background: rgba(239, 68, 68, 0.32) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) scale(1.02) !important;
}

.radial-cancel-btn .cancel-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
}

.radial-cancel-btn .cancel-label {
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #fca5a5 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.quick-opt-btn .opt-label {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #e2e8f0 !important;
  margin-top: 4px !important;
  white-space: nowrap !important;
  letter-spacing: 0.02em !important;
}

/* High-Contrast Distinct Hover & Drag Highlight */
.quick-opt-btn.highlighted,
.quick-opt-btn:hover {
  transform: translateY(-18px) scale(1.26) rotate(0deg) !important;
  z-index: 10 !important;
  border-width: 2.5px !important;
}

.quick-opt-btn.wood.highlighted,
.quick-opt-btn.wood:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.7) !important;
}

.quick-opt-btn.brick.highlighted,
.quick-opt-btn.brick:hover {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  border-color: #f87171 !important;
  box-shadow: 0 10px 30px rgba(248, 113, 113, 0.7) !important;
}

.quick-opt-btn.sheep.highlighted,
.quick-opt-btn.sheep:hover {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%) !important;
  border-color: #c084fc !important;
  box-shadow: 0 10px 30px rgba(192, 132, 252, 0.75) !important;
}

.quick-opt-btn.wheat.highlighted,
.quick-opt-btn.wheat:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-color: #fde047 !important;
  box-shadow: 0 10px 30px rgba(253, 224, 71, 0.7) !important;
}

.quick-opt-btn.ore.highlighted,
.quick-opt-btn.ore:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.7) !important;
}

.quick-opt-btn.cancel-opt.highlighted,
.quick-opt-btn.cancel-opt:hover {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  border-color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.7) !important;
}

.quick-opt-btn.highlighted .opt-label {
  color: #ffffff !important;
  font-size: 0.72rem !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.quick-opt-btn.highlighted .opt-emoji {
  transform: scale(1.15) !important;
}

/* ==========================================================================
   PLATO / ANDROID / iOS NATIVE BOARD GAME UI â€” ERGONOMIC THUMB DOCK
   ========================================================================== */

/* Unified Bottom Ergonomic Dock (Floating at lower thumb reach) */
.action-bar-bottom {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.96) 0%, rgba(9, 14, 26, 0.98) 50%, rgba(5, 8, 16, 0.99) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: none !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 8px clamp(14px, 3.5vw, 48px) max(10px, env(safe-area-inset-bottom, 10px)) clamp(14px, 3.5vw, 48px) !important;
  z-index: 900 !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 35px rgba(251, 191, 36, 0.12) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: space-between !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
}

/* My Resources Hand Cards embedded cleanly right above Dock */
.my-resources-hud {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: flex !important;
  gap: 4px !important;
  justify-content: space-between !important;
  z-index: 10 !important;
  overflow: visible !important;
}

.my-resources-hud .res-card-hud {
  flex: 1 !important;
  min-width: 44px !important;
  max-width: 58px !important;
  height: 74px !important;
  padding: 6px 2px 5px !important;
  border-radius: 8px !important;
  gap: 2px !important;
  touch-action: manipulation !important;
}

.my-resources-hud .res-emoji {
  font-size: 1.15rem !important;
}

.my-resources-hud .res-hud-label {
  font-size: 0.7rem !important;
  letter-spacing: 0.4px !important;
}

.my-resources-hud .res-count {
  font-size: 0.92rem !important;
}

/* Upper Row inside Bottom Dock (Mini Dev Cards HUD + 3D Dice Pair) */
.dock-upper-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 4px !important;
}

.my-dev-cards-mini-hud {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
  border-radius: 14px !important;
  padding: 4px 10px !important;
  min-height: 36px !important;
}

.mini-hud-label {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #c084fc !important;
  letter-spacing: 0.4px !important;
}

.mini-dev-cards-list {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.mini-dev-empty {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

.mini-dev-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  background: rgba(126, 34, 206, 0.4) !important;
  border: 1px solid #c084fc !important;
  border-radius: 8px !important;
  padding: 2px 6px !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  cursor: pointer !important;
}

/* Control Row inside Bottom Dock: Timer (Left) -> Dev Card -> Market -> Pass Turn (Right) */
.action-bar-right-controls {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  justify-content: space-between !important;
}

/* Timer Box in Action Bar (Far Left) */
.timer-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(0, 210, 196, 0.4) !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
  min-width: 54px !important;
  height: 52px !important;
  box-sizing: border-box !important;
}



/* Tactile 3D Action Buttons */
.btn-action-round {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 52px !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #1e293b, #0f172a) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  cursor: pointer !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
  touch-action: manipulation !important;
  padding: 0 !important;
  position: relative !important;
}

.btn-action-round:active:not(:disabled) {
  transform: translateY(2px) scale(0.95) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.btn-action-round .btn-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.btn-action-round .btn-label-sub {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-top: 2px !important;
}

.btn-action-round.trade {
  background: linear-gradient(145deg, #0369a1, #075985) !important;
  border-color: #38bdf8 !important;
}

.btn-action-round.devcard {
  background: linear-gradient(145deg, #7e22ce, #6b21a8) !important;
  border-color: #c084fc !important;
}

.btn-action-round.pass {
  background: linear-gradient(145deg, #059669, #047857) !important;
  border-color: #34d399 !important;
}

.btn-action-round:disabled {
  opacity: 0.45 !important;
  filter: grayscale(0.6) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Floating 3D Dice Pair inside Thumb Dock Upper Row */
.floating-dice-hud {
  display: flex !important;
  gap: 6px !important;
  cursor: pointer !important;
  padding: 2px 4px !important;
  border-radius: 12px !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

.floating-dice-hud:not(.disabled) {
  animation: diceGlowPulse 2s infinite ease-in-out !important;
}

.floating-dice-hud.disabled {
  opacity: 0.78 !important;
  cursor: default !important;
  animation: none !important;
}

.floating-dice-hud .die:not(.has-cube-3d) {
  width: 34px !important;
  height: 34px !important;
  background: linear-gradient(145deg, #ffffff, #e2e8f0) !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 1.05rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}


/* --- FAST TRADE 1-SEC HOLD & SLIDE-TO-SELECT --- */
.res-card-hud.holding-press {
  animation: holdingPulse 1s ease-in-out forwards;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.8), inset 0 0 10px rgba(251, 191, 36, 0.4) !important;
  border-color: #fbbf24 !important;
  transform: scale(1.08) !important;
}

@keyframes holdingPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }

  100% {
    transform: scale(1.08);
    filter: brightness(1.4);
  }
}



/* --- DEV CARD DRAWN POPUP OVERLAY --- */
.dev-card-drawn-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-card-drawn-box {
  background: linear-gradient(145deg, #1e1b4b, #0f172a);
  border: 3px solid #fbbf24;
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(251, 191, 36, 0.3);
  animation: devCardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes devCardPop {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(30px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dev-card-drawn-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  color: #0f172a;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.dev-card-drawn-icon {
  font-size: 4rem;
  margin: 10px 0;
  filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.4));
  animation: floatIcon 2s infinite ease-in-out;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.dev-card-drawn-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: 'Cinzel', serif;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dev-card-drawn-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* --- DICE 7 / ROBBER PROMINENT BANNER --- */
.dice-seven-banner {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.95), rgba(69, 10, 10, 0.95));
  backdrop-filter: blur(12px);
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 92vw;
  width: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.3);
  animation: bannerSlideDown 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.dice-seven-icon {
  font-size: 2.2rem;
  animation: pulseDice 1.5s infinite;
}

@keyframes pulseDice {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.dice-seven-content {
  flex: 1;
}

.dice-seven-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: #fef2f2;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.dice-seven-desc {
  font-size: 0.82rem;
  color: #fca5a5;
  line-height: 1.35;
}



/* Ensure dice stay nicely anchored at the far right of upper dock */
#floating-dice,
.floating-dice-hud {
  margin-left: auto !important;
  z-index: 940 !important;
}

/* --- MINI TRADE ACTIVE WIDGET STYLING --- */

/* --- ROOM CONFIGURATION ACCESSIBILITY & HIGH-CONTRAST STYLING --- */
.room-config-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)) !important;
  border: 2px solid rgba(251, 191, 36, 0.5) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(251, 191, 36, 0.2) !important;
}

.room-config-card h2 {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  letter-spacing: 0.5px !important;
}

.config-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 16px !important;
}

.config-group label {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  letter-spacing: 0.3px !important;
}

.config-group select {
  width: 100% !important;
  padding: 12px 14px !important;
  background: #0f172a !important;
  border: 2px solid rgba(251, 191, 36, 0.5) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  outline: none !important;
  cursor: pointer !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.config-group select:focus,
.config-group select:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.config-group select option {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 10px !important;
}

/* --- ULTRA-COMPACT SPACE-SAVING GLASSMORPHISM SLIDERS (ZERO LAYOUT SHIFTS) --- */
.config-sliders-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.kmkz-turn-slider-group {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 6px 12px !important;
  margin-bottom: 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
  box-sizing: border-box !important;
  contain: layout paint !important;
}

.kmkz-turn-slider-group:hover {
  border-color: rgba(251, 191, 36, 0.25) !important;
  background: rgba(20, 30, 50, 0.7) !important;
}

.kmkz-slider-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin-bottom: 4px !important;
  overflow: hidden !important;
}

.kmkz-slider-label {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  display: block !important;
  margin: 0 !important;
  letter-spacing: 0.1px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 20px !important;
}

.kmkz-slider-val-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  padding: 1px 7px !important;
  border-radius: 6px !important;
  font-family: 'Outfit', sans-serif !important;
  white-space: nowrap !important;
  letter-spacing: 0.2px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  line-height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  font-variant-numeric: tabular-nums !important;
}

.kmkz-road-slider-wrapper {
  position: relative !important;
  width: 100% !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Custom Sleek Track Range Input */
.kmkz-road-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 18px !important;
  background: transparent !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Modern Track Styling (Slim Glowing Glass Bar) */
.kmkz-road-slider::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 6px !important;
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.kmkz-road-slider::-moz-range-track {
  width: 100% !important;
  height: 6px !important;
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* True 3D Cyber-Gold Hexagonal Thumb */
.kmkz-road-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 22px !important;
  margin-top: -8px !important;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fef08a 25%, #f59e0b 60%, #92400e 100%) !important;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  cursor: grab !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.85)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), filter 0.15s ease !important;
}

.kmkz-road-slider::-moz-range-thumb {
  width: 18px !important;
  height: 22px !important;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fef08a 25%, #f59e0b 60%, #92400e 100%) !important;
  border: none !important;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  cursor: grab !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.85)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), filter 0.15s ease !important;
}

.kmkz-road-slider::-webkit-slider-thumb:hover,
.kmkz-road-slider:focus::-webkit-slider-thumb {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 1)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) !important;
  cursor: grabbing !important;
}

.kmkz-road-slider::-moz-range-thumb:hover,
.kmkz-road-slider:focus::-moz-range-thumb {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 1)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) !important;
  cursor: grabbing !important;
}



#btn-lobby-start-game {
  width: 100% !important;
  padding: 16px !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 2px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45) !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#btn-lobby-start-game:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.65) !important;
}

#btn-lobby-start-game:disabled {
  background: rgba(51, 65, 85, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* ==========================================================================
   TOP GAME HUD HEADER BAR (Responsive & Distributed Controls)
   ========================================================================== */
.game-hud-top {
  position: relative !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: auto !important;
  min-height: 48px !important;
  padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
  padding-left: max(12px, env(safe-area-inset-left, 12px)) !important;
  padding-right: max(12px, env(safe-area-inset-right, 12px)) !important;
  padding-bottom: 6px !important;
  margin: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  z-index: 9990 !important;
  gap: 8px !important;
  pointer-events: auto !important;
}

.game-hud-top,
.hud-top-nav-row {
  pointer-events: auto !important;
}

.hud-top-nav-row {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
  gap: 8px !important;
}

.game-hud-top button,
.game-hud-top .btn-hud-top-nav,
.game-hud-top .btn-hud-icon,
.game-hud-top .phase-badge {
  pointer-events: auto !important;
  z-index: 9999 !important;
}

.hud-top-left,
.hud-top-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  position: relative !important;
  z-index: 9995 !important;
  pointer-events: auto !important;
}

.btn-hud-top-nav,
.game-hud-top .btn-hud-icon {
  position: relative !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 12px !important;
  -webkit-clip-path: none !important;
  clip-path: none !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  outline: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 1px !important;
  white-space: nowrap !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

.btn-hud-top-nav::after,
.game-hud-top .btn-hud-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  min-width: 100%;
  min-height: 100%;
  pointer-events: auto;
}

.hud-nav-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
}

.btn-hud-top-nav .hud-nav-icon,
.game-hud-top .btn-hud-icon .hud-nav-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-hud-top-nav .hud-nav-icon svg,
.game-hud-top .btn-hud-icon .hud-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.btn-hud-top-nav .nav-label {
  display: none !important;
}

.btn-hud-top-nav:hover,
.game-hud-top .btn-hud-icon:hover {
  transform: translateY(-2px) scale(1.06) !important;
  filter: brightness(1.2) !important;
}

.btn-hud-top-nav:hover .hud-nav-icon,
.game-hud-top .btn-hud-icon:hover .hud-nav-icon {
  transform: scale(1.1) !important;
}

.btn-hud-top-nav:active,
.game-hud-top .btn-hud-icon:active {
  transform: translateY(0) scale(0.95) !important;
}

/* Color Themes & Custom Glows for Header Navigation Buttons */
.btn-nav-toggle-hud {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(56, 189, 248, 0.15) !important;
}

.btn-nav-toggle-hud:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

.btn-nav-rules {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 0.2) !important;
}

.btn-nav-rules:hover {
  border-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(251, 191, 36, 0.4) !important;
}

.btn-nav-bank {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 0.2) !important;
}

.btn-nav-bank:hover {
  border-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(251, 191, 36, 0.4) !important;
}

.btn-nav-chat {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(45, 212, 191, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(45, 212, 191, 0.2) !important;
}

.btn-nav-chat:hover,
.btn-nav-chat.panel-open {
  border-color: #2dd4bf !important;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(45, 212, 191, 0.45) !important;
}

.btn-nav-emotes {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(192, 132, 252, 0.2) !important;
}

.btn-nav-emotes:hover,
.btn-nav-emotes.panel-open {
  border-color: #c084fc !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(192, 132, 252, 0.45) !important;
}

.btn-nav-logs {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(168, 85, 247, 0.2) !important;
}

.btn-nav-logs:hover {
  border-color: #c084fc !important;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(168, 85, 247, 0.4) !important;
}

.btn-nav-settings {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.35), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(148, 163, 184, 0.15) !important;
}

.btn-nav-settings:hover {
  border-color: #cbd5e1 !important;
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(148, 163, 184, 0.35) !important;
}

.btn-nav-exit {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(239, 68, 68, 0.2) !important;
}

.btn-nav-exit .hud-nav-icon {
  color: #ef4444 !important;
  font-weight: 900 !important;
  font-size: 1.15rem !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6) !important;
}

.btn-nav-exit:hover {
  border-color: #ef4444 !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(239, 68, 68, 0.45) !important;
}

.top-bank-bar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  clear: both !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: none !important;
  padding: 3px 12px !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: auto !important;
  box-sizing: border-box !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 120 !important;
  overflow-x: auto !important;
  pointer-events: none !important;
}

.top-bank-bar * {
  pointer-events: auto !important;
}

.top-bank-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 10px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  color: #e2e8f0 !important;
  white-space: nowrap !important;
}

/* Responsive breakpoint: shrink labels on narrow screens and keep touch targets generous */
@media (max-width: 900px) {
  .btn-hud-top-nav .nav-label {
    display: none !important;
  }

  .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    padding: 0 !important;
    min-width: 38px !important;
    max-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
    touch-action: manipulation !important;
  }
}

@media (max-width: 650px) {
  .game-hud-top {
    padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
    padding-left: max(8px, env(safe-area-inset-left, 8px)) !important;
    padding-right: max(8px, env(safe-area-inset-right, 8px)) !important;
    padding-bottom: 4px !important;
    gap: 4px !important;
    overflow: visible !important;
  }

  .hud-top-left,
  .hud-top-right {
    gap: 4px !important;
  }

  .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    font-size: 1rem !important;
  }

  .top-bank-bar {
    padding: 2px 6px !important;
    gap: 6px !important;
    margin-top: 3px !important;
    margin-bottom: 3px !important;
  }

  .top-bank-item {
    font-size: 0.76rem !important;
    padding: 2px 7px !important;
  }
}

@media (max-width: 480px) {
  .game-hud-top {
    padding-top: max(10px, env(safe-area-inset-top, 10px)) !important;
    padding-left: max(6px, env(safe-area-inset-left, 6px)) !important;
    padding-right: max(6px, env(safe-area-inset-right, 6px)) !important;
    padding-bottom: 3px !important;
    gap: 3px !important;
  }

  .hud-top-left,
  .hud-top-right {
    gap: 3px !important;
  }

  .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

  .btn-hud-top-nav .hud-nav-icon svg,
  .game-hud-top .btn-hud-icon .hud-nav-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  .top-bank-bar {
    padding: 2px 4px !important;
    gap: 4px !important;
    margin-top: 2px !important;
    margin-bottom: 3px !important;
  }

  .top-bank-item {
    font-size: 0.72rem !important;
    padding: 2px 5px !important;
  }
}

@media (max-width: 380px) {
  .game-hud-top {
    padding-top: max(8px, env(safe-area-inset-top, 8px)) !important;
    padding-left: max(4px, env(safe-area-inset-left, 4px)) !important;
    padding-right: max(4px, env(safe-area-inset-right, 4px)) !important;
    padding-bottom: 2px !important;
    gap: 2px !important;
  }

  .hud-top-left,
  .hud-top-right {
    gap: 2px !important;
  }

  .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    border-radius: 9px !important;
    font-size: 0.82rem !important;
    margin: 0 !important;
  }

  .btn-hud-top-nav .hud-nav-icon svg,
  .game-hud-top .btn-hud-icon .hud-nav-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  .top-bank-bar {
    padding: 1px 3px !important;
    gap: 3px !important;
    margin-top: 1px !important;
    margin-bottom: 2px !important;
  }

  .top-bank-item {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }
}

/* ==========================================================================
   POPOVER DROPDOWN POSITIONING (Positioned directly underneath top buttons)
   ========================================================================== */
/* Permanently hide setup-action-banner (Aviso de Turno) */
#setup-action-banner {
  display: none !important;
}

/* ==========================================================================
   POPOVER / MODAL DROPDOWN POSITIONING
   ========================================================================== */
#rules-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 200000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: env(safe-area-inset-top, 10px) env(safe-area-inset-right, 10px) env(safe-area-inset-bottom, 10px) env(safe-area-inset-left, 10px) !important;
  box-sizing: border-box !important;
}

#rules-overlay.hidden {
  display: none !important;
}

#rules-overlay .overlay-content {
  position: relative !important;
  z-index: 200000001 !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  transform: none !important;
  width: min(580px, calc(100vw - 16px)) !important;
  max-height: min(92vh, 680px) !important;
  overflow: hidden !important;
  background: rgba(15, 23, 42, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  border-radius: 20px !important;
  padding: 18px 18px 14px 18px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(251, 191, 36, 0.2) !important;
  animation: modalPopIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

#rules-overlay .rules-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 480px) {
  #rules-overlay .overlay-content {
    padding: 12px 12px 10px 12px !important;
    border-radius: 16px !important;
    max-height: 94vh !important;
  }

  #rules-overlay .trade-modal-header h2 {
    font-size: 1.05rem !important;
  }
}

@media (max-width: 360px) {
  #rules-overlay .trade-modal-header h2 {
    font-size: 0.92rem !important;
  }
}

.rules-modal-footer {
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-launch-tutorial-banner {
  width: auto !important;
  max-width: 100% !important;
  padding: 8px 18px !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(2, 132, 199, 0.38)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
  border-radius: 12px !important;
  color: #38bdf8 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-launch-tutorial-banner:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  border-color: #7dd3fc !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45) !important;
}

.btn-launch-tutorial-banner:active {
  transform: translateY(0) scale(0.97) !important;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popoverSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   TRANSPARENT FULL-SCREEN OVERLAY & SLEEK FAST TRADE CONTAINER
   ========================================================================== */
#fast-trade-overlay.game-overlay,
#fast-trade-overlay {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#fast-trade-overlay.hidden {
  display: none !important;
}

/* Floating Glassmorphic Container for Fast Trade Content */
#fast-trade-overlay .overlay-content {
  pointer-events: auto !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid #fbbf24 !important;
  border-radius: 20px !important;
  padding: 16px 20px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(251, 191, 36, 0.25) !important;
  max-width: min(480px, calc(100vw - 20px)) !important;
  max-height: calc(100vh - 100px) !important;
  overflow-y: auto !important;
  margin: auto !important;
}

/* --- RESPONSIVE FAST TRADE BUTTONS & GRID --- */
.gold-options-grid,
#fast-trade-options {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 12px !important;
}

.btn-gold-option {
  width: 100% !important;
  padding: 12px 8px !important;
  border-radius: 14px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background: rgba(30, 41, 59, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-gold-option:active {
  transform: scale(0.96);
}

.btn-gold-option.wood {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.btn-gold-option.brick {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.btn-gold-option.sheep {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
}

.btn-gold-option.wheat {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}

.btn-gold-option.ore {
  border-color: #94a3b8;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.btn-gold-option.cancel,
.btn-gold-option.cancel-option {
  grid-column: 1 / -1 !important;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
  font-weight: 900 !important;
  margin-top: 4px !important;
}



@media (max-width: 480px) {
  .btn-gold-option {
    font-size: 0.82rem !important;
    padding: 10px 4px !important;
  }

  #fast-trade-overlay .overlay-content {
    padding: 12px 14px !important;
    width: calc(100vw - 16px) !important;
  }
}

/* --- DEV MODE & CHEAT TOOLBAR STYLES --- */
.dev-cheat-toolbar {
  position: absolute;
  top: 70px;
  left: 16px;
  z-index: 99;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(239, 68, 68, 0.6);
  border-radius: 9999px;
  padding: 4px 8px;
  display: flex;
  gap: 4px;
  align-items: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(239, 68, 68, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  animation: devToolbarGlow 2.5s infinite alternate ease-in-out;
  touch-action: none;
}

.dev-cheat-toolbar::-webkit-scrollbar {
  display: none;
}

.dev-cheat-tag {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 6px;
  padding-left: 2px;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}

.btn-dev-cheat {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease, box-shadow 0.18s ease;
  user-select: none;
  outline: none;
  box-sizing: border-box;
}

.btn-dev-cheat.dev-wood {
  background: rgba(34, 197, 94, 0.22);
  border: 1.5px solid #22c55e;
}

.btn-dev-cheat.dev-wood:hover {
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.btn-dev-cheat.dev-brick {
  background: rgba(239, 68, 68, 0.22);
  border: 1.5px solid #ef4444;
}

.btn-dev-cheat.dev-brick:hover {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.btn-dev-cheat.dev-sheep {
  background: rgba(168, 85, 247, 0.22);
  border: 1.5px solid #a855f7;
}

.btn-dev-cheat.dev-sheep:hover {
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.btn-dev-cheat.dev-wheat {
  background: rgba(234, 179, 8, 0.22);
  border: 1.5px solid #eab308;
}

.btn-dev-cheat.dev-wheat:hover {
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.6);
}

.btn-dev-cheat.dev-ore {
  background: rgba(148, 163, 184, 0.22);
  border: 1.5px solid #94a3b8;
}

.btn-dev-cheat.dev-ore:hover {
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.6);
}

.btn-dev-cheat.dev-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(99, 102, 241, 0.35));
  border: 1.5px solid #c084fc;
}

.btn-dev-cheat.dev-card:hover {
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.7);
}

.btn-dev-cheat.dev-vp {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.35));
  border: 1.5px solid #fbbf24;
}

.btn-dev-cheat.dev-vp:hover {
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.75);
}

.btn-dev-cheat.dev-stats {
  background: rgba(56, 189, 248, 0.22);
  border: 1.5px solid #38bdf8;
}

.btn-dev-cheat.dev-stats:hover {
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

@keyframes devToolbarGlow {
  0% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 8px rgba(239, 68, 68, 0.25);
  }

  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 18px rgba(239, 68, 68, 0.5);
  }
}

.btn-dev-cheat:hover {
  transform: translateY(-2px) scale(1.15);
  filter: brightness(1.25);
}

.btn-dev-cheat:active {
  transform: translateY(0) scale(0.92);
  filter: brightness(0.95);
}

.dev-match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
  .dev-cheat-toolbar {
    top: 56px;
    left: 8px;
    max-width: calc(100vw - 16px);
    padding: 3px 6px;
    gap: 3px;
    border-radius: 9999px;
    justify-content: flex-start;
  }

  .dev-cheat-tag {
    font-size: 1rem;
    padding-right: 5px;
  }

  .btn-dev-cheat {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    font-size: 1.05rem;
    border-radius: 8px;
  }
}

/* Mobile GPU Acceleration & Hardware Rendering Optimizations */
#kmkz-board-canvas,
#my-resources-hud,
.res-card-hud,
.action-bar-bottom,
.game-overlay,
.overlay-content,
.hex-card {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

/* ==========================================================================
   iOS & MOBILE HARDWARE THERMAL OPTIMIZATIONS (Eliminate GPU Spikes & Overheating)
   ========================================================================== */
@media (max-width: 1024px),
(hover: none) and (pointer: coarse) {

  /* Eliminate heavy real-time canvas backdrop blurs that overheat mobile GPUs */
  .action-bar-bottom,
  .turn-action-stripe,
  .chip-card,
  .hud-player-card,
  .hud-dice-widget,
  .floating-dice,
  .drawer-panel,
  .modal-glass,
  .login-card-glass,
  .dev-cheat-toolbar,
  .chat-hud,
  .notification-center-panel,
  .game-overlay,
  .overlay-content,
  .social-friends-panel,
  .custom-context-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Optimize compositing layers and avoid expensive subpixel repaints on iOS WebKit */
  #game-screen,
  #kmkz-board-canvas,
  .action-bar-bottom,
  .hud-top-bar {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }

  /* Ensure Turn Stripe keeps centered hardware-accelerated transform on mobile / touch */
  .turn-action-stripe:not(.has-custom-pos) {
    -webkit-transform: translate3d(-50%, 0, 0) !important;
    transform: translate3d(-50%, 0, 0) !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* Prevent inertial bounce and subpixel jitter during canvas touches */
  #kmkz-board-canvas {
    touch-action: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
}

/* ==========================================================================
   PREMIUM UNIFIED BOTTOM HUD DOCK â€” Complete Redesign
   Left: Resource Pills  |  Divider  |  Right: Action Controls
   ========================================================================== */

.action-bar-bottom {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 64px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 9px clamp(18px, 4vw, 56px) max(10px, env(safe-area-inset-bottom, 10px)) clamp(18px, 4vw, 56px) !important;
  background: linear-gradient(180deg,
      rgba(14, 22, 38, 0.96) 0%,
      rgba(9, 14, 26, 0.98) 50%,
      rgba(5, 8, 16, 0.99) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: none !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 18px 18px 0 0 !important;
  box-shadow:
    0 -12px 42px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 35px rgba(251, 191, 36, 0.12) !important;
  z-index: 900 !important;
  box-sizing: border-box !important;
  transition: box-shadow 0.3s ease !important;
}

.action-bar-bottom::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(56, 189, 248, 0.45) 12%,
      #fbbf24 35%,
      #f59e0b 50%,
      #fbbf24 65%,
      rgba(56, 189, 248, 0.45) 88%,
      transparent 100%) !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.8), 0 0 6px rgba(56, 189, 248, 0.6) !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

/* â”€â”€ Left Section: Resource Pill Row â”€â”€ */
.my-resources-hud {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Resource Pill Base -> Authentic Vertical Rectangular Kmkz Card */
.res-card-hud {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 2px !important;
  width: 50px !important;
  min-width: 48px !important;
  height: 74px !important;
  min-height: 74px !important;
  padding: 6px 3px 5px 3px !important;
  border-radius: 8px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(15, 23, 42, 0.88) !important;
  cursor: pointer !important;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    border-color 0.2s ease !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Subtle top gloss */
.res-card-hud::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 40% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%) !important;
  border-radius: 13px 13px 0 0 !important;
  pointer-events: none !important;
}

.res-card-hud:hover {
  transform: translateY(-5px) scale(1.06) !important;
  z-index: 10 !important;
}

.res-card-hud:active {
  transform: translateY(-2px) scale(0.97) !important;
}

/* Zero state: dimmed */
.res-card-hud.is-zero {
  opacity: 0.38 !important;
  filter: grayscale(0.6) !important;
  transform: scale(0.94) !important;
  box-shadow: none !important;
}

/* Has-cards state: glowing per resource */
.res-card-hud:not(.is-zero) {
  opacity: 1 !important;
  filter: none !important;
}

/* Count Badge â€” punchy number */
.res-count {
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease !important;
}

.res-count.pop {
  transform: scale(1.7) !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.95) !important;
}

.res-emoji {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7)) !important;
  transition: transform 0.18s ease !important;
}

.res-card-hud:hover .res-emoji {
  transform: scale(1.2) rotate(-5deg) !important;
}

/* Per-resource glow colors */
.res-card-hud.wood:not(.is-zero) {
  border-color: #22c55e !important;
  background: linear-gradient(160deg, rgba(21, 128, 61, 0.55), rgba(6, 46, 27, 0.8)) !important;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(134, 239, 172, 0.18) !important;
}

.res-card-hud.brick:not(.is-zero) {
  border-color: #f97316 !important;
  background: linear-gradient(160deg, rgba(194, 65, 12, 0.55), rgba(67, 20, 7, 0.8)) !important;
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.35), inset 0 1px 0 rgba(253, 186, 116, 0.18) !important;
}

.res-card-hud.sheep:not(.is-zero) {
  border-color: #84cc16 !important;
  background: linear-gradient(160deg, rgba(101, 163, 13, 0.7), rgba(26, 46, 5, 0.92)) !important;
  box-shadow: 0 4px 18px rgba(132, 204, 22, 0.42), inset 0 1px 0 rgba(217, 249, 157, 0.22) !important;
}

.res-card-hud.wheat:not(.is-zero) {
  border-color: #f59e0b !important;
  background: linear-gradient(160deg, rgba(217, 119, 6, 0.55), rgba(69, 26, 3, 0.8)) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(253, 230, 138, 0.18) !important;
}

.res-card-hud.ore:not(.is-zero) {
  border-color: #cbd5e1 !important;
  background: linear-gradient(160deg, rgba(71, 85, 105, 0.65), rgba(15, 23, 42, 0.9)) !important;
  box-shadow: 0 4px 18px rgba(148, 163, 184, 0.45), inset 0 1px 0 rgba(226, 232, 240, 0.25) !important;
}

.res-card-hud.total {
  border-color: #38bdf8 !important;
  background: linear-gradient(160deg, rgba(3, 105, 161, 0.5), rgba(12, 74, 110, 0.8)) !important;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3), inset 0 1px 0 rgba(125, 211, 252, 0.15) !important;
  margin-left: 2px !important;
}

.res-card-hud.total.exceeded-limit {
  border-color: #ef4444 !important;
  background: linear-gradient(160deg, rgba(153, 27, 27, 0.7), rgba(69, 10, 10, 0.9)) !important;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.85), inset 0 1px 0 rgba(252, 165, 165, 0.25) !important;
  animation: pulseCardLimit 0.9s infinite alternate cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* â”€â”€ Divider â”€â”€ */
.hud-dock-divider {
  width: 1px !important;
  height: 36px !important;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(251, 191, 36, 0.35) 35%,
      rgba(251, 191, 36, 0.35) 65%,
      transparent 100%) !important;
  flex-shrink: 0 !important;
  margin: 0 2px !important;
}

/* â”€â”€ Right Section: Action Controls â”€â”€ */
.action-bar-right-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  flex-shrink: 0 !important;
}

/* Timer Widget */
.timer-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(9, 17, 32, 0.9) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 14px !important;
  padding: 4px 10px !important;
  min-width: 48px !important;
  height: 50px !important;
  box-sizing: border-box !important;
  gap: 2px !important;
}

.timer-box .timer-label {
  font-size: 1.0rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums !important;
}


/* Dice Widget */
.floating-dice-hud.interactive-dice,
#floating-dice {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 4px 10px !important;
  border-radius: 16px !important;
  background: linear-gradient(160deg, rgba(20, 30, 48, 0.95), rgba(10, 16, 28, 0.98)) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  box-sizing: border-box !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.floating-dice-hud:not(.disabled),
#floating-dice:not(.disabled) {
  border-color: rgba(251, 191, 36, 0.85) !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  animation: diceGlowPulse 2s infinite ease-in-out !important;
}

.floating-dice-hud.disabled,
#floating-dice.disabled {
  opacity: 0.78 !important;
  cursor: default !important;
  animation: none !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

.floating-dice-hud .die:not(.has-cube-3d) {
  width: 34px !important;
  height: 34px !important;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0) !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 9px !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 1.05rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* Action Buttons â€” premium pills */
.btn-action-round {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 58px !important;
  height: 50px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, filter 0.15s ease !important;
  touch-action: manipulation !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

/* Top gloss on buttons */
.btn-action-round::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 38% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%) !important;
  border-radius: 15px 15px 0 0 !important;
  pointer-events: none !important;
}

.btn-action-round:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65) !important;
  filter: brightness(1.15) !important;
}

.btn-action-round:active:not(:disabled) {
  transform: translateY(1px) scale(0.96) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.btn-action-round .btn-icon {
  font-size: 1.3rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)) !important;
}

.btn-action-round .btn-label-sub {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.75) !important;
  line-height: 1 !important;
}

/* Button color themes */
#btn-buy-dev-card,
.btn-action-round.devcard {
  background: linear-gradient(160deg, #d97706 0%, #b45309 60%, #78350f 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.5), inset 0 1px 0 rgba(254, 240, 138, 0.45) !important;
}

#btn-buy-dev-card .btn-icon,
.btn-action-round.devcard .btn-icon {
  color: #fef08a !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)) !important;
}

#btn-buy-dev-card .btn-label-sub,
.btn-action-round.devcard .btn-label-sub {
  color: #fef3c7 !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

#btn-buy-dev-card:hover:not(:disabled),
.btn-action-round.devcard:hover:not(:disabled) {
  background: linear-gradient(160deg, #f59e0b 0%, #d97706 60%, #92400e 100%) !important;
  border-color: #fef08a !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.7), 0 0 16px rgba(251, 191, 36, 0.55) !important;
}

.btn-action-round.trade {
  background: linear-gradient(160deg, rgba(3, 105, 161, 0.85), rgba(7, 89, 133, 0.95)) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.4), inset 0 1px 0 rgba(125, 211, 252, 0.2) !important;
}

.btn-action-round.trade .btn-label-sub {
  color: #bae6fd !important;
}

#btn-recycle-mode {
  display: none !important;
}

#btn-recycle-mode.recycle-enabled {
  display: inline-flex !important;
}

.btn-action-round.recycle {
  background: linear-gradient(160deg, rgba(5, 150, 105, 0.85), rgba(4, 120, 87, 0.95)) !important;
  border-color: #34d399 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(110, 231, 183, 0.2) !important;
}

.btn-action-round.recycle .btn-label-sub {
  color: #a7f3d0 !important;
}

.btn-action-round.recycle.active-recycle {
  background: linear-gradient(160deg, #10b981, #059669) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.85), 0 0 36px rgba(52, 211, 153, 0.55) !important;
  animation: recyclePulse 1s infinite alternate ease-in-out !important;
}

/* Pass button â€” most prominent â€” slightly wider */
.btn-action-round.pass {
  background: linear-gradient(160deg, rgba(5, 150, 105, 0.9), rgba(4, 120, 87, 0.98)) !important;
  border-color: #34d399 !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.45), inset 0 1px 0 rgba(110, 231, 183, 0.25) !important;
  width: 66px !important;
}

.btn-action-round.pass .btn-label-sub {
  color: #a7f3d0 !important;
}

#btn-end-turn:not(:disabled) {
  background: linear-gradient(160deg, #059669, #047857) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 18px rgba(5, 150, 105, 0.6), 0 4px 16px rgba(5, 150, 105, 0.4), inset 0 1px 0 rgba(110, 231, 183, 0.25) !important;
  animation: passGlowPulse 2s infinite ease-in-out !important;
}

#btn-end-turn:not(:disabled):hover {
  background: linear-gradient(160deg, #10b981, #059669) !important;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.75), 0 8px 20px rgba(5, 150, 105, 0.5) !important;
}

@keyframes passGlowPulse {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.5), 0 4px 14px rgba(5, 150, 105, 0.3), inset 0 1px 0 rgba(110, 231, 183, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7), 0 5px 16px rgba(5, 150, 105, 0.4), inset 0 1px 0 rgba(110, 231, 183, 0.25);
  }
}

#btn-buy-dev-card.can-buy,
.btn-action-round.devcard.can-buy {
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.75), 0 4px 14px rgba(217, 119, 6, 0.5), inset 0 0 10px rgba(251, 191, 36, 0.35) !important;
  border-color: #fde047 !important;
}

.btn-action-round:disabled {
  opacity: 0.32 !important;
  filter: grayscale(0.65) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* â”€â”€ Dev Card Hold Progress Ring â”€â”€ */
.btn-action-round.devcard {
  overflow: hidden !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.btn-action-round.devcard .hold-progress-ring {
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  background: conic-gradient(#ec4899 0%, transparent 0%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.15s ease !important;
  z-index: 1 !important;
}

.btn-action-round.devcard.holding-dev-card {
  transform: scale(1.12) !important;
  box-shadow: 0 0 28px rgba(236, 72, 153, 0.9), 0 0 44px rgba(168, 85, 247, 0.8) !important;
}

.btn-action-round.devcard.holding-dev-card .hold-progress-ring {
  opacity: 0.88 !important;
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
  .action-bar-bottom {
    /* Force full-width anchored to bottom — with safe-area inset elevation */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 18px 18px 0 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px max(10px, env(safe-area-inset-left, 10px)) max(12px, env(safe-area-inset-bottom, 12px)) max(10px, env(safe-area-inset-right, 10px)) !important;
    min-height: 72px !important;
    background: linear-gradient(180deg, rgba(14, 22, 38, 0.97) 0%, rgba(9, 14, 26, 0.99) 50%, rgba(5, 8, 16, 1) 100%) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: none !important;
    border-top: 1.5px solid rgba(251, 191, 36, 0.45) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 30px rgba(251, 191, 36, 0.15) !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }

  /* Row 1: Resources */
  .my-resources-hud {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }

  .res-card-hud {
    flex: 1 1 0px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 52px !important;
    height: 66px !important;
    min-height: 66px !important;
    padding: 5px 2px 4px !important;
    border-radius: 8px !important;
    touch-action: manipulation !important;
  }

  /* Row 2: Action Controls */
  .action-bar-right-controls {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .hud-dock-divider {
    display: none !important;
  }

  .timer-box {
    height: 46px !important;
    min-height: 46px !important;
    min-width: 44px !important;
    padding: 4px 8px !important;
  }

  .floating-dice-hud.interactive-dice {
    height: 46px !important;
    min-height: 46px !important;
    padding: 4px 6px !important;
    gap: 5px !important;
  }

  .floating-dice-hud .die.has-cube-3d {
    --cube-sz: 30px;
    --cube-half: 15px;
  }

  .floating-dice-hud .die.has-cube-3d .die-shadow-3d {
    width: 22px;
    left: 4px;
    bottom: -2px;
  }

  .floating-dice-hud .die:not(.has-cube-3d) {
    width: 30px !important;
    height: 30px !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
  }

  .btn-action-round {
    flex: 1 1 0px !important;
    width: auto !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 13px !important;
    touch-action: manipulation !important;
  }

  .pass-btn-container {
    flex: 1.4 1 0px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .pass-btn-container .btn-action-round.pass {
    width: 100% !important;
    flex: 1 1 100% !important;
    height: 46px !important;
  }

  .pass-turn-reminder-bubble {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    bottom: calc(100% + 6px) !important;
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
    max-width: 140px !important;
    white-space: nowrap !important;
    border-radius: 14px !important;
  }

  .pass-turn-reminder-bubble::after {
    right: 20px !important;
    left: auto !important;
    transform: none !important;
  }

  .btn-action-round .btn-icon {
    font-size: 1.15rem !important;
  }

  .btn-action-round .btn-label-sub {
    font-size: 0.7rem !important;
  }

  /* Tactile press feedback */
  .btn-action-round:active,
  .res-card-hud:active {
    transform: scale(0.93) !important;
    filter: brightness(1.25) !important;
  }
}

/* Floating Confirmation Popover for Buying Dev Card */
.devcard-confirm-popover {
  position: absolute !important;
  bottom: 72px !important;
  right: 0 !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.6) !important;
  border-radius: 18px !important;
  padding: 12px 16px !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(168, 85, 247, 0.35) !important;
  z-index: 1000 !important;
  width: 200px !important;
  box-sizing: border-box !important;
  animation: devConfirmPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes devConfirmPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.devcard-confirm-popover.hidden {
  display: none !important;
}

.confirm-popover-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.confirm-popover-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #f3e8ff;
}

.confirm-popover-cost {
  font-size: 0.78rem;
  font-weight: 700;
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.18);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.confirm-popover-status {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 6px;
}

.confirm-popover-status.success {
  color: #34d399;
}

.confirm-popover-status.error {
  color: #f87171;
}

.confirm-popover-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.btn-confirm-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.35rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-confirm-opt.accept {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-confirm-opt.accept:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.7);
}

.btn-confirm-opt.accept:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
  box-shadow: none;
}

.btn-confirm-opt.reject {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-confirm-opt.reject:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.7);
}

.btn-confirm-opt.reject:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6);
}

/* Positioning Dev Cards HUD right above action bar bottom */
#dev-cards-hud:not(.hidden) {
  position: fixed !important;
  bottom: calc(var(--bottom-dock-height, 80px) + 10px) !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  z-index: 2500 !important;
  width: min(540px, calc(100vw - 28px)) !important;
  max-height: min(420px, calc(100vh - var(--bottom-dock-height, 80px) - 24px)) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.25) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.45) !important;
  background: rgba(13, 20, 36, 0.96) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border-radius: 20px !important;
}

@media (max-width: 768px) {
  #dev-cards-hud:not(.hidden) {
    bottom: calc(var(--bottom-dock-height, 148px) + 8px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 16px) !important;
    max-width: 480px !important;
    max-height: min(380px, calc(100vh - var(--bottom-dock-height, 148px) - 20px)) !important;
  }
}

/* ==========================================================================
   INDEX BOTTOM NAVIGATION & SHOP OPTIMIZATIONS
   ========================================================================== */

/* Fast Smooth Scroll Navigation Bar */
.hex-nav-bar {
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x proximity !important;
  touch-action: pan-x !important;
}

.hex-nav-btn {
  scroll-snap-align: center !important;
  min-height: 44px !important;
  touch-action: manipulation !important;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease !important;
}

.hex-nav-btn:active {
  transform: scale(0.92) !important;
}

/* Responsive Modern Shop Modal */
.shop-tabs {
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x proximity !important;
}

.shop-tab-btn {
  scroll-snap-align: start !important;
  min-height: 44px !important;
  padding: 8px 14px !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  border-radius: 14px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   MOBILE-FIRST OVERHAULED SHOP SYSTEM
   ========================================================================== */

.shop-header-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  width: 100% !important;
  margin-bottom: 12px !important;
}

.shop-coins-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #38bdf8 !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  margin-top: 4px !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

.shop-category-wrapper {
  width: 100% !important;
  margin-bottom: 12px !important;
}

/* Mobile Category Select Dropdown */
.shop-category-select {
  display: block !important;
  width: 100% !important;
  padding: 10px 14px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1.5px solid #38bdf8 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Desktop & Mobile Horizontal Swipable Tab Pills */
.shop-tabs-pills {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 2px 8px 2px !important;
  scrollbar-width: thin !important;
  scroll-snap-type: x proximity !important;
  -webkit-overflow-scrolling: touch !important;
}

.shop-tab-btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  scroll-snap-align: start !important;
  padding: 8px 14px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.shop-tab-btn:hover {
  transform: translateY(-2px) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

.shop-tab-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.4), rgba(56, 189, 248, 0.5)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4) !important;
}

/* Horizontal Swipable Items Carousel Inside Container */
.shop-carousel-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 4px !important;
}

.btn-shop-nav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-shop-nav.prev {
  left: 2px !important;
}

.btn-shop-nav.next {
  right: 2px !important;
}

.btn-shop-nav:hover {
  background: #38bdf8 !important;
  color: #0f172a !important;
  transform: translateY(-50%) scale(1.12) !important;
}

.shop-items-carousel {
  display: flex !important;
  flex-direction: row !important;
  gap: 14px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 40px 14px 40px !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
}

.shop-items-carousel>div {
  flex: 0 0 min(220px, 70vw) !important;
  width: min(220px, 70vw) !important;
  scroll-snap-align: center !important;
  flex-shrink: 0 !important;
}

/* Compact & Customizable Profile Card */
.profile-compact-card {
  padding: 16px 14px !important;
  gap: 10px !important;
  max-width: 440px !important;
  width: 100% !important;
}

.profile-avatar-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
}

.profile-avatar-frame-glow {
  position: relative !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  padding: 2px !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5) !important;
  flex-shrink: 0 !important;
}

.profile-avatar-circle {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  background: #0f172a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.profile-header-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.profile-username-row {
  display: flex !important;
  gap: 6px !important;
  width: 100% !important;
}

.profile-username-row input {
  flex: 1 !important;
  padding: 6px 10px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
}

.profile-user-title-badge {
  display: inline-block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.profile-stats-pills {
  display: flex !important;
  gap: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.profile-stat-pill {
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.profile-color-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  align-items: flex-start !important;
}

.profile-section-label {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
}

.profile-color-swatches {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.color-swatch-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  font-size: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.color-swatch-btn:hover {
  transform: scale(1.15) !important;
  border-color: #38bdf8 !important;
}

.color-swatch-btn.active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.9) !important;
  transform: scale(1.18) !important;
  background: rgba(56, 189, 248, 0.25) !important;
}

.profile-avatar-skin-section {
  width: 100% !important;
  margin-top: 2px !important;
}

.profile-skin-select {
  flex: 1 !important;
  padding: 8px 10px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

.shop-items-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  overflow-y: auto !important;
  max-height: 52vh !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
}

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

/* ==========================================================================
   HEXAGONAL KMKZ THEMATIC SYSTEM (Enforcing Specified Color Palette)
   ========================================================================== */

/* Background de menÃº: #0F172A */
#lobby-screen,
#room-lobby-screen,
#app-container,
body {
  background: #0F172A !important;
}

#lobby-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 0),
    url("data:image/svg+xml,%3Csvg width='56' height='97' viewBox='0 0 56 97' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 0l28 16.166v32.333L28 64.666 0 48.499V16.166L28 0zm0 32.333l14 8.083v16.166L28 64.666l-14-8.084V40.416l14-8.083z' fill='%2338bdf8' fill-opacity='0.04' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Tarjetas / Contenedores Glassmorphism Moderno sin Chaflanes */
.rectangular-card-inner,
.card,
.shop-modal,
.room-players-card,
.room-config-card {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  position: relative !important;
}

.rectangular-card-inner::after {
  display: none !important;
}

/* BotÃ³n Primario: Fondo #38BDF8, Texto #0F172A */
.btn-primary,
.btn-accent,
.btn-hero {
  background: #38BDF8 !important;
  color: #0F172A !important;
  border: none !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3) !important;
}

.btn-primary:hover,
.btn-accent:hover,
.btn-hero:hover {
  background: #7DD3FC !important;
  color: #0F172A !important;
  transform: translateY(-2px) !important;
}

/* BotÃ³n Secundario: Fondo #1E293B, Texto #F1F5F9, Borde #334155 */
.btn-secondary {
  background: #1E293B !important;
  color: #F1F5F9 !important;
  border: 1.5px solid #334155 !important;
  font-weight: 800 !important;
}

.btn-secondary:hover {
  background: #334155 !important;
  color: #FFFFFF !important;
  border-color: #38BDF8 !important;
}

/* Detalles / Notificaciones: #F59E0B (Naranja) */
.hex-badge,
.shop-coins-badge,
.detail-notification,
.toast-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1.5px solid #F59E0B !important;
  color: #F59E0B !important;
  font-weight: 900 !important;
}

.hex-title {
  color: #38BDF8 !important;
}

.hex-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  margin: 6px auto 0 auto;
  background: linear-gradient(90deg, transparent, #F59E0B, transparent);
  border-radius: 2px;
}

/* Hexagonal Input Controls */
.profile-edit-box input,
.profile-recovery-box input,
.config-group select,
.detail-item select {
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border: 1.5px solid #334155 !important;
}

/* ==========================================================================
   UNIVERSAL HIGH-CONTRAST TEXT & LEGIBILITY GUARANTEE FOR INDEX
   ========================================================================== */

/* All headings, labels, paragraphs, table rows, and descriptions */
body,
#app-container,
#lobby-screen,
.screen {
  color: #F1F5F9 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
label,
span,
div,
td,
th,
li,
a,
.hex-desc,
.recovery-label,
.detail-item,
.profile-section-label,
.room-title,
.friend-name,
.leaderboard-name {
  color: #F1F5F9;
}

.hex-title {
  color: #38BDF8 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7) !important;
}

.hex-desc {
  color: #CBD5E1 !important;
}

/* Ensure inputs, textareas, and select dropdown options are 100% readable */
input,
select,
textarea {
  color: #F1F5F9 !important;
  background-color: #0F172A !important;
}

input::placeholder,
textarea::placeholder {
  color: #94A3B8 !important;
}

select option {
  background-color: #0F172A !important;
  color: #F1F5F9 !important;
  padding: 8px 12px !important;
}

/* Primary buttons: High-contrast dark text on bright cyan background */
.btn-primary,
.btn-accent,
.btn-hero {
  background: #38BDF8 !important;
  color: #0F172A !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

.btn-primary:hover,
.btn-accent:hover,
.btn-hero:hover {
  background: #7DD3FC !important;
  color: #0F172A !important;
}

/* Secondary buttons: High-contrast bright white text on slate background */
.btn-secondary {
  background: #1E293B !important;
  color: #F1F5F9 !important;
  border: 1.5px solid #334155 !important;
  font-weight: 800 !important;
}

.btn-secondary:hover {
  background: #334155 !important;
  color: #FFFFFF !important;
  border-color: #38BDF8 !important;
}

/* ==========================================================================
   FULL-PAGE PRIVATE PROFILE DASHBOARD SYSTEM
   ========================================================================== */

.game-overlay,
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1300 !important;
  background: rgba(5, 11, 20, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transition: opacity 0.25s ease !important;
}

.game-overlay.hidden,
.modal-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modal-confirm-logout.modal-overlay {
  z-index: 10000030 !important;
}

#modal-confirm-logout.modal-overlay:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-confirm-logout.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   MODAL CONFIRMACIÓN ARCADE (KMKZ)
   ========================================================================== */
#modal-confirm-arcade.modal-overlay {
  z-index: 10000030 !important;
}

#modal-confirm-arcade.modal-overlay:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-confirm-arcade.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.confirm-arcade-modal {
  animation: modalArcadePopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalArcadePopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 480px) {
  .confirm-arcade-modal {
    width: 95% !important;
    border-radius: 20px !important;
  }

  .confirm-arcade-modal .modal-body {
    padding: 22px 16px !important;
  }
}

/* ==========================================================================
   MODAL AVISO LEGAL, PRIVACIDAD & CUMPLIMIENTO (IN-APP)
   A11y (WCAG 2.1 AA/AAA), Responsive & Enterprise Glassmorphism
   ========================================================================== */
#modal-app-legal.modal-overlay {
  z-index: 10000035 !important;
  background: rgba(10, 15, 29, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

#modal-app-legal.modal-overlay:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: center !important;
}

#modal-app-legal.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.legal-modal-container {
  width: min(680px, 94vw) !important;
  max-height: min(88vh, 820px) !important;
  background: linear-gradient(168deg, rgba(26, 34, 56, 0.98) 0%, rgba(15, 23, 42, 0.99) 100%) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.35) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.82), 0 0 35px rgba(255, 215, 0, 0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  animation: legalModalAppear 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes legalModalAppear {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.legal-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px 16px 24px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.5) 100%) !important;
}

.legal-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.legal-header-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  color: #FBBF24 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2) !important;
}

.legal-title-text-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.legal-modal-title {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #F8FAFC !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
}

.legal-modal-subtitle {
  margin: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #94A3B8 !important;
  line-height: 1.4 !important;
}

.legal-badges-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 24px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
}

.legal-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

.legal-badge-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.legal-badge-pill.emerald {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34D399 !important;
}

.legal-badge-pill.emerald .legal-badge-dot {
  background: #10B981 !important;
  box-shadow: 0 0 6px #10B981 !important;
}

.legal-badge-pill.cyan {
  background: rgba(6, 182, 212, 0.12) !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  color: #38BDF8 !important;
}

.legal-badge-pill.cyan .legal-badge-dot {
  background: #06B6D4 !important;
  box-shadow: 0 0 6px #06B6D4 !important;
}

.legal-badge-pill.gold {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #FBBF24 !important;
}

.legal-badge-pill.gold .legal-badge-dot {
  background: #F59E0B !important;
  box-shadow: 0 0 6px #F59E0B !important;
}

.legal-badge-pill.purple {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #C084FC !important;
}

.legal-badge-pill.purple .legal-badge-dot {
  background: #A855F7 !important;
  box-shadow: 0 0 6px #A855F7 !important;
}

.legal-modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 18px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(148, 163, 184, 0.35) rgba(15, 23, 42, 0.4) !important;
}

.legal-modal-body:focus-visible {
  outline: 2px solid #38BDF8 !important;
  outline-offset: -2px !important;
}

.legal-modal-body::-webkit-scrollbar {
  width: 6px !important;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 4px !important;
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35) !important;
  border-radius: 4px !important;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55) !important;
}

.legal-section-card {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease !important;
}

.legal-section-card:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(255, 215, 0, 0.3) !important;
  transform: translateY(-1px) !important;
}

.legal-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 6px !important;
}

.legal-card-header .ui-svg-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}

.legal-card-header .ui-svg-icon.emerald {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34D399 !important;
}

.legal-card-header .ui-svg-icon.cyan {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #38BDF8 !important;
}

.legal-card-header .ui-svg-icon.gold {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #FBBF24 !important;
}

.legal-card-header .ui-svg-icon.purple {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #C084FC !important;
}

.legal-card-title {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #F1F5F9 !important;
  letter-spacing: -0.01em !important;
}

.legal-card-desc {
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.55 !important;
  color: #CBD5E1 !important;
  padding-left: 38px !important;
}

.legal-external-hub {
  margin-top: 6px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.legal-hub-title {
  margin: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #94A3B8 !important;
}

.legal-external-link-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 10px !important;
}

.btn-legal-external {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  min-height: 48px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  text-decoration: none !important;
  color: #E2E8F0 !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.btn-legal-external .ui-svg-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.btn-legal-text {
  flex: 1 1 auto !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-legal-arrow {
  font-size: 1rem !important;
  color: #94A3B8 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-legal-external:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  border-color: #38BDF8 !important;
  color: #FFFFFF !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

.btn-legal-external:hover .btn-legal-arrow {
  color: #38BDF8 !important;
  transform: translate(2px, -2px) !important;
}

.btn-legal-external:focus-visible {
  outline: 2px solid #38BDF8 !important;
  outline-offset: 2px !important;
}

.legal-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 14px 24px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
  background: rgba(15, 23, 42, 0.7) !important;
}

.btn-legal-accept {
  min-height: 48px !important;
  min-width: 180px !important;
  padding: 10px 24px !important;
  border-radius: 12px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #0F172A !important;
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%) !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-legal-accept:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-1px) !important;
}

.btn-legal-accept:active {
  transform: translateY(1px) !important;
}

.btn-legal-accept:focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: 2px !important;
}

/* Responsivo para móviles y pantallas reducidas */
@media (max-width: 580px) {
  .legal-modal-container {
    width: 96vw !important;
    max-height: 92vh !important;
    border-radius: 16px !important;
  }

  .legal-modal-header {
    padding: 16px 18px 12px 18px !important;
  }

  .legal-header-icon {
    width: 38px !important;
    height: 38px !important;
  }

  .legal-modal-title {
    font-size: 1.02rem !important;
  }

  .legal-modal-subtitle {
    font-size: 0.74rem !important;
  }

  .legal-badges-bar {
    padding: 8px 16px !important;
    gap: 6px !important;
  }

  .legal-badge-pill {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
  }

  .legal-modal-body {
    padding: 14px 16px !important;
    gap: 10px !important;
  }

  .legal-card-desc {
    padding-left: 0 !important;
    margin-top: 4px !important;
  }

  .legal-external-link-row {
    grid-template-columns: 1fr !important;
  }

  .legal-modal-footer {
    padding: 12px 16px !important;
  }

  .btn-legal-accept {
    width: 100% !important;
  }
}

/* ==========================================================================
   MODAL: SANTUARIO DE PRESTIGIO & FORJA ASTRAL (KMKZ PRESTIGE CHAMBER)
   ========================================================================== */

#modal-star-forge {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000030 !important;
  background: rgba(5, 10, 20, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

#modal-star-forge.hidden {
  display: none !important;
}

.star-forge-modal-card {
  background: linear-gradient(180deg, #0F172A 0%, #090E1A 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 158, 11, 0.18) !important;
  border-radius: 20px !important;
  width: min(760px, 95vw) !important;
  max-height: min(92vh, 860px) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Botón cerrar accesible */
.btn-close-star-forge {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #94A3B8 !important;
  font-size: 1.25rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-close-star-forge:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #EF4444 !important;
  color: #F87171 !important;
  transform: scale(1.05) !important;
}

.btn-close-star-forge:focus-visible {
  outline: 2px solid #F59E0B !important;
  outline-offset: 2px !important;
}

/* Cabecera modal */
.star-forge-modal-head {
  padding: 20px 24px 18px 24px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.22) !important;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-sizing: border-box !important;
}

.star-forge-icon-glow {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #FBBF24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.28) !important;
}

.star-forge-head-text {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.star-forge-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.star-forge-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #F8FAFC !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

.star-forge-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #F59E0B !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 20px !important;
  padding: 3px 10px !important;
}

.star-forge-subtitle {
  margin: 0 !important;
  font-size: 0.85rem !important;
  color: #94A3B8 !important;
  line-height: 1.4 !important;
}

/* Cuerpo con scroll accesible */
.star-forge-modal-content {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 20px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(245, 158, 11, 0.4) rgba(15, 23, 42, 0.6) !important;
  box-sizing: border-box !important;
}

.star-forge-modal-content:focus-visible {
  outline: 2px solid #F59E0B !important;
  outline-offset: -2px !important;
}

.star-forge-modal-content::-webkit-scrollbar {
  width: 6px !important;
}

.star-forge-modal-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 4px !important;
}

.star-forge-modal-content::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.35) !important;
  border-radius: 4px !important;
}

.star-forge-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6) !important;
}

/* Tarjeta Hero de Estado y Estrellas */
.star-forge-hero-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

.star-forge-hero-profile {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.star-forge-badge-emblem {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
  border: 2px solid #F59E0B !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.star-forge-status-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.star-forge-status-label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #94A3B8 !important;
  text-transform: uppercase !important;
}

.star-forge-badge-val {
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: #F8FAFC !important;
  letter-spacing: 0.02em !important;
}

.star-forge-status-sub {
  font-size: 0.8rem !important;
  color: #38BDF8 !important;
  font-weight: 600 !important;
}

.star-forge-stars-summary {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 14px !important;
  padding: 10px 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.star-forge-stars-icon-anim {
  font-size: 1.8rem !important;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6)) !important;
  animation: starPulse 2.5s infinite ease-in-out !important;
}

@keyframes starPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.star-forge-stars-data {
  display: flex !important;
  flex-direction: column !important;
}

.star-forge-stars-count-num {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #FBBF24 !important;
  line-height: 1.1 !important;
}

.star-forge-stars-count-lbl {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #94A3B8 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Barra de progreso */
.star-forge-progress-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: rgba(30, 41, 59, 0.5) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
}

.star-forge-progress-info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.82rem !important;
}

.star-forge-prog-label {
  color: #CBD5E1 !important;
  font-weight: 600 !important;
}

.star-forge-prog-val {
  color: #FBBF24 !important;
  font-weight: 700 !important;
}

.star-forge-progress-bar {
  width: 100% !important;
  height: 10px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.star-forge-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #D97706 0%, #FBBF24 50%, #38BDF8 100%) !important;
  border-radius: 8px !important;
  transition: width 0.4s ease-out !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
}

/* Sección de Ventajas Activas */
.star-forge-perks-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.star-forge-section-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.star-forge-section-title {
  margin: 0 !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: #E2E8F0 !important;
  text-transform: uppercase !important;
}

.star-forge-perks-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}

.star-forge-perk-card {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.star-forge-perk-card:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

.star-forge-perk-card.gold {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.star-forge-perk-card.cyan {
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.star-forge-perk-card.purple {
  border-color: rgba(168, 85, 247, 0.35) !important;
}

.perk-card-top {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.perk-card-icon {
  font-size: 1.15rem !important;
}

.perk-card-title {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #94A3B8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.perk-card-value {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #F8FAFC !important;
}

.star-forge-perk-card.gold .perk-card-value {
  color: #FBBF24 !important;
}

.star-forge-perk-card.cyan .perk-card-value {
  color: #38BDF8 !important;
}

.star-forge-perk-card.purple .perk-card-value {
  color: #C084FC !important;
}

.perk-card-desc {
  font-size: 0.74rem !important;
  color: #64748B !important;
  line-height: 1.35 !important;
}

/* La Forja Astral (Action Card) */
.star-forge-action-card {
  background: linear-gradient(135deg, rgba(30, 20, 10, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 16px !important;
  padding: 18px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12) !important;
}

.star-forge-action-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

.star-forge-fire-icon {
  font-size: 1.8rem !important;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6)) !important;
  flex-shrink: 0 !important;
}

.star-forge-action-titles {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.star-forge-action-title {
  margin: 0 !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #FBBF24 !important;
}

.star-forge-action-desc {
  margin: 0 !important;
  font-size: 0.82rem !important;
  color: #CBD5E1 !important;
  line-height: 1.4 !important;
}

.star-forge-action-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.star-forge-balance-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 8px 14px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.15) !important;
}

.star-forge-balance-label {
  font-size: 0.82rem !important;
  color: #94A3B8 !important;
  font-weight: 600 !important;
}

.star-forge-balance-val {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #FBBF24 !important;
}

/* Botón Forjar Estrella */
.btn-buy-star-action {
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #B45309 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #0F172A !important;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 20px !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.btn-buy-star-action:hover:not(:disabled) {
  filter: brightness(1.1) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.5) !important;
}

.btn-buy-star-action:active:not(:disabled) {
  transform: translateY(1px) !important;
}

.btn-buy-star-action:focus-visible {
  outline: 3px solid #38BDF8 !important;
  outline-offset: 2px !important;
}

.btn-buy-star-action:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.5) !important;
}

.btn-star-main-text {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-star-price-tag {
  background: rgba(15, 23, 42, 0.25) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
}

.star-forge-hint-text {
  font-size: 0.78rem !important;
  color: #94A3B8 !important;
  text-align: center !important;
  min-height: 18px !important;
}

/* Escalafón de Rangos */
.star-forge-tiers-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.prestige-tiers-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 10px !important;
}

.prestige-tier-item {
  background: rgba(30, 41, 59, 0.55) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 12px !important;
  padding: 12px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 6px !important;
  position: relative !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.prestige-tier-item:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  transform: translateY(-2px) !important;
}

.prestige-tier-item.current-tier {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.15) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
  border-color: #F59E0B !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3) !important;
}

.prestige-tier-item.unlocked-tier {
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.prestige-tier-item.locked-tier {
  opacity: 0.65 !important;
}

.tier-item-icon {
  font-size: 1.6rem !important;
  margin-bottom: 2px !important;
}

.tier-item-name {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #F8FAFC !important;
  letter-spacing: 0.02em !important;
}

.tier-item-lvl {
  font-size: 0.72rem !important;
  color: #94A3B8 !important;
  font-weight: 600 !important;
}

.tier-item-bonus {
  font-size: 0.72rem !important;
  color: #FBBF24 !important;
  font-weight: 700 !important;
}

.tier-item-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 2px 8px !important;
  border-radius: 10px !important;
  margin-top: 4px !important;
}

.tier-item-badge.current {
  background: #F59E0B !important;
  color: #0F172A !important;
}

.tier-item-badge.unlocked {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38BDF8 !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
}

.tier-item-badge.locked {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #64748B !important;
}

/* Pie del modal */
.star-forge-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 14px 24px !important;
  border-top: 1px solid rgba(245, 158, 11, 0.2) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  box-sizing: border-box !important;
}

.btn-star-forge-accept {
  min-height: 48px !important;
  min-width: 170px !important;
  padding: 10px 24px !important;
  border-radius: 12px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #0F172A !important;
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%) !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-star-forge-accept:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-1px) !important;
}

.btn-star-forge-accept:focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: 2px !important;
}

/* Responsive Móviles */
@media (max-width: 600px) {
  .star-forge-modal-card {
    width: 96vw !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
  }

  .star-forge-modal-head {
    padding: 16px 16px 14px 16px !important;
    gap: 12px !important;
  }

  .star-forge-icon-glow {
    width: 40px !important;
    height: 40px !important;
  }

  .star-forge-title {
    font-size: 1.05rem !important;
  }

  .star-forge-subtitle {
    font-size: 0.76rem !important;
  }

  .star-forge-modal-content {
    padding: 14px 16px !important;
    gap: 16px !important;
  }

  .star-forge-hero-card {
    padding: 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .star-forge-stars-summary {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .star-forge-perks-grid {
    grid-template-columns: 1fr !important;
  }

  .prestige-tiers-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .btn-buy-star-action {
    flex-direction: column !important;
    gap: 6px !important;
    align-items: center !important;
    text-align: center !important;
  }

  .star-forge-modal-footer {
    padding: 12px 16px !important;
  }

  .btn-star-forge-accept {
    width: 100% !important;
  }
}

.private-dashboard-modal {
  width: min(720px, 94vw) !important;
  max-height: 88vh !important;
  background: #1E293B !important;
  border: 2px solid #38BDF8 !important;
  border-radius: 20px !important;
  padding: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  overflow-y: auto !important;
}

.private-dashboard-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1.5px solid #334155 !important;
  padding-bottom: 12px !important;
}

.private-player-hero {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  background: #0F172A !important;
  border: 1.5px solid #334155 !important;
  border-radius: 16px !important;
  padding: 16px !important;
}

.hero-avatar-wrapper {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  padding: 3px !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5) !important;
  flex-shrink: 0 !important;
}

.hero-avatar-circle {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  background: #0f172a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hero-player-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.hero-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.hero-title-tag {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid #F59E0B !important;
  color: #F59E0B !important;
  padding: 2px 10px !important;
  border-radius: 12px !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

.hero-xp-bar-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
}

.xp-labels {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.8rem !important;
}

.xp-bar-bg {
  width: 100% !important;
  height: 8px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
  border-radius: 4px !important;
  transition: width 0.3s ease !important;
}

.hero-stats-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

.hero-stat-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.hero-stat-card .stat-val {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #38BDF8 !important;
}

.hero-stat-card .stat-lbl {
  font-size: 0.72rem !important;
  color: #94A3B8 !important;
}

.private-dashboard-tabs {
  display: flex !important;
  gap: 8px !important;
  border-bottom: 1.5px solid #334155 !important;
  padding-bottom: 8px !important;
  overflow-x: auto !important;
}

.dash-tab-btn {
  padding: 8px 16px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  background: #0F172A !important;
  border: 1.5px solid #334155 !important;
  color: #94A3B8 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.dash-tab-btn.active {
  background: #38BDF8 !important;
  color: #0F172A !important;
  border-color: #38BDF8 !important;
}

.dash-sub-title {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #38BDF8 !important;
  margin: 10px 0 8px 0 !important;
}

.locker-equipped-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 10px !important;
}

.equipped-slot {
  background: #0F172A !important;
  border: 1.5px solid #334155 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.equipped-slot .slot-type {
  font-size: 0.74rem !important;
  color: #94A3B8 !important;
  font-weight: 700 !important;
}

.equipped-slot .slot-name {
  font-size: 0.88rem !important;
  color: #F1F5F9 !important;
  font-weight: 800 !important;
}

.dash-friends-actions {
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
}

/* ==========================================================================
   FIX & IMPROVEMENTS: DEVCARD BUY POPOVER (Z-INDEX & HUD LAYOUT FIX)
   ========================================================================== */
.devcard-confirm-popover {
  position: fixed !important;
  bottom: 85px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10000 !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  border-radius: 20px !important;
  padding: 14px 18px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 191, 36, 0.3) !important;
  min-width: 260px !important;
  max-width: 90vw !important;
  pointer-events: auto !important;
  animation: popoverSlideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.devcard-confirm-popover.hidden {
  display: none !important;
}

@keyframes popoverSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 15px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.confirm-popover-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.confirm-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fbbf24;
  font-size: 1rem;
}

.confirm-popover-cost {
  font-size: 0.85rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 10px;
}

.confirm-popover-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  width: 100%;
}

.btn-confirm-opt {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-confirm-opt.accept {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
}

.btn-confirm-opt.accept:hover {
  transform: scale(1.04);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}

.btn-confirm-opt.reject {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-confirm-opt.reject:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   ANIMATED FLYING RESOURCE PARTICLES (DISAPPEARS UNDER HUD DOCK)
   ========================================================================== */
.flying-resource-particle {
  position: fixed !important;
  z-index: 800 !important;
  /* Passes UNDER lower dock HUD (z-index 900) */
  pointer-events: none !important;
  font-size: 1.8rem !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease !important;
  will-change: transform, opacity !important;
  user-select: none !important;
}

/* ==========================================================================
   ROBBER ANNOUNCEMENT & BANNER AESTHETIC REFINEMENT
   ========================================================================== */
.setup-action-banner.robber-active-banner {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.96), rgba(30, 10, 20, 0.98)) !important;
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.5), 0 0 25px rgba(0, 0, 0, 0.85) !important;
  animation: robberBannerGlow 1.5s infinite ease-in-out !important;
}

@keyframes robberBannerGlow {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4), 0 0 15px rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
  }

  50% {
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.75), 0 0 30px rgba(239, 68, 68, 0.6);
    border-color: #fca5a5;
  }
}

/* ==========================================================================
   PLATO APP INSPIRED MODERN UI/UX REFINEMENTS
   ========================================================================== */
.hex-card,
.overlay-content,
.modal-compact {
  border-radius: 20px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.shop-tab-btn,
.dash-tab-btn,
.hex-nav-btn {
  border-radius: 14px !important;
  font-weight: 800 !important;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.shop-tab-btn.active,
.dash-tab-btn.active,
.hex-nav-btn.active {
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4) !important;
}

/* Color swatch preview pill in shop */
.shop-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: inline-block;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SUPABASE LOGIN SCREEN STYLES
   ========================================================================== */
#login-screen:not(.active),
#login-screen.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

#login-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 1));
  padding: max(12px, env(safe-area-inset-top, 12px)) max(14px, env(safe-area-inset-right, 14px)) max(12px, env(safe-area-inset-bottom, 12px)) max(14px, env(safe-area-inset-left, 14px));
  margin: 0;
  box-sizing: border-box;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  z-index: 1000;
}

.login-card-glass {
  position: relative;
  width: 100%;
  max-width: 452px;
  height: auto;
  max-height: calc(100dvh - 24px);
  margin: auto;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-radius: 22px;
  padding: 16px 18px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 11px;
  animation: loginModalEnter 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  box-sizing: border-box;
}

.login-card-glass::-webkit-scrollbar {
  width: 5px;
}

.login-card-glass::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
}

.login-card-glass::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 8px;
}

.login-card-glass::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.65);
}

@keyframes loginModalEnter {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-lang-selector {
  display: inline-flex;
  gap: 2px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-auth-lang {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.btn-auth-lang:hover {
  color: #fbbf24;
}

.btn-auth-lang.active {
  background: #fbbf24;
  color: #000000;
  font-weight: 900;
}

.login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-logo-img {
  max-width: 135px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.35));
}

.login-subtitle {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.auth-tab-btn:hover {
  color: #ffffff;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
}

.auth-input-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.2px;
}

.auth-input-group input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.auth-password-wrapper {
  position: relative;
  width: 100%;
}

.auth-password-wrapper input {
  padding-right: 40px;
}

.btn-toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-pass:hover {
  color: #ffffff;
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.auth-remember-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.74rem;
  color: #94a3b8;
  user-select: none;
}

.auth-remember-row input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

.auth-error-text {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  text-align: center;
  font-weight: 600;
  line-height: 1.3;
}

.auth-actions {
  width: 100%;
  margin-top: 2px;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.88rem !important;
  font-weight: 800;
  border-radius: 10px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
}

.auth-oauth-separator {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 10px;
  width: 100%;
}

.auth-oauth-separator .sep-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-oauth-separator .sep-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 2px;
}

.btn-google-login {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #1f2937;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  text-decoration: none;
}

.btn-google-login span {
  display: inline-block;
  font-size: inherit;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.15px;
  line-height: 1.15;
}

.btn-google-login:hover {
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.btn-google-login:active {
  transform: translateY(0.5px);
  background: #f1f5f9;
}

.btn-google-login:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.btn-google-login.btn-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

.btn-google-login .google-icon-svg {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  flex-shrink: 0;
  display: block;
}

#btn-forgot-password {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 4px;
  transition: color 0.2s ease;
}

#btn-forgot-password:hover {
  color: #7dd3fc;
}

.btn-guest-play {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  background: linear-gradient(135deg, #075985, #0c4a6e);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 3px 12px rgba(7, 89, 133, 0.32);
  transition: all 0.2s ease;
}

.btn-guest-play:hover {
  transform: translateY(-1px);
}

.btn-guest-play:active {
  transform: translateY(0.5px);
}

.guest-mode-legal {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: #94a3b8;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.2;
}

.guest-mode-legal a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
}

.guest-mode-legal a:hover {
  color: #fbbf24;
}

/* ==========================================================================
   PASSWORD RECOVERY & OTP MODAL STYLES
   ========================================================================== */
.recovery-tab-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.recovery-tab-btn:active {
  transform: translateY(0);
}

#forgot-code-input:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4) !important;
  outline: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#forgot-status-msg {
  animation: fadeIn 0.25s ease-out;
}

/* --- UNIFIED SUPERIOR HEADER & NOTIFICATION SYSTEM STYLES --- */
.logo-link:hover .logo-text-branding {
  filter: brightness(1.2);
  transform: scale(1.02);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.notifications-bell-container {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.btn-notifications-bell {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
  padding: 0 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
}

.btn-notifications-bell:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: #fbbf24 !important;
  transform: translateY(-2px) scale(1.06) !important;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.btn-notifications-bell:active {
  transform: scale(0.95) !important;
}

#notifications-badge-count {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  border-radius: 12px !important;
  padding: 2px 6px !important;
  min-width: 19px !important;
  height: 19px !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #020617 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95), 0 0 22px rgba(239, 68, 68, 0.5) !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  animation: pulseBellBadge 1.8s infinite ease-in-out !important;
}

#notifications-badge-count[style*="display: none"],
#notifications-badge-count:empty,
#notifications-badge-count[data-count="0"] {
  display: none !important;
}

@keyframes pulseBellBadge {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.9), 0 0 20px rgba(239, 68, 68, 0.4);
  }

  50% {
    transform: scale(1.18);
    box-shadow: 0 0 18px rgba(239, 68, 68, 1), 0 0 28px rgba(239, 68, 68, 0.7);
  }
}





/* Toast Container Floating */
#toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 2000000 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 40px);
}

#toast-container .toast {
  pointer-events: auto;
}

/* Notification Drawer Animation */
.notifications-drawer-glass {
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Premium Social Player Cards & Social Hub Aesthetics */
.social-player-card-premium {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  animation: socialSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.social-player-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
  border-radius: 4px 0 0 4px;
  opacity: 0.6;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.social-player-card-premium:hover {
  border-color: rgba(56, 189, 248, 0.55);
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 15px rgba(56, 189, 248, 0.2);
}

.social-player-card-premium:hover::before {
  opacity: 1;
  width: 5px;
}

@keyframes socialSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hexagon Avatar Mask with Glow */
.social-hex-avatar-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 48px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.social-hex-avatar {
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.social-hex-avatar-wrapper:hover .social-hex-avatar {
  transform: scale(1.05);
}

.social-online-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e, 0 0 20px rgba(34, 197, 94, 0.5);
  display: inline-block;
  animation: pulseDot 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.social-offline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.streak-badge-w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
  font-size: 0.7rem;
  font-weight: 900;
}

.streak-badge-l {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 900;
}

/* --- KMKZ FAST BUG FIXES & UI IMPROVEMENTS --- */

/* 1. Bank HUD Overflow Fix */
.bank-resources-hud {
  max-height: 85vh !important;
  overflow-y: auto !important;
  max-width: min(380px, 94vw) !important;
  z-index: 9999 !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 191, 36, 0.3) !important;
}

@media (max-width: 768px) {
  .bank-resources-hud {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92vw !important;
  }
}

/* 2. Floating Chat/Logs Toggle Position above Bottom Dock */
.btn-floating-chat,
.toggle-hud-btn[data-hud="logs-hud"],
#toggle-logs {
  bottom: calc(var(--bottom-dock-height, 75px) + 12px) !important;
  z-index: 1100 !important;
}

/* 3. Fullscreen Game Over Victory Dashboard (legacy overrides removed; controlled by primary Imperial Dashboard block) */

/* 4. Dev Cards Horizontal Scroll */
#dev-cards-hud-list {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 8px 4px !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#dev-cards-hud-list .hud-dev-card {
  flex-shrink: 0 !important;
  min-width: 115px !important;
  width: 115px !important;
  scroll-snap-align: start !important;
}

/* 5. 3-Player Cards Grid in Mobile */
@media (max-width: 600px) {
  .players-lobby-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .player-box,
  .player-card,
  .lobby-player-slot {
    min-width: 0 !important;
    padding: 4px 6px !important;
    font-size: 0.75rem !important;
  }
}

/* 6. Slide In Right Animation for Invite Popup */
@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes victoryCrownPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(251, 191, 36, 0.9));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 40px rgba(251, 191, 36, 1));
  }
}

/* 7. Game Over Victory Modal Container Integration */
#game-over-overlay .game-stats-card,
#game-over-overlay #match-dice-distribution-chart,
#game-over-overlay #match-players-final-table {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Shop Preview Hex Icon Ultra-Compact Centered Styling */
.shop-hex-preview {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  margin: 4px auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 50% !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.shop-hex-preview span,
.shop-hex-preview div {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 1.5rem !important;
}

.btn-item-info {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fbbf24 !important;
  border-radius: 50% !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  padding: 0 !important;
}

.btn-item-info:hover {
  background: #fbbf24 !important;
  color: #000 !important;
  transform: scale(1.1) !important;
}

#page-shop {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#page-shop .page-content-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#shop-items-grid,
.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 2px 0 16px 0 !important;
}

.btn-shop-action {
  width: 100% !important;
  padding: 5px 2px !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Legacy compact stats grid defaults preserved outside #game-over-overlay */
.stats-grid:not(.stats-grid-imperial) {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
}

.stat-box-row {
  padding: 4px 8px !important;
  height: 36px !important;
  min-height: 36px !important;
}

.stat-box-row span {
  font-size: 0.72rem !important;
}


/* Shop Preview Hex Icon Centering & High-End Styling */
.shop-hex-preview {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  min-height: 70px !important;
  margin: 8px auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.98)) !important;
  border: 1.8px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 50% !important;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.shop-hex-preview span,
.shop-hex-preview div {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

/* Compact 2x4 Category Grid without Scroll */
.shop-tabs-pills .shop-tab-btn {
  padding: 7px 4px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-radius: 10px !important;
}

/* Compact Shop Card Hex Styling */
.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
  gap: 10px !important;
}


.btn-item-info {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fbbf24 !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  padding: 0 !important;
}

.btn-item-info:hover {
  background: #fbbf24 !important;
  color: #000 !important;
  transform: scale(1.1) !important;
}

/* Ranking Category Switcher (Trofeos vs Monedas) */
.ranking-tabs-wrapper {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 12px !important;
}

.ranking-tabs-pills {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ranking-tabs-pills .ranking-tab-btn {
  padding: 11px 12px !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 3.5px solid #020617 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

.ranking-tabs-pills .ranking-tab-btn .kmkz-coin-hex,
.ranking-tabs-pills .ranking-tab-btn .ranking-tab-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
  width: 18px !important;
  height: 18px !important;
  color: #fbbf24 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.ranking-tabs-pills .ranking-tab-btn .ranking-tab-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.ranking-tabs-pills .ranking-tab-btn.active .ranking-tab-icon {
  color: #b45309 !important;
}

.ranking-tabs-pills .ranking-tab-btn:hover .ranking-tab-icon {
  transform: scale(1.15) !important;
}

.ranking-tabs-pills .ranking-tab-btn:hover {
  color: #fff !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  border-bottom-color: #d97706 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.ranking-tabs-pills .ranking-tab-btn.active {
  color: #000 !important;
  border: 1px solid #fef08a !important;
  border-bottom: 4px solid #b45309 !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  font-weight: 900 !important;
}

.ranking-tabs-pills .ranking-tab-btn:active {
  transform: translateY(2px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.shop-category-wrapper {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 12px !important;
}

.shop-tabs-pills {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: repeat(2, auto) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 3D Depth Buttons for Shop Categories */
.shop-tabs-pills .shop-tab-btn {
  padding: 9px 4px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 3.5px solid #020617 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  cursor: pointer !important;
  position: relative !important;
  top: 0 !important;
}

.shop-tabs-pills .shop-tab-btn:hover {
  color: #fff !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  border-bottom-color: #d97706 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.shop-tabs-pills .shop-tab-btn.active {
  color: #000 !important;
  background: linear-gradient(180deg, #fef08a, #fbbf24) !important;
  border: 1px solid #fef08a !important;
  border-bottom: 4px solid #b45309 !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  font-weight: 900 !important;
}

.shop-tabs-pills .shop-tab-btn:active {
  transform: translateY(2px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

#shop-items-grid,
.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  padding: 4px 0 10px 0 !important;
  will-change: transform, opacity;
}

/* Shop Smooth Hardware-Accelerated Vertical Category Transitions */
@keyframes shopSlideInUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.99);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes shopSlideInDown {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) scale(0.99);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.shop-slide-up {
  animation: shopSlideInUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shop-slide-down {
  animation: shopSlideInDown 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Featured Showcase Smooth GPU Transitions */
.featured-showcase-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.featured-showcase-card.slide-exit-left {
  transform: translate3d(-24px, 0, 0) !important;
  opacity: 0 !important;
}

.featured-showcase-card.slide-exit-right {
  transform: translate3d(24px, 0, 0) !important;
  opacity: 0 !important;
}

.featured-showcase-card.slide-enter-left {
  animation: featShowcaseEnterLeft 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.featured-showcase-card.slide-enter-right {
  animation: featShowcaseEnterRight 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes featShowcaseEnterLeft {
  0% {
    transform: translate3d(-24px, 0, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes featShowcaseEnterRight {
  0% {
    transform: translate3d(24px, 0, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* Tactile Feedback: Coin Spending Pulse */
.coin-pill-spending {
  animation: coinPillSpendPulse 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes coinPillSpendPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }
  45% {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.7), 0 0 0 2px rgba(251, 191, 36, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Tactile Feedback: Card Unlocked/Equipped Celebration Pulse */
.shop-card-just-unlocked {
  animation: shopCardUnlockPulse 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes shopCardUnlockPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
  30% {
    transform: scale(1.035);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.65), 0 0 0 2px rgba(52, 211, 153, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

/* Shop Confirmation Modal Smooth Fade/Scale Animations */
.confirm-shop-purchase-modal {
  animation: shopModalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shopModalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translate3d(0, 10px, 0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

/* Universal High-Performance Modal Exit Animation */
.modal-overlay.modal-closing,
.game-overlay.modal-closing,
.friends-modal-overlay.modal-closing,
.slot-bonus-modal-overlay.modal-closing {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-overlay.modal-closing > *,
.game-overlay.modal-closing > *,
.friends-modal-overlay.modal-closing > *,
.slot-bonus-modal-overlay.modal-closing > * {
  transform: scale(0.96) translateY(8px) !important;
  opacity: 0 !important;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-shop-footer-pill {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.btn-shop-footer-pill:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.5) !important;
}

.btn-shop-footer-pill:active {
  transform: scale(0.96);
}

.btn-shop-action {
  width: 100% !important;
  padding: 7px 4px !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.btn-shop-action.btn-equip {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #fff !important;
}

.btn-shop-action.btn-active {
  background: rgba(34, 211, 165, 0.15) !important;
  color: #22d3a5 !important;
  border: 1px solid rgba(34, 211, 165, 0.4) !important;
}

/* Hero Card Jet Black VIP Ultra-Compact Design */
.pcard.hero-card-compact {
  padding: 16px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94) 0%, rgba(8, 11, 20, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  overflow: visible !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.pcard.hero-card-compact:hover {
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(251, 191, 36, 0.12) !important;
}

.hero-section {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: right !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
  position: relative !important;
  padding: 4px 2px !important;
  box-sizing: border-box !important;
}

.hero-avatar-wrap {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hero-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.1rem !important;
  user-select: none !important;
  cursor: pointer !important;
  padding: 0 !important;
  outline: none !important;
  position: relative !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hero-avatar:hover {
  transform: scale(1.08) !important;
  border: none !important;
  box-shadow: none !important;
}

.hero-avatar:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.5) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

.hero-avatar-edit-pencil {
  display: none !important;
}

.hero-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  text-align: right !important;
  gap: 8px !important;
  justify-content: center !important;
}

.hero-name-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: right !important;
}

.hero-name {
  margin: 0 !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  letter-spacing: 0.3px !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8) !important;
  font-family: inherit !important;
  line-height: 1.2 !important;
  text-align: right !important;
}

.hero-title-badge {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 100%) !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
  white-space: normal !important;
  word-break: break-word !important;
  height: auto !important;
  line-height: 1.2 !important;
  text-align: center !important;
  flex-shrink: 1 !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35) !important;
  cursor: pointer !important;
  border: 1px solid rgba(254, 240, 138, 0.6) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
  font-family: inherit !important;
}

.hero-title-badge:hover {
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5) !important;
  filter: brightness(1.08) !important;
}

.hero-title-badge:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.hero-badges-compact {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.hero-badge.hero-badge-pill,
.hero-badge-pill {
  padding: 4px 12px !important;
  border-radius: 12px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  border: 1px solid transparent !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

button.hero-badge-pill,
.hero-badge-pill[type="button"] {
  background: transparent;
  cursor: pointer !important;
  outline: none !important;
  border: 1px solid transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-family: inherit !important;
  color: inherit;
}

.hero-badge-pill .badge-icon {
  font-size: 0.85rem !important;
  line-height: 1 !important;
}

.hero-badge-pill .val {
  font-weight: 900 !important;
  letter-spacing: 0.2px !important;
}

.hero-badge-pill .lbl {
  opacity: 0.85 !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px !important;
}

.hero-badge-pill.gold {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(217, 119, 6, 0.2) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
}

.hero-badge-pill.gold:hover {
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25) !important;
}

.hero-badge-pill.cyan {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(2, 132, 199, 0.2) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
}

.hero-badge-pill.cyan:hover {
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25) !important;
}

.hero-badge-pill.purple,
.hero-badge-pill.level-pill,
#hero-badge-level {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(126, 34, 206, 0.28) 100%) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  cursor: pointer !important;
}

.hero-badge-pill.purple:hover,
.hero-badge-pill.level-pill:hover,
#hero-badge-level:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(126, 34, 206, 0.42) 100%) !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.38) !important;
  border-color: #e9d5ff !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.03) !important;
}

.hero-badge-pill.purple:focus-visible,
.hero-badge-pill.level-pill:focus-visible,
#hero-badge-level:focus-visible {
  outline: 2px solid #a855f7 !important;
  outline-offset: 2px !important;
}

.hero-badge-pill.purple .badge-icon,
.hero-badge-pill .badge-icon.purple,
#hero-badge-level .badge-icon {
  color: #c084fc !important;
}

.hero-badge-pill.purple .val,
.hero-badge-pill.level-pill .val,
#hero-badge-level .val {
  color: #f3e8ff !important;
  font-weight: 900 !important;
}

.hero-badge-pill.purple .lbl,
.hero-badge-pill.level-pill .lbl,
#hero-badge-level .lbl {
  color: #d8b4fe !important;
  opacity: 0.9 !important;
}

.hero-badge-pill.stars {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.26) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.65) !important;
  cursor: pointer !important;
  outline: none !important;
}

.hero-badge-pill.stars:hover {
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4) !important;
  border-color: #fef08a !important;
}

.hero-badge-pill.stars:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

/* ── Modern, Responsive & Accessible Hero Quick Actions Grid ── */
.hero-quick-actions {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  margin-top: 4px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.hero-quick-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 40px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 8px 6px !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.hero-quick-btn:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.hero-quick-btn:hover {
  transform: translateY(-2px) !important;
}

.hero-quick-btn:active {
  transform: translateY(1px) scale(0.98) !important;
}

.hero-quick-btn .btn-quick-icon {
  font-size: 1.15rem !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hero-quick-btn .custom-quick-svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease !important;
}

.hero-quick-btn:hover .custom-quick-svg {
  transform: scale(1.15) !important;
}

.hero-quick-btn--history .custom-quick-svg {
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5)) !important;
}

.hero-quick-btn--stats .custom-quick-svg {
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5)) !important;
}

.hero-quick-btn--avatar .custom-quick-svg {
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5)) !important;
}

.hero-quick-btn--admin .custom-quick-svg {
  filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5)) !important;
}

.hero-quick-btn .btn-quick-text {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
  display: inline-block !important;
}

.hero-quick-btn .btn-quick-badge {
  background: rgba(0, 0, 0, 0.55) !important;
  padding: 2px 7px !important;
  border-radius: 20px !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  line-height: 1.1 !important;
  margin-left: 2px !important;
}

/* History Variant (Gold Glow) */
.hero-quick-btn--history {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(217, 119, 6, 0.22) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.hero-quick-btn--history:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.26) 0%, rgba(217, 119, 6, 0.38) 100%) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25) !important;
  color: #ffffff !important;
}

/* Stats Variant (Cyan Glow) */
.hero-quick-btn--stats {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(2, 132, 199, 0.2) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.32) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.hero-quick-btn--stats:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(2, 132, 199, 0.36) 100%) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25) !important;
  color: #ffffff !important;
}

/* Avatar Variant (Purple / Lavender Glow) */
.hero-quick-btn--avatar {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(126, 34, 206, 0.2) 100%) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.32) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.hero-quick-btn--avatar:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.24) 0%, rgba(126, 34, 206, 0.36) 100%) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25) !important;
  color: #ffffff !important;
}

/* Admin CMS Variant (Crimson Glow) */
.hero-quick-btn--admin {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(185, 28, 28, 0.25) 100%) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.hero-quick-btn--admin:hover {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
}

.hero-quick-btn--admin.hidden {
  display: none !important;
}

/* ==========================================================================
   ✨ CUSTOM LUXURY UI SVG ICONS (Universal Vector System)
   ========================================================================== */
.ui-svg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1em !important;
  height: 1em !important;
  vertical-align: -0.15em !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.ui-svg-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Colors & Neon Glow Utilities */
.ui-svg-icon.gold {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.6)) !important;
}

.ui-svg-icon.cyan {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.6)) !important;
}

.ui-svg-icon.purple {
  color: #c084fc !important;
  filter: drop-shadow(0 0 5px rgba(192, 132, 252, 0.6)) !important;
}

.ui-svg-icon.emerald {
  color: #34d399 !important;
  filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.6)) !important;
}

.ui-svg-icon.ruby {
  color: #f87171 !important;
  filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.6)) !important;
}

.ui-svg-icon.orange {
  color: #fb923c !important;
  filter: drop-shadow(0 0 5px rgba(251, 146, 60, 0.6)) !important;
}

.ui-svg-icon.rose {
  color: #fb7185 !important;
  filter: drop-shadow(0 0 5px rgba(251, 113, 133, 0.6)) !important;
}

/* Custom Resource SVG Badges */
.res-svg-token {
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.res-svg-token svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.res-svg-token.wood {
  color: #22c55e !important;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.6)) !important;
}

.res-svg-token.tree,
.res-svg-token.arbol {
  color: #10b981 !important;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6)) !important;
}

.res-svg-token.brick {
  color: #ef4444 !important;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6)) !important;
}

.res-svg-token.sheep {
  color: #ffffff !important;
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.75)) !important;
}

.res-svg-token.wheat {
  color: #facc15 !important;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.6)) !important;
}

.res-svg-token.ore,
.res-svg-token.piedra,
.res-svg-token.mineral {
  color: #94a3b8 !important;
  filter: drop-shadow(0 0 4px rgba(148, 163, 184, 0.65)) !important;
}

.res-svg-token.gold,
.res-svg-token.oro {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.75)) !important;
}

.res-svg-token.wild {
  color: #f59e0b !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8)) !important;
}

.res-svg-token.scatter {
  color: #ec4899 !important;
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.8)) !important;
}

/* Universal Base for Slot Symbol Tokens (Prevents SVG blow-out across all views) */
.slot-sym-token {
  display: inline-flex !important;
  vertical-align: middle !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.slot-sym-token.slot-sym-inline {
  overflow: hidden !important;
  margin: 0 2px !important;
}

.slot-sym-token svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.slot-sym-token.slot-sym-inline svg {
  overflow: hidden !important;
}

/* Slot Machine Luxury Reel Symbol Aesthetics (Frameless 3D Casino Emblems - No Circle) */
.reel-cell .slot-sym-token,
.reel-cell .slot-sym-token.slot-sym-inline {
  width: 66px !important;
  height: 66px !important;
  min-width: 66px !important;
  min-height: 66px !important;
  max-width: none !important;
  max-height: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75)) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease !important;
  user-select: none !important;
}

.reel-cell.center-cell .slot-sym-token,
.reel-cell.center-cell .slot-sym-token.slot-sym-inline {
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  min-height: 78px !important;
  max-width: none !important;
  max-height: none !important;
  transform: scale(1.08) !important;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.55)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell .slot-sym-token svg {
  width: 80% !important;
  height: 80% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  overflow: visible !important;
}

/* Individual Slot Symbol Payline Halos */
.reel-cell.center-cell .slot-sym-token.brick,
.reel-cell.center-cell .slot-sym-brick {
  filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.6)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell.center-cell .slot-sym-token.wood,
.reel-cell.center-cell .slot-sym-wood {
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.55)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell.center-cell .slot-sym-token.sheep,
.reel-cell.center-cell .slot-sym-sheep {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.65)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell.center-cell .slot-sym-token.wheat,
.reel-cell.center-cell .slot-sym-wheat {
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, 0.65)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell.center-cell .slot-sym-token.ore,
.reel-cell.center-cell .slot-sym-ore {
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.65)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) !important;
}

.reel-cell.center-cell .slot-sym-token.wild,
.reel-cell.center-cell .slot-sym-wild {
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.85)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)) !important;
}

.reel-cell.center-cell .slot-sym-token.scatter,
.reel-cell.center-cell .slot-sym-scatter {
  filter: drop-shadow(0 0 20px rgba(244, 63, 94, 0.85)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)) !important;
}

.build-cost-legend-bar .cost-badge .res-svg-token {
  width: 13px !important;
  height: 13px !important;
}

/* Player List Chip SVGs */
.chip-svg {
  display: inline-flex !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.chip-svg.gold {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.5)) !important;
}

.chip-svg.cyan {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.5)) !important;
}

.chip-svg.purple {
  color: #c084fc !important;
  filter: drop-shadow(0 0 3px rgba(192, 132, 252, 0.5)) !important;
}

.chip-svg.blue {
  color: #60a5fa !important;
  filter: drop-shadow(0 0 3px rgba(96, 165, 250, 0.5)) !important;
}

.chip-svg.green {
  color: #4ade80 !important;
  filter: drop-shadow(0 0 3px rgba(74, 222, 128, 0.5)) !important;
}

.chip-svg.red {
  color: #f87171 !important;
  filter: drop-shadow(0 0 3px rgba(248, 113, 113, 0.5)) !important;
}


@media (max-width: 480px) {
  .pcard.hero-card-compact {
    padding: 12px 14px !important;
  }

  .hero-section {
    gap: 12px !important;
  }

  .hero-avatar-wrap {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .hero-avatar {
    font-size: 1.75rem !important;
  }

  .hero-name {
    font-size: 1.15rem !important;
  }

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

/* --- ROBBER VIGNETTE RED BORDER EFFECT --- */
.robber-vignette {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 9998 !important;
  box-shadow: inset 0 0 120px rgba(220, 38, 38, 0.75), inset 0 0 40px rgba(185, 28, 28, 0.9) !important;
  animation: robberPulseVignette 1.5s ease-in-out infinite !important;
}

body:not(.in-game) .robber-vignette,
html:not(.in-game) .robber-vignette,
#lobby-screen.active~.robber-vignette,
#auth-screen.active~.robber-vignette,
.robber-vignette.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  animation: none !important;
  box-shadow: none !important;
}

@keyframes robberPulseVignette {

  0%,
  100% {
    box-shadow: inset 0 0 100px rgba(220, 38, 38, 0.6), inset 0 0 30px rgba(185, 28, 28, 0.8) !important;
  }

  50% {
    box-shadow: inset 0 0 160px rgba(239, 68, 68, 0.95), inset 0 0 60px rgba(220, 38, 38, 1) !important;
  }
}

/* --- LUXURY GLASSMORPHIC BUILD COST LEGEND BAR --- */
.build-cost-legend-bar {
  position: fixed !important;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: auto !important;
  max-width: calc(100vw - 8px) !important;
  z-index: 8500 !important;
  pointer-events: auto !important;
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(2px, 0.8vw, 8px) !important;
  padding: clamp(2px, 0.5vw, 4px) clamp(4px, 1vw, 10px) !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 15px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  min-height: clamp(32px, 4.5vw, 40px) !important;
  height: auto !important;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease !important;
}

.build-cost-legend-bar.hidden {
  display: none !important;
}

.build-cost-legend-bar.user-dragged {
  bottom: auto !important;
  transform: none !important;
}

.build-cost-legend-bar.is-dragging {
  cursor: grabbing !important;
  opacity: 0.95 !important;
  border-color: rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.88), 0 0 30px rgba(56, 189, 248, 0.5) !important;
}

.legend-drag-handle {
  color: rgba(251, 191, 36, 0.65) !important;
  font-size: clamp(0.75rem, 1.6vw, 1rem) !important;
  font-weight: 900 !important;
  letter-spacing: -1.5px !important;
  cursor: grab !important;
  padding: 0 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  flex-shrink: 0 !important;
  transition: color 0.2s ease !important;
}

.legend-drag-handle:hover {
  color: #fbbf24 !important;
}

.build-cost-legend-bar .legend-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(1px, 0.35vw, 3px) !important;
  padding: clamp(2px, 0.4vw, 4px) clamp(3px, 0.7vw, 7px) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  opacity: 0.72;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.build-cost-legend-bar .legend-item:hover {
  opacity: 0.92 !important;
  transform: translateY(-1px) !important;
}

.build-cost-legend-bar .legend-item.can-afford {
  opacity: 1 !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22) 0%, rgba(16, 185, 129, 0.12) 100%) !important;
  border-color: rgba(34, 197, 94, 0.75) !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.build-cost-legend-bar .legend-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(1.5px, 0.4vw, 3px) !important;
  line-height: 1 !important;
}

.build-cost-legend-bar .legend-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.build-cost-legend-bar .legend-icon .ui-svg-icon,
.build-cost-legend-bar .legend-icon svg {
  width: clamp(12px, 2.5vw, 17px) !important;
  height: clamp(12px, 2.5vw, 17px) !important;
  flex-shrink: 0 !important;
}

.build-cost-legend-bar .legend-title {
  display: none !important;
}

.build-cost-legend-bar .legend-check {
  font-size: clamp(0.55rem, 1.2vw, 0.7rem) !important;
  font-weight: 900 !important;
  color: #4ade80 !important;
  background: rgba(34, 197, 94, 0.3) !important;
  border-radius: 50% !important;
  width: clamp(10px, 2vw, 14px) !important;
  height: clamp(10px, 2vw, 14px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6) !important;
  flex-shrink: 0 !important;
}

.build-cost-legend-bar .legend-check svg {
  width: clamp(8px, 1.6vw, 11px) !important;
  height: clamp(8px, 1.6vw, 11px) !important;
}

/* Crucial: Single horizontal row of badges so the HUD bar is ultra-slim in height */
.build-cost-legend-bar .legend-cost {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(1.5px, 0.4vw, 3px) !important;
}

.build-cost-legend-bar .cost-badge {
  font-size: clamp(0.62rem, 1.5vw, 0.74rem) !important;
  font-weight: 900 !important;
  padding: clamp(1px, 0.3vw, 2px) clamp(2px, 0.6vw, 4px) !important;
  border-radius: 5px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(1px, 0.3vw, 2px) !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  height: clamp(14px, 2.8vw, 18px) !important;
}

.build-cost-legend-bar .cost-badge .res-svg-token,
.build-cost-legend-bar .cost-badge svg {
  width: clamp(9px, 2vw, 13.5px) !important;
  height: clamp(9px, 2vw, 13.5px) !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.build-cost-legend-bar .cost-badge.wood {
  border-color: rgba(34, 197, 94, 0.45) !important;
}

.build-cost-legend-bar .cost-badge.brick {
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.build-cost-legend-bar .cost-badge.sheep {
  border-color: rgba(163, 230, 53, 0.5) !important;
}

.build-cost-legend-bar .cost-badge.wheat {
  border-color: rgba(250, 204, 21, 0.5) !important;
}

.build-cost-legend-bar .cost-badge.ore {
  border-color: rgba(203, 213, 225, 0.5) !important;
}

/* Screen Scaling Tier: Ultra-compact mobile (<= 360px) */
@media (max-width: 360px) {
  .build-cost-legend-bar {
    gap: 2px !important;
    padding: 2px 3px !important;
    min-height: 32px !important;
    border-radius: 9px !important;
  }

  .legend-drag-handle {
    font-size: 0.75rem !important;
    padding: 0 1px !important;
  }

  .build-cost-legend-bar .legend-item {
    padding: 2px 2.5px !important;
    gap: 1.5px !important;
    border-radius: 6px !important;
  }

  .build-cost-legend-bar .legend-icon .ui-svg-icon,
  .build-cost-legend-bar .legend-icon svg {
    width: 11.5px !important;
    height: 11.5px !important;
  }

  .build-cost-legend-bar .legend-check {
    width: 9.5px !important;
    height: 9.5px !important;
  }

  .build-cost-legend-bar .legend-cost {
    gap: 1px !important;
  }

  .build-cost-legend-bar .cost-badge {
    font-size: 0.6rem !important;
    padding: 1px 1.5px !important;
    height: 13.5px !important;
    gap: 1px !important;
    border-radius: 3.5px !important;
  }

  .build-cost-legend-bar .cost-badge .res-svg-token,
  .build-cost-legend-bar .cost-badge svg {
    width: 8.5px !important;
    height: 8.5px !important;
  }
}

/* Screen Scaling Tier: Standard Mobile (361px - 480px) */
@media (min-width: 361px) and (max-width: 480px) {
  .build-cost-legend-bar {
    gap: 3px !important;
    padding: 2px 5px !important;
    min-height: 34px !important;
    border-radius: 10px !important;
  }

  .build-cost-legend-bar .legend-item {
    padding: 2px 3.5px !important;
    gap: 1.5px !important;
    border-radius: 7px !important;
  }

  .build-cost-legend-bar .legend-icon .ui-svg-icon,
  .build-cost-legend-bar .legend-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  .build-cost-legend-bar .legend-check {
    width: 11px !important;
    height: 11px !important;
  }

  .build-cost-legend-bar .legend-cost {
    gap: 1.5px !important;
  }

  .build-cost-legend-bar .cost-badge {
    font-size: 0.65rem !important;
    padding: 1px 2.5px !important;
    height: 15px !important;
    gap: 1px !important;
  }

  .build-cost-legend-bar .cost-badge .res-svg-token,
  .build-cost-legend-bar .cost-badge svg {
    width: 10px !important;
    height: 10px !important;
  }
}

/* Screen Scaling Tier: Large Phones & Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .build-cost-legend-bar {
    gap: 5px !important;
    padding: 3px 8px !important;
    min-height: 36px !important;
  }

  .build-cost-legend-bar .legend-item {
    padding: 3px 5px !important;
    gap: 2px !important;
  }

  .build-cost-legend-bar .legend-icon .ui-svg-icon,
  .build-cost-legend-bar .legend-icon svg {
    width: 14.5px !important;
    height: 14.5px !important;
  }

  .build-cost-legend-bar .legend-check {
    width: 12px !important;
    height: 12px !important;
  }

  .build-cost-legend-bar .legend-cost {
    gap: 2px !important;
  }

  .build-cost-legend-bar .cost-badge {
    font-size: 0.68rem !important;
    padding: 1.5px 3.5px !important;
    height: 16px !important;
    gap: 1.5px !important;
  }

  .build-cost-legend-bar .cost-badge .res-svg-token,
  .build-cost-legend-bar .cost-badge svg {
    width: 11.5px !important;
    height: 11.5px !important;
  }
}

/* Screen Scaling Tier: Desktop & Large Monitors (> 768px) */
@media (min-width: 769px) {
  .build-cost-legend-bar {
    gap: 8px !important;
    padding: 4px 10px !important;
    min-height: 38px !important;
  }

  .build-cost-legend-bar .legend-item {
    padding: 3.5px 7px !important;
    gap: 2.5px !important;
  }

  .build-cost-legend-bar .legend-icon .ui-svg-icon,
  .build-cost-legend-bar .legend-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .build-cost-legend-bar .legend-check {
    width: 13.5px !important;
    height: 13.5px !important;
  }

  .build-cost-legend-bar .legend-cost {
    gap: 2.5px !important;
  }

  .build-cost-legend-bar .cost-badge {
    font-size: 0.72rem !important;
    padding: 1.5px 4.5px !important;
    height: 17px !important;
    gap: 2px !important;
  }

  .build-cost-legend-bar .cost-badge .res-svg-token,
  .build-cost-legend-bar .cost-badge svg {
    width: 13px !important;
    height: 13px !important;
  }
}

/* Screen Scaling Tier: Extra-wide Desktop & 4K (> 1200px) */
@media (min-width: 1200px) {
  .build-cost-legend-bar {
    gap: 10px !important;
    padding: 5px 12px !important;
    min-height: 42px !important;
  }

  .build-cost-legend-bar .legend-item {
    padding: 4px 9px !important;
    gap: 3px !important;
  }

  .build-cost-legend-bar .legend-icon .ui-svg-icon,
  .build-cost-legend-bar .legend-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .build-cost-legend-bar .legend-check {
    width: 14px !important;
    height: 14px !important;
  }

  .build-cost-legend-bar .legend-cost {
    gap: 3px !important;
  }

  .build-cost-legend-bar .cost-badge {
    font-size: 0.75rem !important;
    padding: 2px 5px !important;
    height: 18px !important;
    gap: 2.5px !important;
  }

  .build-cost-legend-bar .cost-badge .res-svg-token,
  .build-cost-legend-bar .cost-badge svg {
    width: 14.5px !important;
    height: 14.5px !important;
  }
}

/* --- RESPONSIVE SETTINGS PANEL & SHOP PADDING --- */
#settings-overlay .modal-content,
.settings-panel-container {
  max-height: 85vh !important;
  overflow-y: auto !important;
  padding: clamp(14px, 3vw, 28px) !important;
  border-radius: 20px !important;
}

.shop-items-grid,
#shop-screen,
.shop-container-scroll {
  padding-bottom: clamp(90px, 12vh, 140px) !important;
}

/* ==========================================================================
   SETTINGS MODAL OVERLAY — PREMIUM RESPONSIVE UI WOW
   ========================================================================== */

#settings-overlay.game-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10000005 !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(8, 12, 22, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  padding: 16px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#settings-overlay.hidden {
  display: none !important;
}

#settings-overlay .overlay-content,
.settings-card-modern {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 500px !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  margin: auto !important;
  background: linear-gradient(145deg, rgba(20, 28, 45, 0.96) 0%, rgba(10, 16, 28, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 20px !important;
  padding: 22px 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  box-sizing: border-box !important;
  color: #f8fafc !important;
  scroll-behavior: smooth !important;
}

.kw-highlight {
  color: #fbbf24 !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
}

/* Header del Modal */
.settings-card-modern .trade-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 20px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.settings-card-modern .trade-modal-header h2 {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  margin: 0 !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.settings-card-modern .btn-close-modal {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}

.settings-card-modern .btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

/* Títulos de Sección */
.settings-section-title {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #38bdf8 !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Grid de Información de Partida */
.settings-match-info-box {
  margin-bottom: 22px !important;
}

.settings-info-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .settings-info-grid {
    grid-template-columns: 1fr !important;
  }
}

.settings-info-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  background: rgba(30, 41, 59, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.settings-info-card .info-card-label {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  margin-bottom: 2px !important;
}

.settings-info-card .info-card-value {
  font-size: 0.92rem !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.settings-info-card .info-card-value.warning {
  color: #fbbf24 !important;
}

/* Settings Room Code Box (Compact, Sleek & Simplified Unified 2-Row Layout) */
.settings-room-code-box {
  margin-top: 14px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden !important;
}

.settings-room-code-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.settings-room-code-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fbbf24 !important;
  flex-shrink: 0 !important;
}

.settings-room-code-text-group {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.settings-room-code-label {
  font-size: 0.76rem !important;
  color: #e2e8f0 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  line-height: 1.2 !important;
}

.settings-room-code-sub {
  font-size: 0.68rem !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

.settings-room-code-interactive {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#settings-room-code-val,
.settings-room-code-badge {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 85px) !important;
  font-family: 'Outfit', 'Segoe UI', monospace !important;
  font-size: clamp(0.72rem, 2.2vw, 0.88rem) !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.5px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  user-select: all !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
  transition: border-color 0.18s ease, background-color 0.18s ease !important;
}

#settings-room-code-val:hover,
.settings-room-code-badge:hover {
  border-color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.1) !important;
}

.btn-copy-settings-room-code {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 6px 12px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.35)) !important;
  border: 1px solid #fbbf24 !important;
  border-radius: 8px !important;
  color: #fef08a !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.btn-copy-settings-room-code:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.38), rgba(245, 158, 11, 0.55)) !important;
  transform: translateY(-1px) !important;
  color: #ffffff !important;
}

.btn-copy-settings-room-code:active {
  transform: translateY(0) scale(0.97) !important;
}

/* --- IN-GAME SETTINGS TABBED NAVIGATION --- */
.settings-nav-tabs {
  display: flex !important;
  gap: 6px !important;
  margin-bottom: 14px !important;
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.88) 0%, rgba(6, 10, 22, 0.96) 100%) !important;
  padding: 5px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

.settings-tab-nav-btn {
  flex: 1 !important;
  padding: 10px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.settings-tab-nav-btn:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.settings-tab-nav-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.3)) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.25) !important;
}

.settings-tab-panel {
  display: none !important;
}

.settings-tab-panel.active {
  display: block !important;
  animation: settingsTabFade 0.2s ease-out !important;
}

@keyframes settingsTabFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Settings Section Cards — Modern Glassmorphism & High Contrast Accessibility */
.settings-section-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.16) !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-section-card:hover {
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(56, 189, 248, 0.08) !important;
}

.settings-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-section-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.settings-section-title-wrap .ui-svg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  flex-shrink: 0 !important;
}

.settings-section-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.settings-section-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  flex-shrink: 0 !important;
}

.settings-section-badge.cyan {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.settings-section-badge.gold {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

/* Lista de Preferencias y Toggles en Filas Limpias */
.settings-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.settings-toggle-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  min-height: 48px !important;
  /* WCAG 2.5.5 Touch Target */
  color: #e2e8f0 !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 0 0 6px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

.settings-toggle-row:last-child {
  margin-bottom: 0 !important;
}

.settings-toggle-row:hover {
  background: rgba(255, 255, 255, 0.075) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px) !important;
}

.settings-toggle-row:active {
  transform: scale(0.99) !important;
}

.settings-toggle-row:focus-within {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35) !important;
}

.settings-toggle-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  padding-right: 12px !important;
}

.settings-toggle-title {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  line-height: 1.3 !important;
}

.settings-toggle-desc {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
  word-break: break-word !important;
}

/* Toggle Switch Personalizado */
.custom-toggle-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 44px !important;
  height: 24px !important;
  background: rgba(51, 65, 85, 0.8) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 20px !important;
  position: relative !important;
  outline: none !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  flex-shrink: 0 !important;
}

.custom-toggle-input:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 3px !important;
}

@media (max-width: 480px) {
  .settings-section-card {
    padding: 12px 12px !important;
    border-radius: 14px !important;
  }

  .settings-toggle-row {
    padding: 9px 12px !important;
  }

  .settings-toggle-title {
    font-size: 0.82rem !important;
  }

  .settings-toggle-desc {
    font-size: 0.70rem !important;
  }
}

.custom-toggle-input::before {
  content: "" !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 17px !important;
  height: 17px !important;
  border-radius: 50% !important;
  background: #94a3b8 !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4) !important;
}

.custom-toggle-input:checked {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

.custom-toggle-input:checked::before {
  transform: translateX(20px) !important;
  background: #ffffff !important;
}

/* Botones de Acción de Ajustes Más Estéticos */
.settings-action-block {
  margin-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 14px !important;
}

.btn-settings-action {
  width: 100% !important;
  padding: 12px 18px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  box-sizing: border-box !important;
  text-transform: uppercase !important;
}

.btn-settings-action.primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
}

.btn-settings-action.primary:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5) !important;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
}

.btn-settings-action.secondary {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  margin-top: 8px !important;
}

.btn-settings-action.secondary:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
}

/* --- MODERN CATEGORIZED SETTINGS CARDS --- */
.settings-section-card {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: border-color 0.2s ease !important;
}

.settings-section-card:hover {
  border-color: rgba(251, 191, 36, 0.25) !important;
}

.settings-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 2px !important;
}

.settings-section-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.settings-section-title-wrap .settings-section-title {
  margin-bottom: 0 !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.settings-section-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.settings-section-badge.cyan {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.settings-section-badge.gold {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
}

.settings-section-badge.emerald {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Language Segmented Selector */
.settings-lang-selector {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

.settings-lang-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.settings-lang-btn:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.settings-lang-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 165, 233, 0.38)) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  font-weight: 900 !important;
}

.settings-lang-flag {
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.settings-lang-text {
  letter-spacing: 0.3px !important;
}

/* Volume Sliders Modern Formatting */
.settings-slider-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 4px !important;
}

.settings-slider-label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
}

.settings-slider-val {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

.settings-slider-val.cyan {
  color: #38bdf8 !important;
}

.settings-slider-val.gold {
  color: #fbbf24 !important;
}

.settings-range-slider {
  width: 100% !important;
  cursor: pointer !important;
  border-radius: 8px !important;
}

.settings-range-slider.cyan {
  accent-color: #38bdf8 !important;
}

.settings-range-slider.gold {
  accent-color: #fbbf24 !important;
}

/* Turn Pass Confirmation Pulse */
@keyframes confirmPassKeyframes {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    border-color: #ef4444;
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    border-color: #f87171;
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: #ef4444;
  }
}

.confirm-pass-pulse {
  animation: confirmPassKeyframes 0.8s infinite !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.6)) !important;
  color: #ffffff !important;
}


@media (max-width: 600px) {
  #settings-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .settings-card-modern {
    width: calc(100vw - 12px) !important;
    max-width: 100% !important;
    max-height: 94dvh !important;
    padding: 14px 12px 16px 12px !important;
    border-radius: 18px !important;
  }

  .settings-card-modern .trade-modal-header h2 {
    font-size: 1.05rem !important;
  }

  .settings-tab-nav-btn {
    font-size: 0.78rem !important;
    padding: 8px 4px !important;
  }

  .settings-tab-panel {
    max-height: calc(94dvh - 105px) !important;
    padding-right: 2px !important;
  }

  .settings-toggle-row {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
  }

  .btn-settings-action {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
  }

  .settings-info-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .settings-info-card {
    padding: 8px 10px !important;
  }

  .settings-info-card .info-card-label {
    font-size: 0.7rem !important;
  }

  .settings-info-card .info-card-value {
    font-size: 0.82rem !important;
  }

  #settings-room-code-val,
  .settings-room-code-badge {
    font-size: clamp(0.7rem, 2.2vw, 0.84rem) !important;
    padding: 6px 8px !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    max-width: calc(100% - 85px) !important;
  }

  .btn-copy-settings-room-code {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    flex-shrink: 0 !important;
  }
}

/* ==========================================================================
   HIDE ALL NON-BLOCKING TOAST CONTAINERS & POPUP NOTIFICATIONS
   ========================================================================== */
#toast-container,
.toast-container,
.toast-banner,
.toast,
#achievement-toast-banner,
.achievement-toast-banner,
#compact-notification-popup,
.non-blocking-toast {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   INTERACTIVE DISCARD MODE FOR USER RESOURCE HUD
   ========================================================================== */

.my-resources-hud.in-discard-mode {
  border: 1.5px solid rgba(248, 113, 113, 0.7) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
}

.my-resources-hud.in-discard-mode .res-card-hud:not(.total) {
  cursor: pointer !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  position: relative !important;
}

.my-resources-hud.in-discard-mode .res-card-hud:not(.total):hover {
  transform: translateY(-3px) scale(1.04) !important;
  border-color: #ef4444 !important;
}

.res-card-hud.has-discard-selected {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.35)) !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.6) !important;
}

.hud-discard-badge {
  position: absolute !important;
  top: -8px !important;
  right: -6px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(239, 68, 68, 0.8) !important;
  animation: badgePopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  z-index: 10 !important;
}

@keyframes badgePopIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Permanently hide #discard-overlay modal popup */
#discard-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ==========================================================================
   FLOATING HUD DISCARD BAR & DIRECT PLUS/MINUS BUTTONS
   ========================================================================== */
.hud-discard-bar {
  position: absolute !important;
  bottom: calc(100% + 24px) !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(11, 17, 32, 0.96) !important;
  border: 1.5px solid rgba(248, 113, 113, 0.7) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(239, 68, 68, 0.3) !important;
  backdrop-filter: blur(16px) !important;
  z-index: 100 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  animation: hudBarSlideUp 0.25s ease-out !important;
}

.hud-discard-bar.hidden {
  display: none !important;
}

@keyframes hudBarSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hud-discard-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
}

.hud-discard-title {
  color: #f87171 !important;
  font-weight: 800 !important;
}

.hud-discard-progress-track {
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

.hud-discard-progress-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #38bdf8, #22c55e) !important;
  transition: width 0.25s ease !important;
}

.hud-discard-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.btn-hud-discard-quick {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-hud-discard-quick:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.btn-hud-discard-confirm {
  margin-left: auto !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #94a3b8 !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  cursor: not-allowed !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-hud-discard-confirm.ready {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  border-color: #4ade80 !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6) !important;
  cursor: pointer !important;
}

/* Plus & Minus buttons inside HUD pills */
.hud-res-btn-minus,
.hud-res-btn-plus {
  display: none !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  border: none !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  user-select: none !important;
  z-index: 12 !important;
}

.my-resources-hud.in-discard-mode .hud-res-btn-minus,
.my-resources-hud.in-discard-mode .hud-res-btn-plus {
  display: inline-flex !important;
}

.hud-res-btn-minus {
  background: rgba(239, 68, 68, 0.85) !important;
  color: #ffffff !important;
}

.hud-res-btn-minus:hover {
  background: #dc2626 !important;
}

.hud-res-btn-plus {
  background: rgba(34, 197, 94, 0.85) !important;
  color: #ffffff !important;
}

.hud-res-btn-plus:hover {
  background: #16a34a !important;
}

/* ==========================================================================
   FLOATING HUD TRADE BAR & WANT SELECTOR PANEL
   ========================================================================== */
.my-resources-hud.in-trade-mode .hud-res-btn-minus,
.my-resources-hud.in-trade-mode .hud-res-btn-plus {
  display: inline-flex !important;
}

.hud-trade-bar {
  position: absolute !important;
  bottom: calc(100% + 24px) !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.7) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(56, 189, 248, 0.3) !important;
  backdrop-filter: blur(16px) !important;
  z-index: 100 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  animation: hudBarSlideUp 0.25s ease-out !important;
}

.hud-trade-bar.hidden {
  display: none !important;
}

.hud-trade-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
}

.hud-trade-title {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.hud-trade-summary-text {
  font-size: 0.8rem !important;
  color: #f87171 !important;
  font-weight: 700 !important;
}

.hud-trade-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-hud-trade-primary {
  flex: 1 !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid #60a5fa !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-hud-trade-primary:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.btn-hud-trade-bank-link {
  background: rgba(234, 179, 8, 0.15) !important;
  color: #eab308 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-hud-trade-bank-link:hover {
  background: rgba(234, 179, 8, 0.3) !important;
}

.btn-hud-trade-cancel {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-hud-trade-cancel:hover {
  background: rgba(239, 68, 68, 0.3) !important;
}

/* Panel Emergente Fase 2: Quieres */
.hud-trade-want-panel {
  position: absolute !important;
  bottom: calc(100% + 24px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 320px !important;
  max-width: 92vw !important;
  background: rgba(15, 23, 42, 0.97) !important;
  border: 1.5px solid rgba(34, 197, 94, 0.7) !important;
  border-radius: 18px !important;
  padding: 14px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(34, 197, 94, 0.25) !important;
  backdrop-filter: blur(20px) !important;
  z-index: 110 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  animation: hudPanelPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.hud-trade-want-panel.hidden {
  display: none !important;
}

@keyframes hudPanelPop {
  from {
    opacity: 0;
    transform: translate(-50%, 15px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.hud-trade-want-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.hud-trade-want-title {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  color: #4ade80 !important;
}

.btn-hud-trade-close-x {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.btn-hud-trade-close-x:hover {
  color: #f87171 !important;
}

.hud-trade-presets {
  display: flex !important;
  gap: 4px !important;
  overflow-x: auto !important;
}

.btn-trade-preset {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-trade-preset:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.btn-trade-preset.btn-clear {
  margin-left: auto !important;
  color: #f87171 !important;
}

.hud-trade-want-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 6px !important;
}

.hud-want-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 6px 2px !important;
}

.hud-want-emoji {
  font-size: 1.1rem !important;
}

.hud-want-val {
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  color: #4ade80 !important;
}

.hud-want-btn-dec,
.hud-want-btn-inc {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.hud-want-btn-dec {
  background: rgba(239, 68, 68, 0.8) !important;
  color: white !important;
}

.hud-want-btn-inc {
  background: rgba(34, 197, 94, 0.8) !important;
  color: white !important;
}

.hud-trade-want-footer {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.btn-hud-trade-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
}

.btn-hud-trade-confirm {
  flex: 1 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  cursor: not-allowed !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-hud-trade-confirm.ready {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  border-color: #4ade80 !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6) !important;
  cursor: pointer !important;
}

.hud-trade-give-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 6px !important;
  border-radius: 10px !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(239, 68, 68, 0.8) !important;
  z-index: 10 !important;
}

.res-card-hud.has-trade-give-selected {
  border-color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-3px) !important;
}

/* Animation during Long Press on HUD Resource Card (Bank Trade Trigger) */
.res-card-hud.is-pressing {
  transform: scale(0.94) !important;
  border-color: #eab308 !important;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.8) !important;
  transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

/* Page Viewport inside Lobby Screen */
#lobby-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, #1e293b, #0f172a);
}

/* 🌌 Slow Progressive Shifting Gradient Background for Top Header */
@keyframes slowHeaderColorShift {
  0% {
    background: linear-gradient(180deg, #020617 0%, rgba(15, 23, 42, 0.88) 50%, rgba(15, 23, 42, 0.3) 85%, transparent 100%) !important;
  }

  25% {
    background: linear-gradient(180deg, #18092c 0%, rgba(28, 14, 48, 0.88) 50%, rgba(28, 14, 48, 0.3) 85%, transparent 100%) !important;
  }

  50% {
    background: linear-gradient(180deg, #041c2c 0%, rgba(6, 32, 50, 0.88) 50%, rgba(6, 32, 50, 0.3) 85%, transparent 100%) !important;
  }

  75% {
    background: linear-gradient(180deg, #221404 0%, rgba(40, 22, 6, 0.88) 50%, rgba(40, 22, 6, 0.3) 85%, transparent 100%) !important;
  }

  100% {
    background: linear-gradient(180deg, #020617 0%, rgba(15, 23, 42, 0.88) 50%, rgba(15, 23, 42, 0.3) 85%, transparent 100%) !important;
  }
}

/* ==========================================================================
   💎 KMKZ LUXURY APP HEADER (AAA Cyber-Hex Glassmorphism & Responsive HUD)
   ========================================================================== */
.app-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
  min-height: 70px !important;
  max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: max(6px, env(safe-area-inset-top)) !important;
  padding-bottom: 6px !important;
  padding-left: max(16px, env(safe-area-inset-left)) !important;
  padding-right: max(16px, env(safe-area-inset-right)) !important;
  gap: 16px !important;
  z-index: 200 !important;
  flex-shrink: 0 !important;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.94) 0%, rgba(4, 8, 18, 0.98) 100%) !important;
  backdrop-filter: blur(28px) saturate(210%) brightness(104%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(210%) brightness(104%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  box-sizing: border-box !important;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Luminous cyber-hex bottom gradient trim */
/* .app-header::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.45) 15%, rgba(251, 191, 36, 0.95) 50%, rgba(168, 85, 247, 0.55) 85%, transparent 100%) !important;
  background-size: 200% 100% !important;
  animation: headerBorderShimmer 8s linear infinite !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5), 0 0 24px rgba(251, 191, 36, 0.2) !important;
  pointer-events: none !important;
  z-index: 201 !important;
} */

@keyframes headerBorderShimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* ── Brand Logo ─────────────────────────────────────────────── */
.logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  flex-shrink: 0 !important;
}

.logo a,
.header-brand-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 100% !important;
  text-decoration: none !important;
  color: inherit !important;
  outline: none !important;
  border-radius: 12px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-logo-img {
  height: 46px !important;
  width: auto !important;
  max-width: 175px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 14px rgba(251, 191, 36, 0.45)) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease !important;
  display: block !important;
}

.header-brand-link:hover .header-logo-img {
  transform: scale(1.04) !important;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(251, 191, 36, 0.75)) !important;
}

.app-header-right {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 100% !important;
  width: 100% !important;
}

/* ── Mobile Stats Controls (<768px) ─────────────────────────── */
.mobile-stats-buttons {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.mobile-stat-btn-wrap,
.mobile-stat-pill {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* ── Mobile Quick Coins Button (Luxury Jewel Pill) ───────────── */
#btn-mobile-coins.header-coins-btn-responsive,
#btn-mobile-coins.mobile-stat-pill {
  width: auto !important;
  min-width: 42px !important;
  max-width: 175px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 13px 0 9px !important;
  gap: 7px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(15, 23, 42, 0.94) 50%, rgba(6, 10, 20, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 0 12px rgba(251, 191, 36, 0.22) !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

#btn-mobile-coins:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(26, 36, 60, 0.96) 50%, rgba(10, 16, 30, 1) 100%) !important;
  border-color: #fde047 !important;
  transform: translateY(-1.5px) scale(1.02) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 18px rgba(251, 191, 36, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

#btn-mobile-coins:active {
  transform: scale(0.96) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 8px rgba(251, 191, 36, 0.25) !important;
}

#btn-mobile-coins .header-coins-val-label {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #fef08a !important;
  letter-spacing: -0.2px !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 110px !important;
  line-height: 1 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

#btn-mobile-coins .header-coins-icon,
#btn-mobile-coins .kmkz-coin-hex {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 22px !important;
  height: 22px !important;
}

#btn-mobile-coins .header-coins-icon svg,
#btn-mobile-coins .kmkz-coin-hex svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.85)) !important;
}

@media (max-width: 600px) {
  #btn-mobile-coins .header-coins-val-label {
    max-width: 105px !important;
  }
}

@media (max-width: 480px) {
  #btn-mobile-coins .header-coins-val-label {
    max-width: 96px !important;
  }
}

@media (max-width: 360px) {
  #btn-mobile-coins .header-coins-val-label {
    max-width: 88px !important;
  }
}

/* ── Mobile Coins Popover ───────────────────────────────────── */
.mobile-coins-popover {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 26, 0.99) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 16px !important;
  padding: 12px 18px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(251, 191, 36, 0.22) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  z-index: 250 !important;
  white-space: nowrap !important;
  min-width: 190px !important;
  box-sizing: border-box !important;
}

.m-coins-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
  gap: 12px !important;
}

.m-coins-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.m-coins-close-btn {
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  line-height: 1 !important;
  transition: color 0.18s, background 0.18s !important;
}

.m-coins-close-btn:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.m-coins-val-row {
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 12px !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.m-coins-amount {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  font-family: 'Outfit', sans-serif !important;
  font-variant-numeric: tabular-nums !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5) !important;
  line-height: 1 !important;
}

.m-coins-unit svg,
.m-coins-val-row .kmkz-coin-hex svg {
  width: 24px !important;
  height: 24px !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.7)) !important;
}

.m-coins-actions {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
}

.btn-m-shop,
.btn-m-casino {
  flex: 1 !important;
  min-height: 34px !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
}

.btn-m-shop {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(180, 83, 9, 0.3) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  color: #fde68a !important;
}

.btn-m-shop:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  color: #0f172a !important;
}

.btn-m-casino {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22) 0%, rgba(124, 58, 237, 0.3) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.5) !important;
  color: #e9d5ff !important;
}

.btn-m-casino:hover {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
}

/* ── Desktop Cyber-Glass Stats Bar Tray ─────────────────────── */
.user-stats-bar,
.app-header .user-stats-bar,
.app-header .desktop-stats-bar,
.user-stats-bar.desktop-stats-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(8, 14, 28, 0.92) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 4px 8px !important;
  gap: 10px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ── Unified Luxury Stat Pill Base ──────────────────────────── */
.stat-badge,
.header-stat-pill,
.app-header .stat-badge,
.app-header .header-stat-pill,
#header-reward-badge,
#header-quests-badge,
#header-coins-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 14px !important;
  gap: 8px !important;
  flex: 1 1 0px !important;
  min-width: 0 !important;
  background: linear-gradient(135deg, rgba(20, 32, 54, 0.85) 0%, rgba(10, 16, 30, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 11px !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  position: relative !important;
  user-select: none !important;
  touch-action: manipulation !important;
  outline: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.stat-badge:hover,
.header-stat-pill:hover {
  transform: translateY(-1.5px) !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.stat-badge:active,
.header-stat-pill:active {
  transform: translateY(0.5px) scale(0.97) !important;
}

/* ── 1. Daily Match Streak Badge (Ember Flame) ───────────────── */
.match-streak-header-badge,
#header-match-streak-badge {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22) 0%, rgba(38, 16, 6, 0.94) 100%) !important;
  border-color: rgba(249, 115, 22, 0.52) !important;
  color: #fdba74 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), 0 0 10px rgba(249, 115, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

.match-streak-header-badge:hover,
#header-match-streak-badge:hover {
  border-color: #fb923c !important;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.32) 0%, rgba(54, 22, 8, 0.98) 100%) !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
  color: #ffedd5 !important;
}

.match-streak-header-flame {
  font-size: 1.1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.95)) !important;
  animation: flameWiggle 2.5s infinite ease-in-out !important;
}

@keyframes flameWiggle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.1) rotate(-4deg);
  }

  75% {
    transform: scale(1.1) rotate(4deg);
  }
}

.match-streak-btn-label {
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #fdba74 !important;
}

/* ── 2. Level Roadmap Badge (Amethyst Violet) ────────────────── */
.level-header-badge,
#header-level-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(28, 14, 42, 0.95) 100%) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color: #c084fc !important;
}

.level-header-badge:hover,
#header-level-badge:hover {
  border-color: #d8b4fe !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(168, 85, 247, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.level-header-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8)) !important;
}

.level-btn-label {
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #c084fc !important;
}

/* ── 3. Daily Quests Badge (Sky Blue) ────────────────────────── */
.quests-header-badge,
#header-quests-badge {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(10, 24, 44, 0.95) 100%) !important;
  border-color: rgba(56, 189, 248, 0.42) !important;
  color: #38bdf8 !important;
}

.quests-header-badge:hover,
#header-quests-badge:hover {
  border-color: #7dd3fc !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.quests-header-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.quests-header-icon svg {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  stroke: #38bdf8 !important;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.8)) !important;
}

.quests-btn-label {
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #e2e8f0 !important;
}

/* ── 4. Special Unlock / Forge Badge (Emerald / Teal) ────────── */
.special-unlock-header-badge,
#header-special-unlock-badge {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16) 0%, rgba(8, 30, 32, 0.95) 100%) !important;
  border-color: rgba(45, 212, 191, 0.42) !important;
  color: #2dd4bf !important;
}

.special-unlock-header-badge:hover,
#header-special-unlock-badge:hover {
  border-color: #5eead4 !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(45, 212, 191, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.special-unlock-header-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  filter: drop-shadow(0 0 5px rgba(45, 212, 191, 0.8)) !important;
}

.special-unlock-btn-label {
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #2dd4bf !important;
}

.special-unlock-pts-pill {
  background: rgba(45, 212, 191, 0.2) !important;
  border: 1px solid rgba(45, 212, 191, 0.5) !important;
  color: #5eead4 !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  border-radius: 7px !important;
  padding: 2px 6px !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
}

/* ── 5. Monthly Season & Cups Badge (Imperial Gold Trophy) ───── */
.season-header-badge-chip,
#header-season-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(34, 22, 6, 0.95) 100%) !important;
  border-color: rgba(251, 191, 36, 0.48) !important;
  color: #fbbf24 !important;
}

.season-header-badge-chip:hover,
#header-season-badge:hover {
  border-color: #fde047 !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.season-header-cup-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.9)) !important;
}

.season-header-cups-val {
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  color: #fbbf24 !important;
}

/* ── 6. Coins Badge (Imperial Gold Token) ────────────────────── */
.stat-badge.gold,
.header-stat-pill.gold,
.app-header .stat-badge.gold,
.app-header .header-stat-pill.gold,
.header-coins-badge,
#header-coins-badge {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: fit-content !important;
  background: transparent !important;
  border: none !important;
  color: #f1f5f9 !important;
  font-variant-numeric: tabular-nums !important;
  box-shadow: none !important;
}

.header-coins-badge:hover,
#header-coins-badge:hover {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

#user-coins {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-direction: row-reverse !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.2px !important;
}

.kmkz-coin-hex,
.app-header .kmkz-coin-hex,
#user-coins .kmkz-coin-hex {
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;

}

/* ── 7. Notifications Badge (Electric Cyan Tactical) ────────── */
.desktop-stats-bar .notifications-bell-container,
.desktop-stats-bar #notifications-bell-container,
.user-stats-bar .notifications-bell-container,
.user-stats-bar #notifications-bell-container {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0px !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative !important;
  overflow: visible !important;
}

.desktop-stats-bar .btn-notifications-bell,
.desktop-stats-bar #btn-notifications-bell,
.user-stats-bar .btn-notifications-bell,
.user-stats-bar #btn-notifications-bell {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.20) 0%, rgba(8, 24, 40, 0.95) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.52) !important;
  color: #bae6fd !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  position: relative !important;
  user-select: none !important;
  touch-action: manipulation !important;
  outline: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), 0 0 10px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.desktop-stats-bar .btn-notifications-bell:hover,
.desktop-stats-bar #btn-notifications-bell:hover,
.user-stats-bar .btn-notifications-bell:hover,
.user-stats-bar #btn-notifications-bell:hover {
  border-color: #38bdf8 !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32) 0%, rgba(12, 38, 64, 0.98) 100%) !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
  color: #e0f2fe !important;
}

.desktop-stats-bar .btn-notifications-bell:active,
.desktop-stats-bar #btn-notifications-bell:active,
.user-stats-bar .btn-notifications-bell:active,
.user-stats-bar #btn-notifications-bell:active {
  transform: translateY(0.5px) scale(0.97) !important;
  border-color: #0284c7 !important;
}

.desktop-stats-bar .btn-notifications-bell .notifications-bell-icon,
.user-stats-bar .btn-notifications-bell .notifications-bell-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9)) !important;
}

.desktop-stats-bar .btn-notifications-bell .notifications-bell-icon svg,
.user-stats-bar .btn-notifications-bell .notifications-bell-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #38bdf8 !important;
  display: block !important;
  margin: 0 auto !important;
}

.desktop-stats-bar .btn-notifications-bell .notifications-btn-label,
.user-stats-bar .btn-notifications-bell .notifications-btn-label,
.notifications-btn-label {
  display: none !important;
}

.desktop-stats-bar #notifications-badge-count,
.user-stats-bar #notifications-badge-count {
  position: absolute !important;
  top: -4px !important;
  right: 6px !important;
}

/* ── Ready & Claim Notification Pills ───────────────────────── */
.match-streak-claim-pill,
.level-ready-pill,
.quests-ready-pill,
.special-unlock-claim-pill,
.season-ready-pill {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  padding: 1px 6px !important;
  border-radius: 9px !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.4px !important;
  animation: readyPillPulse 2s infinite ease-in-out !important;
  z-index: 5 !important;
}

.match-streak-claim-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0f172a !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9) !important;
}

.level-ready-pill {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.9) !important;
}

.quests-ready-pill {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9) !important;
}

.special-unlock-claim-pill {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9) !important;
}

.season-ready-pill {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #0f172a !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.95) !important;
}

@keyframes readyPillPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

/* ── Profile & Auth Cyber-Capsule Button ────────────────────── */
.header-profile-btn-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.btn-hud-hex-header,
.header-profile-btn,
.app-header .btn-mobile-stat,
#btn-mobile-quests,
#btn-mobile-reward {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  background: linear-gradient(135deg, rgba(30, 42, 66, 0.92) 0%, rgba(14, 20, 36, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  border-radius: 12px !important;
  outline: none !important;
  color: #fbbf24 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  clip-path: none !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

#btn-header-auth,
.header-profile-btn#btn-header-auth,
.btn-header-profile-avatar#btn-header-auth,
#btn-header-auth.is-authenticated {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-width: 0 !important;
  border-radius: 50% !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  color: #fbbf24 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  clip-path: none !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.btn-hud-hex-header:hover,
.header-profile-btn:hover:not(#btn-header-auth),
#btn-mobile-quests:hover,
#btn-mobile-reward:hover {
  background: radial-gradient(circle at 40% 35%, rgba(48, 70, 110, 0.98), rgba(16, 24, 44, 1)) !important;
  border-color: #fde047 !important;
  transform: translateY(-1.5px) scale(1.06) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.7), inset 0 0 14px rgba(251, 191, 36, 0.5), 0 0 18px rgba(251, 191, 36, 0.5) !important;
}

#btn-header-auth:hover,
#btn-header-auth:focus,
#btn-header-auth.is-authenticated:hover,
#btn-header-auth.is-authenticated:focus {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
  transform: scale(1.08) !important;
  opacity: 0.92 !important;
}

.btn-hud-hex-header:active,
.header-profile-btn:active:not(#btn-header-auth),
#btn-mobile-quests:active,
#btn-mobile-reward:active {
  transform: scale(0.96) !important;
}

#btn-header-auth:active,
#btn-header-auth.is-authenticated:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none !important;
  transform: scale(0.94) !important;
}

#btn-header-auth .hidden,
#btn-header-auth #header-auth-icon.hidden,
#btn-header-auth #header-user-avatar.hidden,
#btn-header-auth #header-profile-unread-badge.hidden {
  display: none !important;
}

#btn-header-auth #header-auth-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border: none !important;
  box-shadow: none !important;
}

#btn-header-auth #header-auth-icon svg {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  display: block !important;
  margin: auto !important;
  filter: none !important;
}

#btn-header-auth .header-user-avatar-slot,
#btn-header-auth #header-user-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#btn-header-auth.is-hexagonal,
#btn-header-auth:has(.kmkz-profile-hex-svg),
#btn-header-auth:has(.kmkz-avatar-svg),
#btn-header-auth:has(.kmkz-sigil-icon),
#btn-header-auth .header-user-avatar-slot,
#btn-header-auth #header-user-avatar {
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#btn-header-auth .header-user-avatar-slot svg,
#btn-header-auth #header-user-avatar svg {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: block !important;
  margin: auto !important;
  border: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#btn-header-auth .header-user-avatar-slot img,
#btn-header-auth #header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: auto !important;
  border: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#btn-header-auth .kmkz-profile-hex-svg,
#header-user-avatar .kmkz-profile-hex-svg {
  width: 42px !important;
  height: 48px !important;
  min-width: 42px !important;
  min-height: 48px !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: block !important;
  margin: auto !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55)) !important;
}

#btn-header-auth .header-user-avatar-slot .avatar-fallback-glyph {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.header-profile-unread-badge,
#header-profile-unread-badge {
  position: absolute !important;
  top: -3px !important;
  right: -3px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 5px !important;
  border-radius: 9999px !important;
  border: 1.5px solid #0f172a !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9) !important;
  animation: readyPillPulse 2s infinite ease-in-out !important;
  z-index: 5 !important;
}

/* ── Tablet & Laptop Responsive Compaction (769px - 1280px) ── */
@media (max-width: 1280px) and (min-width: 1025px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    padding-right: max(14px, env(safe-area-inset-right)) !important;
  }

  .header-logo-img {
    height: 44px !important;
    max-width: 160px !important;
  }

  .user-stats-bar,
  .app-header .user-stats-bar {
    gap: 8px !important;
    padding: 3px 6px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .stat-badge,
  .header-stat-pill,
  .app-header .stat-badge,
  .app-header .header-stat-pill {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    font-size: 0.82rem !important;
    flex: 1 1 0px !important;
    min-width: 0 !important;
  }
}

@media (max-width: 1024px) and (min-width: 891px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }

  .header-logo-img {
    height: 42px !important;
    max-width: 145px !important;
  }

  .user-stats-bar,
  .app-header .user-stats-bar {
    gap: 7px !important;
    padding: 3px 5px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .stat-badge,
  .header-stat-pill,
  .app-header .stat-badge,
  .app-header .header-stat-pill {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    font-size: 0.80rem !important;
    flex: 1 1 0px !important;
    min-width: 0 !important;
  }

  .quests-btn-label,
  .special-unlock-btn-label {
    display: none !important;
  }
}

@media (max-width: 890px) and (min-width: 769px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
  }

  .header-logo-img {
    height: 40px !important;
    max-width: 130px !important;
  }

  .user-stats-bar,
  .app-header .user-stats-bar {
    gap: 6px !important;
    padding: 3px 5px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .stat-badge,
  .header-stat-pill,
  .app-header .stat-badge,
  .app-header .header-stat-pill {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 7px !important;
    gap: 4px !important;
    font-size: 0.78rem !important;
    flex: 1 1 0px !important;
    min-width: 0 !important;
  }

  .quests-btn-label,
  .special-unlock-btn-label,
  .match-streak-btn-label,
  .notifications-btn-label {
    display: none !important;
  }
}

/* ── Mobile Responsive HUD (<768px) ─────────────────────────── */
@media (max-width: 768px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-top: max(6px, env(safe-area-inset-top)) !important;
    padding-bottom: 6px !important;
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .logo {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .header-brand-link {
    display: inline-flex !important;
    align-items: center !important;
  }

  .header-logo-img {
    height: 38px !important;
    max-width: 95px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
  }

  .app-header-right {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .mobile-stats-buttons,
  .app-header .mobile-stats-buttons,
  #mobile-stats-buttons {
    display: none !important;
  }

  /* Mobile User Stats Bar Tray - All PC Buttons Visible & Filling Header Space */
  .user-stats-bar,
  .desktop-stats-bar,
  .app-header .user-stats-bar,
  .app-header .desktop-stats-bar,
  .user-stats-bar.desktop-stats-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-left: 0 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 3px 6px !important;
    gap: 6px !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(8, 14, 28, 0.96) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .user-stats-bar::-webkit-scrollbar,
  .desktop-stats-bar::-webkit-scrollbar,
  .app-header .user-stats-bar::-webkit-scrollbar {
    display: none !important;
  }

  /* Compact Emoji / Icon Only Buttons on Mobile (Expanded & Enlarged) */
  .app-header .header-stat-pill:not(#header-coins-badge),
  .app-header .stat-badge:not(#header-coins-badge),
  .user-stats-bar .header-stat-pill:not(#header-coins-badge),
  .user-stats-bar .stat-badge:not(#header-coins-badge),
  .user-stats-bar .notifications-bell-container,
  .user-stats-bar #notifications-bell-container,
  .user-stats-bar .btn-notifications-bell,
  .user-stats-bar #btn-notifications-bell,
  #header-match-streak-badge,
  #header-level-badge,
  #header-quests-badge,
  #header-special-unlock-badge,
  #header-season-badge {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 36px !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 1 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
    overflow: visible !important;
  }

  .app-header .header-stat-pill:not(#header-coins-badge):active,
  .user-stats-bar .btn-notifications-bell:active {
    transform: scale(0.92) !important;
  }

  /* Hide all text labels inside stat buttons on Mobile */
  .match-streak-btn-label,
  #header-match-streak-badge-text,
  .level-btn-label,
  #header-level-badge-text,
  .quests-btn-label,
  .special-unlock-btn-label,
  #header-special-unlock-badge-text,
  .special-unlock-pts-pill,
  #header-special-unlock-counter,
  .season-header-cups-val,
  #header-season-cups-val,
  .notifications-btn-label {
    display: none !important;
  }

  /* Center emojis & icons perfectly in compact buttons */
  .match-streak-header-flame,
  .level-header-icon,
  .quests-header-icon,
  .special-unlock-header-icon,
  .season-header-cup-icon {
    font-size: 1.15rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .match-streak-header-flame svg,
  .level-header-icon svg,
  .special-unlock-header-icon svg,
  .season-header-cup-icon svg,
  .quests-header-icon svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* Mini notification dots/pills on compact buttons */
  .match-streak-claim-pill,
  .special-unlock-claim-pill,
  .season-ready-pill {
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border-radius: 50% !important;
    top: -2px !important;
    right: -2px !important;
    border: 1.5px solid rgba(8, 14, 28, 0.95) !important;
    box-sizing: content-box !important;
  }

  .level-ready-pill,
  .quests-ready-pill {
    min-width: 15px !important;
    height: 15px !important;
    padding: 0 3px !important;
    font-size: 0.7rem !important;
    line-height: 15px !important;
    border-radius: 6px !important;
    top: -3px !important;
    right: -3px !important;
    border: 1px solid rgba(8, 14, 28, 0.95) !important;
    box-sizing: border-box !important;
  }

  /* Coins Badge Keeps Text and Icon Fully Visible */
  .app-header #header-coins-badge,
  .user-stats-bar #header-coins-badge,
  #header-coins-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1.4 1 auto !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    padding: 0 10px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  #user-coins {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #fef08a !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #user-coins .kmkz-coin-hex,
  #user-coins .ui-svg-icon {
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  #user-coins .kmkz-coin-hex svg,
  #user-coins .ui-svg-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  /* Profile Avatar Button on Mobile */
  .header-profile-btn-wrap,
  #btn-header-auth,
  .header-profile-btn#btn-header-auth {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
  }

  #btn-header-auth #header-auth-icon svg,
  #btn-header-auth #header-user-avatar svg:not(.kmkz-profile-hex-svg),
  #btn-header-auth #header-user-avatar img {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (max-width: 480px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(6px, env(safe-area-inset-left)) !important;
    padding-right: max(6px, env(safe-area-inset-right)) !important;
    gap: 6px !important;
  }

  .header-logo-img {
    height: 34px !important;
    max-width: 80px !important;
  }

  .app-header-right {
    gap: 6px !important;
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  .user-stats-bar,
  .desktop-stats-bar,
  .app-header .user-stats-bar,
  .app-header .desktop-stats-bar,
  .user-stats-bar.desktop-stats-bar {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 3px 5px !important;
    gap: 5px !important;
    border-radius: 11px !important;
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  .app-header .header-stat-pill:not(#header-coins-badge),
  .app-header .stat-badge:not(#header-coins-badge),
  .user-stats-bar .header-stat-pill:not(#header-coins-badge),
  .user-stats-bar .stat-badge:not(#header-coins-badge),
  #header-match-streak-badge,
  #header-level-badge,
  #header-quests-badge,
  #header-special-unlock-badge,
  #header-season-badge {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 32px !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 8px !important;
    padding: 0 3px !important;
  }

  .match-streak-header-flame,
  .level-header-icon,
  .special-unlock-header-icon,
  .season-header-cup-icon,
  .quests-header-icon {
    font-size: 1.05rem !important;
  }

  .match-streak-header-flame svg,
  .level-header-icon svg,
  .special-unlock-header-icon svg,
  .season-header-cup-icon svg,
  .quests-header-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .app-header #header-coins-badge,
  .user-stats-bar #header-coins-badge,
  #header-coins-badge {
    flex: 1.3 1 auto !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
  }

  #user-coins {
    font-size: 0.78rem !important;
    gap: 3px !important;
  }

  #user-coins .kmkz-coin-hex {
    width: 18px !important;
    height: 18px !important;
  }

  #user-coins .kmkz-coin-hex svg {
    width: 18px !important;
    height: 18px !important;
  }

  .header-profile-btn-wrap,
  #btn-header-auth,
  .header-profile-btn#btn-header-auth {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 11px !important;
  }

  #btn-header-auth #header-auth-icon svg,
  #btn-header-auth #header-user-avatar svg:not(.kmkz-profile-hex-svg),
  #btn-header-auth #header-user-avatar img {
    width: 26px !important;
    height: 26px !important;
  }
}

@media (max-width: 360px) {
  .app-header {
    height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    min-height: 70px !important;
    max-height: calc(70px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(4px, env(safe-area-inset-left)) !important;
    padding-right: max(4px, env(safe-area-inset-right)) !important;
    gap: 4px !important;
  }

  .header-logo-img {
    height: 30px !important;
    max-width: 70px !important;
  }

  .app-header-right {
    gap: 4px !important;
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  .user-stats-bar,
  .desktop-stats-bar,
  .app-header .user-stats-bar,
  .app-header .desktop-stats-bar,
  .user-stats-bar.desktop-stats-bar {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 2px 4px !important;
    gap: 4px !important;
    border-radius: 10px !important;
    flex: 1 1 auto !important;
    width: 100% !important;
  }

  .app-header .header-stat-pill:not(#header-coins-badge),
  .app-header .stat-badge:not(#header-coins-badge),
  .user-stats-bar .header-stat-pill:not(#header-coins-badge),
  .user-stats-bar .stat-badge:not(#header-coins-badge),
  #header-match-streak-badge,
  #header-level-badge,
  #header-quests-badge,
  #header-special-unlock-badge,
  #header-season-badge {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 28px !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 7px !important;
    padding: 0 2px !important;
  }

  .match-streak-header-flame,
  .level-header-icon,
  .special-unlock-header-icon,
  .season-header-cup-icon,
  .quests-header-icon {
    font-size: 0.95rem !important;
  }

  .match-streak-header-flame svg,
  .level-header-icon svg,
  .special-unlock-header-icon svg,
  .season-header-cup-icon svg,
  .quests-header-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .app-header #header-coins-badge,
  .user-stats-bar #header-coins-badge,
  #header-coins-badge {
    flex: 1.2 1 auto !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 6px !important;
    border-radius: 7px !important;
  }

  #user-coins {
    font-size: 0.74rem !important;
    gap: 2.5px !important;
  }

  #user-coins .kmkz-coin-hex {
    width: 16px !important;
    height: 16px !important;
  }

  #user-coins .kmkz-coin-hex svg {
    width: 16px !important;
    height: 16px !important;
  }

  .header-profile-btn-wrap,
  #btn-header-auth,
  .header-profile-btn#btn-header-auth {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 9px !important;
  }

  #btn-header-auth #header-auth-icon svg,
  #btn-header-auth #header-user-avatar svg:not(.kmkz-profile-hex-svg),
  #btn-header-auth #header-user-avatar img {
    width: 22px !important;
    height: 22px !important;
  }
}


/* ==========================================================================
   🏆 KMKZ LUXURY SEASON LOBBY CARD (AAA Cyber-Imperial)
   ========================================================================== */
.season-lobby-card {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  background: linear-gradient(135deg, rgba(20, 24, 40, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 16px !important;
  padding: 16px 22px !important;
  margin-bottom: 20px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 0 25px rgba(251, 191, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  outline: none !important;
}

.season-lobby-card:hover {
  transform: translateY(-2px) scale(1.008) !important;
  border-color: #fde047 !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 35px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.season-lobby-card:active {
  transform: scale(0.99) !important;
}

.season-lobby-ambient-mesh {
  position: absolute !important;
  top: -50% !important;
  right: -20% !important;
  width: 320px !important;
  height: 320px !important;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, rgba(168, 85, 247, 0.1) 45%, transparent 70%) !important;
  filter: blur(40px) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: ambientMeshDrift 8s infinite alternate ease-in-out !important;
}

@keyframes ambientMeshDrift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }

  100% {
    transform: translate(-20px, 15px) scale(1.15);
    opacity: 1;
  }
}

.season-lobby-border-shimmer {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  height: 2px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(251, 191, 36, 0.8) 50%, transparent 100%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.season-lobby-content {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.season-lobby-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-width: 0 !important;
}

.season-league-badge-wrapper {
  position: relative !important;
  flex-shrink: 0 !important;
}

.season-league-badge-slot {
  width: 58px !important;
  height: 58px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.85rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 15px rgba(251, 191, 36, 0.3) !important;
}

.season-league-crown-glow {
  position: absolute !important;
  inset: -4px !important;
  border-radius: 20px !important;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%) !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.season-lobby-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.season-lobby-tag {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.season-pill-live {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2px 8px !important;
  border-radius: 20px !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
}

.season-live-pulse-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 8px #ef4444 !important;
  animation: liveDotBlink 1.5s infinite ease-in-out !important;
}

@keyframes liveDotBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.season-timer-capsule {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 9px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
}

.season-lobby-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.2px !important;
  line-height: 1.2 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.season-lobby-cups {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.cups-metric-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  padding: 3px 10px !important;
  border-radius: 10px !important;
  color: #fbbf24 !important;
}

.cups-svg-icon {
  width: 16px !important;
  height: 16px !important;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.7)) !important;
}

.cups-metric-chip strong {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
}

.cups-unit {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
  opacity: 0.85 !important;
}

.cups-league-name {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 3px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.season-lobby-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important;
}

.season-claim-ready-pill {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8) !important;
  animation: readyPillPulse 2s infinite ease-in-out !important;
}

.season-road-preview {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.season-lobby-card:hover .season-road-preview {
  background: rgba(251, 191, 36, 0.18) !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.25) !important;
}

.season-road-preview-icon {
  font-size: 1.25rem !important;
}

.season-road-text-col {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

.season-road-label {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #fef08a !important;
}

.season-road-sub {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

.season-road-arrow {
  color: #fbbf24 !important;
  font-weight: 900 !important;
  transition: transform 0.2s ease !important;
}

.season-lobby-card:hover .season-road-arrow {
  transform: translateX(3px) !important;
}

@media (max-width: 640px) {
  .season-lobby-card {
    padding: 12px 14px !important;
  }

  .season-league-badge-slot {
    width: 46px !important;
    height: 46px !important;
    font-size: 1.4rem !important;
  }

  .season-lobby-title {
    font-size: 1rem !important;
  }

  .season-road-sub {
    display: none !important;
  }

  .season-road-preview {
    padding: 6px 10px !important;
  }
}

/* Live Equipped Preview Header - Fixed Height & Seamless 60-30-10 Layout */
.collection-preview-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 60px !important;
  height: 60px !important;
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.collection-preview-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.collection-preview-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(251, 191, 36, 0.15) !important;
  font-size: 1.6rem !important;
  user-select: none !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.collection-preview-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  flex: 1 !important;
  min-width: 0 !important;
  text-align: left !important;
}

.collection-preview-subtitle {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  line-height: 1.1 !important;
}

.collection-preview-name {
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  line-height: 1.2 !important;
}

.collection-equipped-badge {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #4ade80 !important;
  background: rgba(74, 222, 128, 0.15) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(74, 222, 128, 0.35) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.5px !important;
}

.collection-tabs-pills {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.collection-tabs-pills .collection-tab-btn,
.collection-tabs-pills .shop-tab-btn {
  padding: 7px 3px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  justify-content: center !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Page Container */
/* Page Container */
.lobby-pages-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  contain: layout paint;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

/* Single Page View — Clean GPU 3D Accelerated */
.lobby-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 18px 16px 110px 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0) scale(0.98);
  -webkit-transform: translate3d(0, 0, 0) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.26s linear;
  z-index: 1;
}

/* Zero GPU/CPU Thermal Drain: Completely detach inactive pages from render and composite tree */
.lobby-page:not(.active-page):not(.slide-out-left):not(.slide-out-right):not(.prepare-in-left):not(.prepare-in-right):not(.slide-in-left):not(.slide-in-right) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  will-change: auto !important;
}

/* Allocate GPU layer ONLY during active page sliding transitions */
.lobby-page.slide-out-left,
.lobby-page.slide-out-right,
.lobby-page.slide-in-left,
.lobby-page.slide-in-right,
.lobby-page.prepare-in-left,
.lobby-page.prepare-in-right {
  will-change: transform, opacity;
}

@media (max-width: 768px) {
  .lobby-page {
    padding: 14px 10px 115px 10px !important;
  }
}

@media (max-width: 480px) {
  .lobby-page {
    padding: 12px 8px 120px 8px !important;
  }
}

/* Active Page — Full Opacity & Focused Interactive */
.lobby-page.active-page {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  -webkit-transform: translate3d(0, 0, 0) scale(1);
  z-index: 10;
}

/* Slide Direction Transitions — 60 FPS Fluid */
.lobby-page.slide-out-left {
  opacity: 0;
  pointer-events: none;
  visibility: visible;
  transform: translate3d(-18%, 0, 0) scale(0.96);
  -webkit-transform: translate3d(-18%, 0, 0) scale(0.96);
  z-index: 1;
}

.lobby-page.slide-out-right {
  opacity: 0;
  pointer-events: none;
  visibility: visible;
  transform: translate3d(18%, 0, 0) scale(0.96);
  -webkit-transform: translate3d(18%, 0, 0) scale(0.96);
  z-index: 1;
}

.lobby-page.prepare-in-right {
  opacity: 0;
  pointer-events: none;
  visibility: visible;
  transform: translate3d(18%, 0, 0) scale(0.96) !important;
  -webkit-transform: translate3d(18%, 0, 0) scale(0.96) !important;
  transition: none !important;
  z-index: 5;
}

.lobby-page.prepare-in-left {
  opacity: 0;
  pointer-events: none;
  visibility: visible;
  transform: translate3d(-18%, 0, 0) scale(0.96) !important;
  -webkit-transform: translate3d(-18%, 0, 0) scale(0.96) !important;
  transition: none !important;
  z-index: 5;
}

.lobby-page.slide-in-right,
.lobby-page.slide-in-left {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  -webkit-transform: translate3d(0, 0, 0) scale(1);
  z-index: 10;
}

/* Page Card Wrappers - Responsive & Mobile Optimized Luxury Glass Layout */
/* ==========================================================================
   📐 UNIFIED LOBBY PAGES VIEWPORT INTERIOR ARCHITECTURE & SYMMETRY
   ========================================================================== */

#lobby-pages-viewport {
  position: relative !important;
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  justify-content: center !important;
}

#lobby-pages-viewport .lobby-page {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 18px 16px 115px 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* All 5 Page Content Cards Have The Exact Same Dimensions, Gaps & Alignment */
#lobby-pages-viewport .page-content-card,
#lobby-pages-viewport .lobby-page>.page-content-card,
#page-play .page-content-card,
#page-social .page-content-card,
#page-ranking .page-content-card,
#page-shop .page-content-card,
#page-settings .page-content-card,
#page-profile .page-content-card {
  width: 100% !important;
  max-width: 780px !important;
  min-height: auto !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  background: linear-gradient(180deg, rgba(14, 23, 42, 0.92) 0%, rgba(10, 16, 30, 0.95) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 20px 22px 24px 22px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  flex: 0 0 auto !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Unified Section Headers Across All 5 Pages */
#lobby-pages-viewport .hex-section-header {
  width: 100% !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#lobby-pages-viewport .hex-section-header .hex-icon-tile {
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
}

#lobby-pages-viewport .hex-section-header .hex-badge {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
}

/* Ranking Header Layout & Action Buttons */
#page-ranking .ranking-header-title-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

#page-ranking .ranking-header-actions {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.btn-ranking-tiers-legend,
.btn-ranking-elo-info {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 9px !important;
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.32) !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  font-family: inherit !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.btn-ranking-tiers-legend:hover,
.btn-ranking-elo-info:hover {
  background: rgba(251, 191, 36, 0.24) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.38) !important;
  transform: translateY(-1px) !important;
}

.btn-ranking-tiers-legend:active,
.btn-ranking-elo-info:active {
  transform: scale(0.97) !important;
  filter: brightness(1.1) !important;
}

.btn-ranking-tiers-legend:focus-visible,
.btn-ranking-elo-info:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.btn-legend-icon,
.btn-elo-icon {
  font-size: 0.92rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Interior Sections & Action Blocks Harmonization */
#lobby-pages-viewport .hex-action-zone,
#lobby-pages-viewport .lobby-action-row,
#lobby-pages-viewport .quests-lobby-wrapper,
#lobby-pages-viewport .banco-kmkz-lobby-wrapper,
#lobby-pages-viewport .monopoly-lobby-wrapper,
#lobby-pages-viewport .casino-lobby-wrapper,
#lobby-pages-viewport #social-page-add-wrap,
#lobby-pages-viewport .social-search-bar,
#lobby-pages-viewport .social-filter-pills,
#lobby-pages-viewport .social-friends-list-container,
#lobby-pages-viewport .ranking-tabs-wrapper,
#lobby-pages-viewport .leaderboard-table-container,
#lobby-pages-viewport .cosmetic-tabs,
#lobby-pages-viewport .shop-items-grid-container,
#lobby-pages-viewport #shop-items-grid,
#lobby-pages-viewport .profile-page,
#lobby-pages-viewport .hero-card-compact,
#lobby-pages-viewport .pcard {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Unified Action Hero Row in Play Page */
#page-play .lobby-action-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  width: 100% !important;
}

#page-play .btn-accent {
  width: 100% !important;
  height: 52px !important;
  margin: 0 !important;
}

#page-play .join-room-box {
  width: 100% !important;
  height: 52px !important;
  margin: 0 !important;
  display: flex !important;
  gap: 6px !important;
}

@media (max-width: 768px) {
  #lobby-pages-viewport .lobby-page {
    padding: 14px 10px 115px 10px !important;
  }

  #lobby-pages-viewport .page-content-card,
  #lobby-pages-viewport .lobby-page>.page-content-card,
  #page-play .page-content-card,
  #page-social .page-content-card,
  #page-ranking .page-content-card,
  #page-shop .page-content-card,
  #page-settings .page-content-card,
  #page-profile .page-content-card {
    padding: 16px 14px 20px 14px !important;
    border-radius: 18px !important;
    gap: 14px !important;
  }

  #page-play .lobby-action-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #page-play .btn-accent,
  #page-play .join-room-box {
    height: 48px !important;
  }

  /* Ranking Header Responsive Re-flow */
  #page-ranking .hex-section-header {
    flex-wrap: wrap !important;
    gap: 10px 12px !important;
  }

  #page-ranking .ranking-header-title-group {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  #page-ranking .ranking-header-actions {
    width: auto !important;
    margin-left: auto !important;
    margin-top: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  #page-ranking .btn-ranking-elo-info {
    width: auto !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 10px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  #lobby-pages-viewport .lobby-page {
    padding: 12px 8px 118px 8px !important;
  }

  #lobby-pages-viewport .page-content-card,
  #lobby-pages-viewport .lobby-page>.page-content-card,
  #page-play .page-content-card,
  #page-social .page-content-card,
  #page-ranking .page-content-card,
  #page-shop .page-content-card,
  #page-settings .page-content-card,
  #page-profile .page-content-card {
    padding: 14px 12px 18px 12px !important;
    border-radius: 16px !important;
    gap: 12px !important;
  }

  #page-ranking .ranking-header-actions {
    gap: 6px !important;
  }

  #page-ranking .btn-ranking-tiers-legend,
  #page-ranking .btn-ranking-elo-info {
    min-height: 36px !important;
    height: 36px !important;
    font-size: 0.74rem !important;
    padding: 5px 8px !important;
  }
}

@media (max-width: 360px) {
  #page-ranking .ranking-header-actions {
    gap: 5px !important;
  }

  #page-ranking .btn-ranking-tiers-legend,
  #page-ranking .btn-ranking-elo-info {
    min-height: 34px !important;
    height: 34px !important;
    font-size: 0.70rem !important;
    padding: 4px 6px !important;
    gap: 4px !important;
  }

  #page-ranking .btn-legend-icon,
  #page-ranking .btn-elo-icon {
    font-size: 0.82rem !important;
  }
}

/* 🌌 HUD Background Top-to-Bottom Gradient (Black to Transparent) */
.game-hud-top,
.hud-top-gradient-overlay {
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 🛡️ Bottom Navigation Container (Sleek Mobile Gaming Dock) */
.tab-bar-bottom {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 540px !important;
  height: 68px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(9, 14, 26, 0.99) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.3) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px 20px 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  padding: 6px 12px max(10px, calc(6px + env(safe-area-inset-bottom))) 12px !important;
  box-sizing: border-box !important;
  z-index: 1000 !important;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(251, 191, 36, 0.06) !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.25s ease !important;
}

/* Hide tab bar when scrolling down */
.tab-bar-bottom.tab-bar-hidden {
  transform: translate(-50%, calc(100% + 28px)) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.in-game .tab-bar-bottom {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Universal Link Reset to Eliminate Any White Underline Lines */
.tab-bar-bottom a,
.tab-bar-bottom a:hover {
  text-decoration: none !important;
  animation: fadeIn 0.22s ease-out !important;
}

/* 🎨 Cosmetic Sub-Tabs (#tab-collection) */
.cosmetic-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding-bottom: 10px !important;
  margin-bottom: 16px !important;
  scrollbar-width: thin !important;
  -webkit-overflow-scrolling: touch !important;
}

.ctab {
  padding: 8px 16px !important;
  border-radius: 12px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.ctab:hover {
  color: #fbbf24 !important;
  background: rgba(56, 189, 248, 0.2) !important;
}

.ctab.active {
  color: #0f172a !important;
  background: #fbbf24 !important;
  font-weight: 900 !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.55) !important;
}

.cosmetic-section {
  display: none;
}

.cosmetic-section.active {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 14px !important;
  padding: 10px 4px 18px 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .cosmetic-section.active {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}


.shop-card-hex.state-equipped {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35) !important;
}

.shop-card-hex.state-owned {
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.shop-card-status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-card-status-pill {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shop-card-status-pill.equipped {
  color: #fbbf24;
}

.shop-card-status-pill.owned {
  color: #22d3a5;
}

.shop-card-status-pill.locked {
  color: #64748b;
}

.shop-card-preview-box {
  width: 100%;
  height: 64px;
  background: rgba(30, 41, 59, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.shop-card-meta {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 2px;
}

.shop-card-title {
  font-weight: 800;
  font-size: 0.84rem;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
  height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-card-action {
  margin-top: auto;
  width: 100%;
}

.btn-shop-state {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.75rem;
  box-sizing: border-box;
}

.btn-shop-state.btn-equipped {
  border: 1px solid #22c55e;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  cursor: default;
}

.btn-shop-state.btn-equip {
  border: none;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-shop-state.btn-equip:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-shop-state.btn-locked {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  cursor: default;
}

/* 🏦 Dedicated Single-Row Top Bank Stock Bar (#top-bank-bar) */
#top-bank-bar.hidden,
.top-bank-bar.hidden {
  display: none !important;
}

#top-bank-bar,
.top-bank-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  justify-content: safe center !important;
  gap: 4px !important;
  /* flex:0 1 auto para centrar y adaptar al contenido libre del hud-top-nav-row */
  flex: 0 1 auto !important;
  min-width: fit-content !important;
  max-width: fit-content !important;
  padding: 3px 8px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.38) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 10px rgba(251, 191, 36, 0.12) !important;
  z-index: 1200 !important;
  position: relative !important;
  overflow: visible !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease !important;
}

#top-bank-bar:hover {
  border-color: rgba(251, 191, 36, 0.65) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 16px rgba(251, 191, 36, 0.22) !important;
}

#top-bank-bar::-webkit-scrollbar {
  display: none !important;
}

/* Insignia de Logo Hexagonal de KMKZ en la barra del banco */
.top-bank-hex-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.45)) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  cursor: pointer !important;
  user-select: none !important;
}

.top-bank-hex-brand:hover {
  transform: scale(1.15) rotate(4deg) !important;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.7)) !important;
}

.top-bank-hex-logo {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Divisor sutil entre el logo y los recursos */
.top-bank-divider {
  width: 1px !important;
  height: 16px !important;
  background: linear-gradient(180deg, transparent, rgba(251, 191, 36, 0.45) 30%, rgba(251, 191, 36, 0.45) 70%, transparent) !important;
  flex-shrink: 0 !important;
  margin: 0 1px !important;
}

.top-bank-item {
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 2px 5.5px !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.top-bank-item:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  transform: translateY(-1px) !important;
}

.top-bank-item .res-svg-token,
.top-bank-item .ui-svg-icon {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
}

.top-bank-item:first-child {
  margin-left: 1px !important;
}

.top-bank-item:last-child {
  margin-right: 1px !important;
}

/* ⬡ 2-Row Ultra-Compact Player Cards System (#players-list) */
/* ⬡ Player Cards Scroll Horizontal System (#players-list) */
#players-list,
.players-top-bar,
div#players-list,
div.players-top-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-evenly !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 6px 12px !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  scroll-behavior: smooth !important;
  pointer-events: auto !important;
  z-index: 100 !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Ocultar Barra de Scroll visual manteniedo el scroll funcional */
#players-list::-webkit-scrollbar,
.players-top-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.hex-player-pod {
  pointer-events: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: auto !important;
  min-height: 54px !important;
  max-height: none !important;
  padding: 4px 8px !important;
  gap: 3px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  clip-path: none !important;
  box-sizing: border-box !important;
  position: relative !important;
  user-select: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-width: 160px !important;
  max-width: 220px !important;
}

.pod-row-top,
.pod-row-bottom,
.pod-row-stock {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 4px !important;
}

.pod-row-stock {
  margin-top: 1px !important;
  padding-top: 2px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  justify-content: space-around !important;
}

.pod-name-col {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.pod-color-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.6) !important;
  flex-shrink: 0 !important;
}

.pod-player-name {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  max-width: 85px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pod-stat-pill {
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  padding: 1px 4px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  line-height: 1 !important;
}

.pod-stat-pill strong {
  font-weight: 900 !important;
  color: #ffffff !important;
}

.pod-stat-pill.vp {
  background: rgba(251, 191, 36, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

.pod-stat-pill.vp strong {
  color: #fbbf24 !important;
}

.pod-stat-pill.hand.over-limit {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
}

/* 🎲 Equipped Dice Cosmetic Skins */

/* ==========================================================================
   KMKZ 3D CUBE SKINS: 6-FACED TEXTURES & HIGH-FIDELITY GRADIENTS
   ========================================================================== */

/* 1. Default Ivory White */
.skin-dice_default .die-face,
.skin-default .die-face,
#floating-dice.skin-dice_default .die-face,
#floating-dice.skin-default .die-face {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f8fafc 55%, #e2e8f0 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15), inset 0 1px 1px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}
.skin-dice_default .die-face[data-face="1"] .die-pip.pip-center,
.skin-default .die-face[data-face="1"] .die-pip.pip-center,
#floating-dice.skin-dice_default .die-face[data-face="1"] .die-pip.pip-center,
#floating-dice.skin-default .die-face[data-face="1"] .die-pip.pip-center {
  background: #dc2626 !important;
  box-shadow: inset 0 1px 1.5px rgba(185, 28, 28, 0.6), 0 0 6px rgba(220, 38, 38, 0.6) !important;
}

/* 2. Ruby Crystal */
.skin-dice_ruby .die-face, .skin-ruby .die-face, .skin-dice_red .die-face, .skin-red .die-face,
#floating-dice.skin-dice_ruby .die-face, #floating-dice.skin-ruby .die-face {
  background: linear-gradient(145deg, #ef4444 0%, #b91c1c 50%, #7f1d1d 100%) !important;
  border: 1.5px solid #fca5a5 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(254, 202, 202, 0.4), 0 0 14px rgba(239, 68, 68, 0.65) !important;
}

/* 3. Oceanic Sapphire */
.skin-dice_sapphire .die-face, .skin-sapphire .die-face, .skin-dice_blue .die-face, .skin-blue .die-face,
#floating-dice.skin-dice_sapphire .die-face, #floating-dice.skin-sapphire .die-face {
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  border: 1.5px solid #7dd3fc !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(186, 230, 253, 0.4), 0 0 14px rgba(2, 132, 199, 0.65) !important;
}

/* 4. Forest Emerald */
.skin-dice_emerald .die-face, .skin-emerald .die-face, .skin-dice_green .die-face, .skin-green .die-face,
#floating-dice.skin-dice_emerald .die-face, #floating-dice.skin-emerald .die-face {
  background: linear-gradient(145deg, #10b981 0%, #047857 50%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(167, 243, 208, 0.4), 0 0 14px rgba(16, 185, 129, 0.65) !important;
}

/* 5. Solar Amber */
.skin-dice_amber .die-face, .skin-amber .die-face, .skin-dice_orange .die-face, .skin-orange .die-face,
#floating-dice.skin-dice_amber .die-face, #floating-dice.skin-amber .die-face {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(254, 215, 170, 0.4), 0 0 14px rgba(249, 115, 22, 0.65) !important;
}

/* 6. Mystic Amethyst */
.skin-dice_amethyst .die-face, .skin-amethyst .die-face, .skin-dice_purple .die-face, .skin-purple .die-face,
#floating-dice.skin-dice_amethyst .die-face, #floating-dice.skin-amethyst .die-face {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 50%, #4c1d95 100%) !important;
  border: 1.5px solid #c4b5fd !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(221, 214, 254, 0.4), 0 0 14px rgba(139, 92, 246, 0.65) !important;
}

/* 7. Radiant Topaz */
.skin-dice_topaz .die-face, .skin-topaz .die-face, .skin-dice_yellow .die-face, .skin-yellow .die-face,
#floating-dice.skin-dice_topaz .die-face, #floating-dice.skin-topaz .die-face {
  background: linear-gradient(145deg, #eab308 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.4), 0 0 14px rgba(234, 179, 8, 0.65) !important;
}

/* 8. Sakura Pink */
.skin-dice_sakura .die-face, .skin-sakura .die-face,
#floating-dice.skin-dice_sakura .die-face, #floating-dice.skin-sakura .die-face {
  background: linear-gradient(145deg, #f472b6 0%, #db2777 50%, #831843 100%) !important;
  border: 1.5px solid #fbcfe8 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(251, 207, 232, 0.4), 0 0 14px rgba(244, 114, 182, 0.65) !important;
}

/* 9. Tactical Obsidian */
.skin-dice_obsidian .die-face, .skin-obsidian .die-face,
#floating-dice.skin-dice_obsidian .die-face, #floating-dice.skin-obsidian .die-face {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #475569 !important;
  color: #ef4444 !important;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.15), 0 0 14px rgba(0, 0, 0, 0.85) !important;
}

/* 10. Arctic Glaciar */
.skin-dice_cyan .die-face, .skin-cyan .die-face,
#floating-dice.skin-dice_cyan .die-face, #floating-dice.skin-cyan .die-face {
  background: linear-gradient(145deg, #06b6d4 0%, #0891b2 50%, #164e63 100%) !important;
  border: 1.5px solid #a5f3fc !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(165, 243, 252, 0.4), 0 0 14px rgba(6, 182, 212, 0.65) !important;
}

/* 11. Diamond */
.skin-dice_diamond .die-face, .skin-diamond .die-face,
#floating-dice.skin-dice_diamond .die-face, #floating-dice.skin-diamond .die-face {
  background: linear-gradient(145deg, #ffffff 0%, #e0f2fe 50%, #bae6fd 100%) !important;
  border: 1.5px solid #e0f2fe !important;
  color: #0284c7 !important;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.7), 0 0 16px rgba(56, 189, 248, 0.8) !important;
}

/* 12. 24K Gold */
.skin-dice_gold .die-face, .skin-gold .die-face,
#floating-dice.skin-dice_gold .die-face, #floating-dice.skin-gold .die-face {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.6), 0 0 18px rgba(245, 158, 11, 0.8) !important;
}

/* 13. Rainbow */
.skin-dice_rainbow .die-face, .skin-rainbow .die-face,
#floating-dice.skin-dice_rainbow .die-face, #floating-dice.skin-rainbow .die-face {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6) !important;
  background-size: 300% 300% !important;
  border: 1.5px solid #ffffff !important;
  color: #ffffff !important;
  animation: rainbowFlow 4s ease infinite !important;
}

/* 14. Fire */
.skin-dice_fire .die-face, .skin-fire .die-face, .skin-dice_magma .die-face, .skin-magma .die-face,
#floating-dice.skin-dice_fire .die-face, #floating-dice.skin-fire .die-face {
  background: linear-gradient(145deg, #fbbf24 0%, #f97316 50%, #dc2626 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.5), 0 0 16px rgba(239, 68, 68, 0.8) !important;
}

/* 15. Cyberpunk Neon */
.skin-dice_neon .die-face, .skin-neon .die-face, .skin-dice_cyberpunk .die-face, .skin-cyberpunk .die-face,
#floating-dice.skin-dice_neon .die-face, #floating-dice.skin-neon .die-face {
  background: linear-gradient(145deg, #090d16 0%, #1a103c 50%, #2e0854 100%) !important;
  border: 1.5px solid #00f0ff !important;
  color: #ff007f !important;
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.3), 0 0 16px rgba(0, 240, 255, 0.8) !important;
}

/* 16. Cosmic Galaxy */
.skin-dice_cosmic .die-face, .skin-cosmic .die-face,
#floating-dice.skin-dice_cosmic .die-face, #floating-dice.skin-cosmic .die-face {
  background: linear-gradient(145deg, #38bdf8 0%, #6366f1 50%, #312e81 100%) !important;
  border: 1.5px solid #bae6fd !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(186, 230, 253, 0.4), 0 0 18px rgba(99, 102, 241, 0.7) !important;
}

/* 28. Blood Moon */
.skin-dice_blood_moon .die-face, .skin-blood_moon .die-face,
#floating-dice.skin-dice_blood_moon .die-face, #floating-dice.skin-blood_moon .die-face {
  background: linear-gradient(145deg, #450a0a 0%, #1c0404 60%, #000000 100%) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fee2e2 !important;
  box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.45), 0 0 16px rgba(185, 28, 28, 0.85) !important;
}

/* 29. Frostbite */
.skin-dice_frostbite .die-face, .skin-frostbite .die-face,
#floating-dice.skin-dice_frostbite .die-face, #floating-dice.skin-frostbite .die-face {
  background: linear-gradient(145deg, #0f172a 0%, #0369a1 50%, #0284c7 100%) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.45), 0 0 16px rgba(14, 165, 233, 0.85) !important;
}

/* 30. Onyx & Gold */
.skin-dice_onyx_gold .die-face, .skin-onyx_gold .die-face,
#floating-dice.skin-dice_onyx_gold .die-face, #floating-dice.skin-onyx_gold .die-face {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 35%, #020617 72%, #000000 100%) !important;
  border: 1.8px solid #fbbf24 !important;
  color: #ffd700 !important;
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.45), 0 0 18px rgba(251, 191, 36, 0.85) !important;
}



/* 🎲 Equipped Dice Cosmetic Skins (16 Sets: Complete Color Palette + Luminous & Sparkle Shaders) */

/* 1. Default Ivory White 🎲 */
#floating-dice.skin-dice_default .die,
#floating-dice.skin-default .die,
.floating-dice-hud.skin-dice_default .die,
.floating-dice-hud.skin-default .die {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #dc2626 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* 2. Ruby Crystal 💎 (Crimson Red with Ruby Glow) */
#floating-dice.skin-dice_ruby .die,
#floating-dice.skin-ruby .die,
#floating-dice.skin-dice_red .die,
#floating-dice.skin-red .die,
.floating-dice-hud.skin-dice_ruby .die,
.floating-dice-hud.skin-ruby .die,
.floating-dice-hud.skin-dice_red .die,
.floating-dice-hud.skin-red .die {
  background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%) !important;
  border: 1.5px solid #fca5a5 !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #f87171 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.75), inset 0 1px 0 rgba(254, 202, 202, 0.6) !important;
}

/* 3. Oceanic Sapphire 🔷 (Deep Blue Aquamarine Glow) */
#floating-dice.skin-dice_sapphire .die,
#floating-dice.skin-sapphire .die,
#floating-dice.skin-dice_blue .die,
#floating-dice.skin-blue .die,
.floating-dice-hud.skin-dice_sapphire .die,
.floating-dice-hud.skin-sapphire .die,
.floating-dice-hud.skin-dice_blue .die,
.floating-dice-hud.skin-blue .die {
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  border: 1.5px solid #7dd3fc !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #38bdf8 !important;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.75), inset 0 1px 0 rgba(186, 230, 253, 0.7) !important;
}

/* 4. Forest Emerald 🟢 (Luminous Jade Green) */
#floating-dice.skin-dice_emerald .die,
#floating-dice.skin-emerald .die,
#floating-dice.skin-dice_green .die,
#floating-dice.skin-green .die,
.floating-dice-hud.skin-dice_emerald .die,
.floating-dice-hud.skin-emerald .die,
.floating-dice-hud.skin-dice_green .die,
.floating-dice-hud.skin-green .die {
  background: linear-gradient(145deg, #10b981 0%, #047857 50%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #34d399 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.75), inset 0 1px 0 rgba(167, 243, 208, 0.7) !important;
}

/* 5. Solar Amber 🧡 (Radiant Warm Amber Orange) */
#floating-dice.skin-dice_amber .die,
#floating-dice.skin-amber .die,
#floating-dice.skin-dice_orange .die,
#floating-dice.skin-orange .die,
.floating-dice-hud.skin-dice_amber .die,
.floating-dice-hud.skin-amber .die,
.floating-dice-hud.skin-dice_orange .die,
.floating-dice-hud.skin-orange .die {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #fb923c !important;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.75), inset 0 1px 0 rgba(254, 215, 170, 0.7) !important;
}

/* 6. Mystic Amethyst 💜 (Royal Electric Purple) */
#floating-dice.skin-dice_amethyst .die,
#floating-dice.skin-amethyst .die,
#floating-dice.skin-dice_purple .die,
#floating-dice.skin-purple .die,
.floating-dice-hud.skin-dice_amethyst .die,
.floating-dice-hud.skin-amethyst .die,
.floating-dice-hud.skin-dice_purple .die,
.floating-dice-hud.skin-purple .die {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 50%, #4c1d95 100%) !important;
  border: 1.5px solid #c4b5fd !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #a78bfa !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(221, 214, 254, 0.7) !important;
}

/* 7. Radiant Topaz 💛 (Sunburst Topaz Yellow) */
#floating-dice.skin-dice_topaz .die,
#floating-dice.skin-topaz .die,
#floating-dice.skin-dice_yellow .die,
#floating-dice.skin-yellow .die,
.floating-dice-hud.skin-dice_topaz .die,
.floating-dice-hud.skin-topaz .die,
.floating-dice-hud.skin-dice_yellow .die,
.floating-dice-hud.skin-yellow .die {
  background: linear-gradient(145deg, #eab308 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.75), inset 0 1px 0 rgba(254, 240, 138, 0.8) !important;
}

/* 8. Sakura Blossom Pink 🩷 (Pastel/Neon Pink) */
#floating-dice.skin-dice_sakura .die,
#floating-dice.skin-sakura .die,
#floating-dice.skin-dice_pink .die,
#floating-dice.skin-pink .die,
.floating-dice-hud.skin-dice_sakura .die,
.floating-dice-hud.skin-sakura .die,
.floating-dice-hud.skin-dice_pink .die,
.floating-dice-hud.skin-pink .die {
  background: linear-gradient(145deg, #ec4899 0%, #be185d 50%, #831843 100%) !important;
  border: 1.5px solid #fbcfe8 !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #f472b6 !important;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.75), inset 0 1px 0 rgba(251, 207, 232, 0.7) !important;
}

/* 9. Tactical Obsidian 🖤 (Matte Black with Crimson Runes) */
#floating-dice.skin-dice_obsidian .die,
#floating-dice.skin-obsidian .die,
#floating-dice.skin-dice_black .die,
#floating-dice.skin-black .die,
.floating-dice-hud.skin-dice_obsidian .die,
.floating-dice-hud.skin-obsidian .die,
.floating-dice-hud.skin-dice_black .die,
.floating-dice-hud.skin-black .die {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #64748b !important;
  color: #ef4444 !important;
  text-shadow: 0 0 8px #dc2626, 0 0 14px #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(148, 163, 184, 0.5) !important;
}

/* 10. Arctic Glaciar Crystal 🧊 (Ice Cyan with Frost Shimmer) */
#floating-dice.skin-dice_cyan .die,
#floating-dice.skin-cyan .die,
#floating-dice.skin-dice_ice .die,
#floating-dice.skin-ice .die,
.floating-dice-hud.skin-dice_cyan .die,
.floating-dice-hud.skin-cyan .die,
.floating-dice-hud.skin-dice_ice .die,
.floating-dice-hud.skin-ice .die {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 1.5px solid #bae6fd !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px #38bdf8, 0 0 14px #0284c7 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8), inset 0 1px 0 rgba(224, 242, 254, 0.8) !important;
}

/* 11. Prismatic Diamond 💎 (Pure White Diamond with Shimmer Sparkles) */
#floating-dice.skin-dice_diamond .die,
#floating-dice.skin-diamond .die,
.floating-dice-hud.skin-dice_diamond .die,
.floating-dice-hud.skin-diamond .die {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 30%, #fdf4ff 60%, #e2e8f0 100%) !important;
  border: 1.8px solid #ffffff !important;
  color: #0f172a !important;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  animation: diamondSparklePulse 2s infinite alternate ease-in-out !important;
}

@keyframes diamondSparklePulse {
  0% {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 1);
  }

  50% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.95), inset 0 1px 0 rgba(24df, 255, 255, 1);
  }

  100% {
    box-shadow: 0 0 22px rgba(236, 72, 153, 0.85), inset 0 1px 0 rgba(255, 255, 255, 1);
  }
}

/* 12. Pure 24K Gold ⬡ (Metallic Gold & Amber Sparkles) */
#floating-dice.skin-dice_gold .die,
#floating-dice.skin-gold .die,
.floating-dice-hud.skin-dice_gold .die,
.floating-dice-hud.skin-gold .die {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 50%, #b45309 100%) !important;
  border: 1.8px solid #fef08a !important;
  color: #451a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.9) !important;
  animation: goldSparkleGlow 2s infinite alternate ease-in-out !important;
}

@keyframes goldSparkleGlow {
  0% {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.7), inset 0 1px 0 rgba(254, 240, 138, 0.8);
  }

  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.95), inset 0 1px 0 rgba(254, 240, 138, 1);
  }
}

/* 13. Chromatic Rainbow RGB 🌈 (Animated Spectrum Flow) */
#floating-dice.skin-dice_rainbow .die,
#floating-dice.skin-rainbow .die,
.floating-dice-hud.skin-dice_rainbow .die,
.floating-dice-hud.skin-rainbow .die {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6, #ec4899, #ef4444) !important;
  background-size: 300% 300% !important;
  border: 1.8px solid #ffffff !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.95), 0 0 12px #ffffff !important;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  animation: rainbowDiceShift 3.5s ease infinite !important;
}

@keyframes rainbowDiceShift {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
  }

  33% {
    background-position: 50% 100%;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.85);
  }

  66% {
    background-position: 100% 50%;
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.85);
  }

  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
  }
}

/* 14. Inferno Fire 🔥 (Flame Orange/Yellow Magma Glow) */
#floating-dice.skin-dice_fire .die,
#floating-dice.skin-fire .die,
.floating-dice-hud.skin-dice_fire .die,
.floating-dice-hud.skin-fire .die {
  background: linear-gradient(145deg, #f97316 0%, #c2410c 100%) !important;
  border: 1.5px solid #fed7aa !important;
  color: #fff7ed !important;
  text-shadow: 0 0 6px #f59e0b, 0 0 12px #ea580c !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.85), inset 0 1px 0 rgba(253, 230, 138, 0.7) !important;
  animation: diceFirePulse 1.8s infinite alternate ease-in-out !important;
}

@keyframes diceFirePulse {
  0% {
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.6), inset 0 1px 0 rgba(253, 230, 138, 0.6);
  }

  100% {
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.9), inset 0 1px 0 rgba(254, 240, 138, 0.9);
  }
}

/* 15. Cyberpunk Neon ⚡ (Electric Cyan & Purple Neon) */
#floating-dice.skin-dice_neon .die,
#floating-dice.skin-neon .die,
.floating-dice-hud.skin-dice_neon .die,
.floating-dice-hud.skin-neon .die {
  background: linear-gradient(145deg, #06b6d4 0%, #4f46e5 100%) !important;
  border: 1.5px solid #67e8f9 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px #22d3ee, 0 0 16px #06b6d4 !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.85), inset 0 1px 0 rgba(165, 243, 252, 0.8) !important;
}

/* 16. Cosmic Galaxy 🌌 (Deep Nebula Starlight Violet) */
#floating-dice.skin-dice_cosmic .die,
#floating-dice.skin-cosmic .die,
.floating-dice-hud.skin-dice_cosmic .die,
.floating-dice-hud.skin-cosmic .die {
  background: linear-gradient(145deg, #a855f7 0%, #3b0764 100%) !important;
  border: 1.5px solid #e9d5ff !important;
  color: #faf5ff !important;
  text-shadow: 0 0 8px #c084fc, 0 0 16px #9333ea !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.85), inset 0 1px 0 rgba(233, 213, 255, 0.8) !important;
}

/* ==========================================================================
   BICOLOR DUAL CUBES (UN DADO DE UN COLOR Y EL OTRO DEL OTRO COLOR)
   ========================================================================== */

/* 17. Bicolor: Fuego y Hielo (Dado 1 = Fuego Ardiente, Dado 2 = Hielo Glacial) */
#floating-dice.skin-dice_bicolor_fire_ice #die-1,
#floating-dice.skin-bicolor_fire_ice #die-1,
.floating-dice-hud.skin-dice_bicolor_fire_ice #die-1,
.floating-dice-hud.skin-bicolor_fire_ice #die-1,
.die.die-1.skin-dice_bicolor_fire_ice,
.die.die-1.skin-bicolor_fire_ice,
#falling-die-1.skin-dice_bicolor_fire_ice,
#falling-die-1.skin-bicolor_fire_ice,
.falling-dice-tray.skin-dice_bicolor_fire_ice #falling-die-1,
.falling-dice-tray.skin-bicolor_fire_ice #falling-die-1,
#casino-die-1.skin-dice_bicolor_fire_ice,
#casino-die-1.skin-bicolor_fire_ice,
#casino-dice-box.skin-dice_bicolor_fire_ice #casino-die-1,
#casino-dice-box.skin-bicolor_fire_ice #casino-die-1,
.order-3d-die.skin-dice_bicolor_fire_ice:first-of-type,
.order-3d-die.skin-bicolor_fire_ice:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_fire_ice,
.order-3d-die.die-1.skin-bicolor_fire_ice,
.order-dice-pair.skin-dice_bicolor_fire_ice .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_fire_ice .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #fbbf24 0%, #f97316 45%, #dc2626 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #f97316 !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_fire_ice #die-1 .die-face,
#floating-dice.skin-bicolor_fire_ice #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_fire_ice #die-1 .die-face,
.floating-dice-hud.skin-bicolor_fire_ice #die-1 .die-face,
.die.die-1.skin-dice_bicolor_fire_ice .die-face,
.die.die-1.skin-bicolor_fire_ice .die-face,
.order-3d-die.skin-dice_bicolor_fire_ice:first-of-type .die-face,
.order-3d-die.skin-bicolor_fire_ice:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_fire_ice .die-face,
.order-3d-die.die-1.skin-bicolor_fire_ice .die-face,
.order-dice-pair.skin-dice_bicolor_fire_ice .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_fire_ice .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #fbbf24 0%, #f97316 45%, #dc2626 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.5), 0 0 16px rgba(239, 68, 68, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_fire_ice #die-2,
#floating-dice.skin-bicolor_fire_ice #die-2,
.floating-dice-hud.skin-dice_bicolor_fire_ice #die-2,
.floating-dice-hud.skin-bicolor_fire_ice #die-2,
.die.die-2.skin-dice_bicolor_fire_ice,
.die.die-2.skin-bicolor_fire_ice,
#falling-die-2.skin-dice_bicolor_fire_ice,
#falling-die-2.skin-bicolor_fire_ice,
.falling-dice-tray.skin-dice_bicolor_fire_ice #falling-die-2,
.falling-dice-tray.skin-bicolor_fire_ice #falling-die-2,
#casino-die-2.skin-dice_bicolor_fire_ice,
#casino-die-2.skin-bicolor_fire_ice,
#casino-dice-box.skin-dice_bicolor_fire_ice #casino-die-2,
#casino-dice-box.skin-bicolor_fire_ice #casino-die-2,
.order-3d-die.skin-dice_bicolor_fire_ice:last-of-type,
.order-3d-die.skin-bicolor_fire_ice:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_fire_ice,
.order-3d-die.die-2.skin-bicolor_fire_ice,
.order-dice-pair.skin-dice_bicolor_fire_ice .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_fire_ice .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #7dd3fc 0%, #0284c7 45%, #0c4a6e 100%) !important;
  border: 1.5px solid #bae6fd !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.85), inset 0 1px 0 rgba(186, 230, 253, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_fire_ice #die-2 .die-face,
#floating-dice.skin-bicolor_fire_ice #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_fire_ice #die-2 .die-face,
.floating-dice-hud.skin-bicolor_fire_ice #die-2 .die-face,
.die.die-2.skin-dice_bicolor_fire_ice .die-face,
.die.die-2.skin-bicolor_fire_ice .die-face,
.order-3d-die.skin-dice_bicolor_fire_ice:last-of-type .die-face,
.order-3d-die.skin-bicolor_fire_ice:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_fire_ice .die-face,
.order-3d-die.die-2.skin-bicolor_fire_ice .die-face,
.order-dice-pair.skin-dice_bicolor_fire_ice .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_fire_ice .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #7dd3fc 0%, #0284c7 45%, #0c4a6e 100%) !important;
  border: 1.5px solid #bae6fd !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(186, 230, 253, 0.45), 0 0 16px rgba(14, 165, 233, 0.85) !important;
}

/* 18. Bicolor: Oro y Obsidiana (Dado 1 = Obsidiana Negra, Dado 2 = Oro Puro 24K) */
#floating-dice.skin-dice_bicolor_black_gold #die-1,
#floating-dice.skin-bicolor_black_gold #die-1,
.floating-dice-hud.skin-dice_bicolor_black_gold #die-1,
.floating-dice-hud.skin-bicolor_black_gold #die-1,
.die.die-1.skin-dice_bicolor_black_gold,
.die.die-1.skin-bicolor_black_gold,
#falling-die-1.skin-dice_bicolor_black_gold,
#falling-die-1.skin-bicolor_black_gold,
.falling-dice-tray.skin-dice_bicolor_black_gold #falling-die-1,
.falling-dice-tray.skin-bicolor_black_gold #falling-die-1,
#casino-die-1.skin-dice_bicolor_black_gold,
#casino-die-1.skin-bicolor_black_gold,
#casino-dice-box.skin-dice_bicolor_black_gold #casino-die-1,
#casino-dice-box.skin-bicolor_black_gold #casino-die-1,
.order-3d-die.skin-dice_bicolor_black_gold:first-of-type,
.order-3d-die.skin-bicolor_black_gold:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_black_gold,
.order-3d-die.die-1.skin-bicolor_black_gold,
.order-dice-pair.skin-dice_bicolor_black_gold .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_black_gold .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffd700 !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #f59e0b !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55), inset 0 0 8px rgba(0, 0, 0, 0.9) !important;
}

#floating-dice.skin-dice_bicolor_black_gold #die-1 .die-face,
#floating-dice.skin-bicolor_black_gold #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_black_gold #die-1 .die-face,
.floating-dice-hud.skin-bicolor_black_gold #die-1 .die-face,
.die.die-1.skin-dice_bicolor_black_gold .die-face,
.die.die-1.skin-bicolor_black_gold .die-face,
.order-3d-die.skin-dice_bicolor_black_gold:first-of-type .die-face,
.order-3d-die.skin-bicolor_black_gold:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_black_gold .die-face,
.order-3d-die.die-1.skin-bicolor_black_gold .die-face,
.order-dice-pair.skin-dice_bicolor_black_gold .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_black_gold .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffd700 !important;
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.45), 0 0 16px rgba(251, 191, 36, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_black_gold #die-2,
#floating-dice.skin-bicolor_black_gold #die-2,
.floating-dice-hud.skin-dice_bicolor_black_gold #die-2,
.floating-dice-hud.skin-bicolor_black_gold #die-2,
.die.die-2.skin-dice_bicolor_black_gold,
.die.die-2.skin-bicolor_black_gold,
#falling-die-2.skin-dice_bicolor_black_gold,
#falling-die-2.skin-bicolor_black_gold,
.falling-dice-tray.skin-dice_bicolor_black_gold #falling-die-2,
.falling-dice-tray.skin-bicolor_black_gold #falling-die-2,
#casino-die-2.skin-dice_bicolor_black_gold,
#casino-die-2.skin-bicolor_black_gold,
#casino-dice-box.skin-dice_bicolor_black_gold #casino-die-2,
#casino-dice-box.skin-bicolor_black_gold #casino-die-2,
.order-3d-die.skin-dice_bicolor_black_gold:last-of-type,
.order-3d-die.skin-bicolor_black_gold:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_black_gold,
.order-3d-die.die-2.skin-bicolor_black_gold,
.order-dice-pair.skin-dice_bicolor_black_gold .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_black_gold .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_black_gold #die-2 .die-face,
#floating-dice.skin-bicolor_black_gold #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_black_gold #die-2 .die-face,
.floating-dice-hud.skin-bicolor_black_gold #die-2 .die-face,
.die.die-2.skin-dice_bicolor_black_gold .die-face,
.die.die-2.skin-bicolor_black_gold .die-face,
.order-3d-die.skin-dice_bicolor_black_gold:last-of-type .die-face,
.order-3d-die.skin-bicolor_black_gold:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_black_gold .die-face,
.order-3d-die.die-2.skin-bicolor_black_gold .die-face,
.order-dice-pair.skin-dice_bicolor_black_gold .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_black_gold .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.6), 0 0 18px rgba(245, 158, 11, 0.8) !important;
}

/* 19. Bicolor: Cyberpunk Neon (Dado 1 = Cian Electrico, Dado 2 = Magenta Vaporwave) */
#floating-dice.skin-dice_bicolor_cyber_neon #die-1,
#floating-dice.skin-bicolor_cyber_neon #die-1,
.floating-dice-hud.skin-dice_bicolor_cyber_neon #die-1,
.floating-dice-hud.skin-bicolor_cyber_neon #die-1,
.die.die-1.skin-dice_bicolor_cyber_neon,
.die.die-1.skin-bicolor_cyber_neon,
#falling-die-1.skin-dice_bicolor_cyber_neon,
#falling-die-1.skin-bicolor_cyber_neon,
.falling-dice-tray.skin-dice_bicolor_cyber_neon #falling-die-1,
.falling-dice-tray.skin-bicolor_cyber_neon #falling-die-1,
#casino-die-1.skin-dice_bicolor_cyber_neon,
#casino-die-1.skin-bicolor_cyber_neon,
#casino-dice-box.skin-dice_bicolor_cyber_neon #casino-die-1,
#casino-dice-box.skin-bicolor_cyber_neon #casino-die-1,
.order-3d-die.skin-dice_bicolor_cyber_neon:first-of-type,
.order-3d-die.skin-bicolor_cyber_neon:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_cyber_neon,
.order-3d-die.die-1.skin-bicolor_cyber_neon,
.order-dice-pair.skin-dice_bicolor_cyber_neon .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_cyber_neon .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #00f3ff 0%, #0891b2 50%, #083344 100%) !important;
  border: 1.5px solid #00f3ff !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px #00f3ff, 0 0 16px #0891b2 !important;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.9), inset 0 0 8px rgba(0, 243, 255, 0.5) !important;
}

#floating-dice.skin-dice_bicolor_cyber_neon #die-1 .die-face,
#floating-dice.skin-bicolor_cyber_neon #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_cyber_neon #die-1 .die-face,
.floating-dice-hud.skin-bicolor_cyber_neon #die-1 .die-face,
.die.die-1.skin-dice_bicolor_cyber_neon .die-face,
.die.die-1.skin-bicolor_cyber_neon .die-face,
.order-3d-die.skin-dice_bicolor_cyber_neon:first-of-type .die-face,
.order-3d-die.skin-bicolor_cyber_neon:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_cyber_neon .die-face,
.order-3d-die.die-1.skin-bicolor_cyber_neon .die-face,
.order-dice-pair.skin-dice_bicolor_cyber_neon .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_cyber_neon .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #090d16 0%, #083344 50%, #00f3ff 100%) !important;
  border: 1.5px solid #00f3ff !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.4), 0 0 16px rgba(0, 240, 255, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_cyber_neon #die-2,
#floating-dice.skin-bicolor_cyber_neon #die-2,
.floating-dice-hud.skin-dice_bicolor_cyber_neon #die-2,
.floating-dice-hud.skin-bicolor_cyber_neon #die-2,
.die.die-2.skin-dice_bicolor_cyber_neon,
.die.die-2.skin-bicolor_cyber_neon,
#falling-die-2.skin-dice_bicolor_cyber_neon,
#falling-die-2.skin-bicolor_cyber_neon,
.falling-dice-tray.skin-dice_bicolor_cyber_neon #falling-die-2,
.falling-dice-tray.skin-bicolor_cyber_neon #falling-die-2,
#casino-die-2.skin-dice_bicolor_cyber_neon,
#casino-die-2.skin-bicolor_cyber_neon,
#casino-dice-box.skin-dice_bicolor_cyber_neon #casino-die-2,
#casino-dice-box.skin-bicolor_cyber_neon #casino-die-2,
.order-3d-die.skin-dice_bicolor_cyber_neon:last-of-type,
.order-3d-die.skin-bicolor_cyber_neon:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_cyber_neon,
.order-3d-die.die-2.skin-bicolor_cyber_neon,
.order-dice-pair.skin-dice_bicolor_cyber_neon .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_cyber_neon .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #f472b6 0%, #ec4899 45%, #831843 100%) !important;
  border: 1.5px solid #f472b6 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px #f472b6, 0 0 16px #ec4899 !important;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.9), inset 0 0 8px rgba(236, 72, 153, 0.5) !important;
}

#floating-dice.skin-dice_bicolor_cyber_neon #die-2 .die-face,
#floating-dice.skin-bicolor_cyber_neon #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_cyber_neon #die-2 .die-face,
.floating-dice-hud.skin-bicolor_cyber_neon #die-2 .die-face,
.die.die-2.skin-dice_bicolor_cyber_neon .die-face,
.die.die-2.skin-bicolor_cyber_neon .die-face,
.order-3d-die.skin-dice_bicolor_cyber_neon:last-of-type .die-face,
.order-3d-die.skin-bicolor_cyber_neon:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_cyber_neon .die-face,
.order-3d-die.die-2.skin-bicolor_cyber_neon .die-face,
.order-dice-pair.skin-dice_bicolor_cyber_neon .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_cyber_neon .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #1a0826 0%, #4a044e 50%, #ec4899 100%) !important;
  border: 1.5px solid #f472b6 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(236, 72, 153, 0.4), 0 0 16px rgba(236, 72, 153, 0.8) !important;
}

/* 20. Bicolor: Esmeralda y Oro (Dado 1 = Esmeralda Imperial, Dado 2 = Oro Noble) */
#floating-dice.skin-dice_bicolor_emerald_gold #die-1,
#floating-dice.skin-bicolor_emerald_gold #die-1,
.floating-dice-hud.skin-dice_bicolor_emerald_gold #die-1,
.floating-dice-hud.skin-bicolor_emerald_gold #die-1,
.die.die-1.skin-dice_bicolor_emerald_gold,
.die.die-1.skin-bicolor_emerald_gold,
#falling-die-1.skin-dice_bicolor_emerald_gold,
#falling-die-1.skin-bicolor_emerald_gold,
.falling-dice-tray.skin-dice_bicolor_emerald_gold #falling-die-1,
.falling-dice-tray.skin-bicolor_emerald_gold #falling-die-1,
#casino-die-1.skin-dice_bicolor_emerald_gold,
#casino-die-1.skin-bicolor_emerald_gold,
#casino-dice-box.skin-dice_bicolor_emerald_gold #casino-die-1,
#casino-dice-box.skin-bicolor_emerald_gold #casino-die-1,
.order-3d-die.skin-dice_bicolor_emerald_gold:first-of-type,
.order-3d-die.skin-bicolor_emerald_gold:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_emerald_gold,
.order-3d-die.die-1.skin-bicolor_emerald_gold,
.order-dice-pair.skin-dice_bicolor_emerald_gold .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_emerald_gold .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #34d399 0%, #10b981 45%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #fef08a !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.85), inset 0 1px 0 rgba(167, 243, 208, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_emerald_gold #die-1 .die-face,
#floating-dice.skin-bicolor_emerald_gold #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_emerald_gold #die-1 .die-face,
.floating-dice-hud.skin-bicolor_emerald_gold #die-1 .die-face,
.die.die-1.skin-dice_bicolor_emerald_gold .die-face,
.die.die-1.skin-bicolor_emerald_gold .die-face,
.order-3d-die.skin-dice_bicolor_emerald_gold:first-of-type .die-face,
.order-3d-die.skin-bicolor_emerald_gold:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_emerald_gold .die-face,
.order-3d-die.die-1.skin-bicolor_emerald_gold .die-face,
.order-dice-pair.skin-dice_bicolor_emerald_gold .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_emerald_gold .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #34d399 0%, #10b981 45%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #fef08a !important;
  box-shadow: inset 0 0 8px rgba(167, 243, 208, 0.5), 0 0 16px rgba(16, 185, 129, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_emerald_gold #die-2,
#floating-dice.skin-bicolor_emerald_gold #die-2,
.floating-dice-hud.skin-dice_bicolor_emerald_gold #die-2,
.floating-dice-hud.skin-bicolor_emerald_gold #die-2,
.die.die-2.skin-dice_bicolor_emerald_gold,
.die.die-2.skin-bicolor_emerald_gold,
#falling-die-2.skin-dice_bicolor_emerald_gold,
#falling-die-2.skin-bicolor_emerald_gold,
.falling-dice-tray.skin-dice_bicolor_emerald_gold #falling-die-2,
.falling-dice-tray.skin-bicolor_emerald_gold #falling-die-2,
#casino-die-2.skin-dice_bicolor_emerald_gold,
#casino-die-2.skin-bicolor_emerald_gold,
#casino-dice-box.skin-dice_bicolor_emerald_gold #casino-die-2,
#casino-dice-box.skin-bicolor_emerald_gold #casino-die-2,
.order-3d-die.skin-dice_bicolor_emerald_gold:last-of-type,
.order-3d-die.skin-bicolor_emerald_gold:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_emerald_gold,
.order-3d-die.die-2.skin-bicolor_emerald_gold,
.order-dice-pair.skin-dice_bicolor_emerald_gold .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_emerald_gold .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #fef08a 0%, #eab308 50%, #854d0e 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #064e3b !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_emerald_gold #die-2 .die-face,
#floating-dice.skin-bicolor_emerald_gold #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_emerald_gold #die-2 .die-face,
.floating-dice-hud.skin-bicolor_emerald_gold #die-2 .die-face,
.die.die-2.skin-dice_bicolor_emerald_gold .die-face,
.die.die-2.skin-bicolor_emerald_gold .die-face,
.order-3d-die.skin-dice_bicolor_emerald_gold:last-of-type .die-face,
.order-3d-die.skin-bicolor_emerald_gold:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_emerald_gold .die-face,
.order-3d-die.die-2.skin-bicolor_emerald_gold .die-face,
.order-dice-pair.skin-dice_bicolor_emerald_gold .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_emerald_gold .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #fef08a 0%, #eab308 50%, #854d0e 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #064e3b !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.6), 0 0 18px rgba(234, 179, 8, 0.8) !important;
}

/* 21. Bicolor: Atardecer Crepuscular (Dado 1 = Amatista Nocturna, Dado 2 = Ambar Solar) */
#floating-dice.skin-dice_bicolor_twilight #die-1,
#floating-dice.skin-bicolor_twilight #die-1,
.floating-dice-hud.skin-dice_bicolor_twilight #die-1,
.floating-dice-hud.skin-bicolor_twilight #die-1,
.die.die-1.skin-dice_bicolor_twilight,
.die.die-1.skin-bicolor_twilight,
#falling-die-1.skin-dice_bicolor_twilight,
#falling-die-1.skin-bicolor_twilight,
.falling-dice-tray.skin-dice_bicolor_twilight #falling-die-1,
.falling-dice-tray.skin-bicolor_twilight #falling-die-1,
#casino-die-1.skin-dice_bicolor_twilight,
#casino-die-1.skin-bicolor_twilight,
#casino-dice-box.skin-dice_bicolor_twilight #casino-die-1,
#casino-dice-box.skin-bicolor_twilight #casino-die-1,
.order-3d-die.skin-dice_bicolor_twilight:first-of-type,
.order-3d-die.skin-bicolor_twilight:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_twilight,
.order-3d-die.die-1.skin-bicolor_twilight,
.order-dice-pair.skin-dice_bicolor_twilight .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_twilight .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #c084fc 0%, #7c3aed 50%, #3b0764 100%) !important;
  border: 1.5px solid #c084fc !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #c084fc !important;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.85), inset 0 1px 0 rgba(233, 213, 255, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_twilight #die-1 .die-face,
#floating-dice.skin-bicolor_twilight #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_twilight #die-1 .die-face,
.floating-dice-hud.skin-bicolor_twilight #die-1 .die-face,
.die.die-1.skin-dice_bicolor_twilight .die-face,
.die.die-1.skin-bicolor_twilight .die-face,
.order-3d-die.skin-dice_bicolor_twilight:first-of-type .die-face,
.order-3d-die.skin-bicolor_twilight:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_twilight .die-face,
.order-3d-die.die-1.skin-bicolor_twilight .die-face,
.order-dice-pair.skin-dice_bicolor_twilight .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_twilight .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #c084fc 0%, #7c3aed 50%, #3b0764 100%) !important;
  border: 1.5px solid #c084fc !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(233, 213, 255, 0.5), 0 0 16px rgba(124, 58, 237, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_twilight #die-2,
#floating-dice.skin-bicolor_twilight #die-2,
.floating-dice-hud.skin-dice_bicolor_twilight #die-2,
.floating-dice-hud.skin-bicolor_twilight #die-2,
.die.die-2.skin-dice_bicolor_twilight,
.die.die-2.skin-bicolor_twilight,
#falling-die-2.skin-dice_bicolor_twilight,
#falling-die-2.skin-bicolor_twilight,
.falling-dice-tray.skin-dice_bicolor_twilight #falling-die-2,
.falling-dice-tray.skin-bicolor_twilight #falling-die-2,
#casino-die-2.skin-dice_bicolor_twilight,
#casino-die-2.skin-bicolor_twilight,
#casino-dice-box.skin-dice_bicolor_twilight #casino-die-2,
#casino-dice-box.skin-bicolor_twilight #casino-die-2,
.order-3d-die.skin-dice_bicolor_twilight:last-of-type,
.order-3d-die.skin-bicolor_twilight:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_twilight,
.order-3d-die.die-2.skin-bicolor_twilight,
.order-dice-pair.skin-dice_bicolor_twilight .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_twilight .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #fbbf24 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px #ea580c !important;
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.85), inset 0 1px 0 rgba(254, 215, 170, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_twilight #die-2 .die-face,
#floating-dice.skin-bicolor_twilight #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_twilight #die-2 .die-face,
.floating-dice-hud.skin-bicolor_twilight #die-2 .die-face,
.die.die-2.skin-dice_bicolor_twilight .die-face,
.die.die-2.skin-bicolor_twilight .die-face,
.order-3d-die.skin-dice_bicolor_twilight:last-of-type .die-face,
.order-3d-die.skin-bicolor_twilight:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_twilight .die-face,
.order-3d-die.die-2.skin-bicolor_twilight .die-face,
.order-dice-pair.skin-dice_bicolor_twilight .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_twilight .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #fbbf24 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(254, 215, 170, 0.5), 0 0 16px rgba(234, 88, 12, 0.8) !important;
}

/* 22. Bicolor: Yin Yang (Dado 1 = Yin Blanco Marfil, Dado 2 = Yang Negro Ebano) */
#floating-dice.skin-dice_bicolor_yinyang #die-1,
#floating-dice.skin-bicolor_yinyang #die-1,
.floating-dice-hud.skin-dice_bicolor_yinyang #die-1,
.floating-dice-hud.skin-bicolor_yinyang #die-1,
.die.die-1.skin-dice_bicolor_yinyang,
.die.die-1.skin-bicolor_yinyang,
#falling-die-1.skin-dice_bicolor_yinyang,
#falling-die-1.skin-bicolor_yinyang,
.falling-dice-tray.skin-dice_bicolor_yinyang #falling-die-1,
.falling-dice-tray.skin-bicolor_yinyang #falling-die-1,
#casino-die-1.skin-dice_bicolor_yinyang,
#casino-die-1.skin-bicolor_yinyang,
#casino-dice-box.skin-dice_bicolor_yinyang #casino-die-1,
#casino-dice-box.skin-bicolor_yinyang #casino-die-1,
.order-3d-die.skin-dice_bicolor_yinyang:first-of-type,
.order-3d-die.skin-bicolor_yinyang:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_yinyang,
.order-3d-die.die-1.skin-bicolor_yinyang,
.order-dice-pair.skin-dice_bicolor_yinyang .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_yinyang .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%) !important;
  border: 1.5px solid #94a3b8 !important;
  color: #020617 !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

#floating-dice.skin-dice_bicolor_yinyang #die-1 .die-face,
#floating-dice.skin-bicolor_yinyang #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_yinyang #die-1 .die-face,
.floating-dice-hud.skin-bicolor_yinyang #die-1 .die-face,
.die.die-1.skin-dice_bicolor_yinyang .die-face,
.die.die-1.skin-bicolor_yinyang .die-face,
.order-3d-die.skin-dice_bicolor_yinyang:first-of-type .die-face,
.order-3d-die.skin-bicolor_yinyang:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_yinyang .die-face,
.order-3d-die.die-1.skin-bicolor_yinyang .die-face,
.order-dice-pair.skin-dice_bicolor_yinyang .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_yinyang .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 60%, #e2e8f0 100%) !important;
  border: 1.5px solid #94a3b8 !important;
  color: #020617 !important;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.15), 0 0 14px rgba(255, 255, 255, 0.6) !important;
}

#floating-dice.skin-dice_bicolor_yinyang #die-2,
#floating-dice.skin-bicolor_yinyang #die-2,
.floating-dice-hud.skin-dice_bicolor_yinyang #die-2,
.floating-dice-hud.skin-bicolor_yinyang #die-2,
.die.die-2.skin-dice_bicolor_yinyang,
.die.die-2.skin-bicolor_yinyang,
#falling-die-2.skin-dice_bicolor_yinyang,
#falling-die-2.skin-bicolor_yinyang,
.falling-dice-tray.skin-dice_bicolor_yinyang #falling-die-2,
.falling-dice-tray.skin-bicolor_yinyang #falling-die-2,
#casino-die-2.skin-dice_bicolor_yinyang,
#casino-die-2.skin-bicolor_yinyang,
#casino-dice-box.skin-dice_bicolor_yinyang #casino-die-2,
#casino-dice-box.skin-bicolor_yinyang #casino-die-2,
.order-3d-die.skin-dice_bicolor_yinyang:last-of-type,
.order-3d-die.skin-bicolor_yinyang:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_yinyang,
.order-3d-die.die-2.skin-bicolor_yinyang,
.order-dice-pair.skin-dice_bicolor_yinyang .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_yinyang .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
  border: 1.5px solid #64748b !important;
  color: #ffffff !important;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9) !important;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

#floating-dice.skin-dice_bicolor_yinyang #die-2 .die-face,
#floating-dice.skin-bicolor_yinyang #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_yinyang #die-2 .die-face,
.floating-dice-hud.skin-bicolor_yinyang #die-2 .die-face,
.die.die-2.skin-dice_bicolor_yinyang .die-face,
.die.die-2.skin-bicolor_yinyang .die-face,
.order-3d-die.skin-dice_bicolor_yinyang:last-of-type .die-face,
.order-3d-die.skin-bicolor_yinyang:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_yinyang .die-face,
.order-3d-die.die-2.skin-bicolor_yinyang .die-face,
.order-dice-pair.skin-dice_bicolor_yinyang .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_yinyang .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
  border: 1.5px solid #64748b !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 0, 0, 0.9) !important;
}

/* 23. Bicolor: Sangre y Vacio (Dado 1 = Sangre Carmesi, Dado 2 = Vacio Abisal) */
#floating-dice.skin-dice_bicolor_blood_void #die-1,
#floating-dice.skin-bicolor_blood_void #die-1,
.floating-dice-hud.skin-dice_bicolor_blood_void #die-1,
.floating-dice-hud.skin-bicolor_blood_void #die-1,
.die.die-1.skin-dice_bicolor_blood_void,
.die.die-1.skin-bicolor_blood_void,
#falling-die-1.skin-dice_bicolor_blood_void,
#falling-die-1.skin-bicolor_blood_void,
.falling-dice-tray.skin-dice_bicolor_blood_void #falling-die-1,
.falling-dice-tray.skin-bicolor_blood_void #falling-die-1,
#casino-die-1.skin-dice_bicolor_blood_void,
#casino-die-1.skin-bicolor_blood_void,
#casino-dice-box.skin-dice_bicolor_blood_void #casino-die-1,
#casino-dice-box.skin-bicolor_blood_void #casino-die-1,
.order-3d-die.skin-dice_bicolor_blood_void:first-of-type,
.order-3d-die.skin-bicolor_blood_void:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_blood_void,
.order-3d-die.die-1.skin-bicolor_blood_void,
.order-dice-pair.skin-dice_bicolor_blood_void .order-3d-die:first-of-type,
.order-dice-pair.skin-bicolor_blood_void .order-3d-die:first-of-type {
  background: linear-gradient(145deg, #f87171 0%, #dc2626 45%, #7f1d1d 100%) !important;
  border: 1.5px solid #f87171 !important;
  color: #fee2e2 !important;
  text-shadow: 0 0 8px #ef4444, 0 0 16px #991b1b !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85), inset 0 1px 0 rgba(254, 202, 202, 0.7) !important;
}

#floating-dice.skin-dice_bicolor_blood_void #die-1 .die-face,
#floating-dice.skin-bicolor_blood_void #die-1 .die-face,
.floating-dice-hud.skin-dice_bicolor_blood_void #die-1 .die-face,
.floating-dice-hud.skin-bicolor_blood_void #die-1 .die-face,
.die.die-1.skin-dice_bicolor_blood_void .die-face,
.die.die-1.skin-bicolor_blood_void .die-face,
.order-3d-die.skin-dice_bicolor_blood_void:first-of-type .die-face,
.order-3d-die.skin-bicolor_blood_void:first-of-type .die-face,
.order-3d-die.die-1.skin-dice_bicolor_blood_void .die-face,
.order-3d-die.die-1.skin-bicolor_blood_void .die-face,
.order-dice-pair.skin-dice_bicolor_blood_void .order-3d-die:first-of-type .die-face,
.order-dice-pair.skin-bicolor_blood_void .order-3d-die:first-of-type .die-face {
  background: linear-gradient(145deg, #f87171 0%, #dc2626 45%, #7f1d1d 100%) !important;
  border: 1.5px solid #f87171 !important;
  color: #fee2e2 !important;
  box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.5), 0 0 16px rgba(220, 38, 38, 0.8) !important;
}

#floating-dice.skin-dice_bicolor_blood_void #die-2,
#floating-dice.skin-bicolor_blood_void #die-2,
.floating-dice-hud.skin-dice_bicolor_blood_void #die-2,
.floating-dice-hud.skin-bicolor_blood_void #die-2,
.die.die-2.skin-dice_bicolor_blood_void,
.die.die-2.skin-bicolor_blood_void,
#falling-die-2.skin-dice_bicolor_blood_void,
#falling-die-2.skin-bicolor_blood_void,
.falling-dice-tray.skin-dice_bicolor_blood_void #falling-die-2,
.falling-dice-tray.skin-bicolor_blood_void #falling-die-2,
#casino-die-2.skin-dice_bicolor_blood_void,
#casino-die-2.skin-bicolor_blood_void,
#casino-dice-box.skin-dice_bicolor_blood_void #casino-die-2,
#casino-dice-box.skin-bicolor_blood_void #casino-die-2,
.order-3d-die.skin-dice_bicolor_blood_void:last-of-type,
.order-3d-die.skin-bicolor_blood_void:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_blood_void,
.order-3d-die.die-2.skin-bicolor_blood_void,
.order-dice-pair.skin-dice_bicolor_blood_void .order-3d-die:last-of-type,
.order-dice-pair.skin-bicolor_blood_void .order-3d-die:last-of-type {
  background: linear-gradient(145deg, #090d16 0%, #020617 60%, #000000 100%) !important;
  border: 1.5px solid #6366f1 !important;
  color: #c7d2fe !important;
  text-shadow: 0 0 8px #6366f1, 0 0 16px #4338ca !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.95) !important;
}

#floating-dice.skin-dice_bicolor_blood_void #die-2 .die-face,
#floating-dice.skin-bicolor_blood_void #die-2 .die-face,
.floating-dice-hud.skin-dice_bicolor_blood_void #die-2 .die-face,
.floating-dice-hud.skin-bicolor_blood_void #die-2 .die-face,
.die.die-2.skin-dice_bicolor_blood_void .die-face,
.die.die-2.skin-bicolor_blood_void .die-face,
.order-3d-die.skin-dice_bicolor_blood_void:last-of-type .die-face,
.order-3d-die.skin-bicolor_blood_void:last-of-type .die-face,
.order-3d-die.die-2.skin-dice_bicolor_blood_void .die-face,
.order-3d-die.die-2.skin-bicolor_blood_void .die-face,
.order-dice-pair.skin-dice_bicolor_blood_void .order-3d-die:last-of-type .die-face,
.order-dice-pair.skin-bicolor_blood_void .order-3d-die:last-of-type .die-face {
  background: linear-gradient(145deg, #090d16 0%, #020617 60%, #000000 100%) !important;
  border: 1.5px solid #6366f1 !important;
  color: #c7d2fe !important;
  box-shadow: inset 0 0 8px rgba(99, 102, 241, 0.35), 0 0 16px rgba(99, 102, 241, 0.6) !important;
}

/* 24. PIONEER FOUNDER EXCLUSIVE DICE 24K 👑 (Only for top ranking pioneers) */
#floating-dice.skin-dice_pioneer_founder .die,
#floating-dice.skin-pioneer_founder .die,
.floating-dice-hud.skin-dice_pioneer_founder .die,
.floating-dice-hud.skin-pioneer_founder .die,
.order-3d-die.skin-dice_pioneer_founder,
.order-3d-die.skin-pioneer_founder,
.casino-die.skin-dice_pioneer_founder,
.skin-dice_pioneer_founder .casino-die {
  background: linear-gradient(135deg,
      #fff7c2 0%,
      #ffd700 18%,
      #f59e0b 38%,
      #fffbeb 52%,
      #ffd700 68%,
      #b45309 85%,
      #fef08a 100%) !important;
  background-size: 220% 220% !important;
  border: 2px solid #fff5a6 !important;
  color: #0f172a !important;
  box-shadow:
    0 0 24px rgba(251, 191, 36, 0.95),
    0 0 10px rgba(245, 158, 11, 0.8),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(146, 64, 14, 0.7) !important;
  animation: goldPioneerShimmer 3.2s infinite ease-in-out alternate !important;
}

#floating-dice.skin-dice_pioneer_founder .die .die-pip,
#floating-dice.skin-pioneer_founder .die .die-pip,
.floating-dice-hud.skin-dice_pioneer_founder .die .die-pip,
.floating-dice-hud.skin-pioneer_founder .die .die-pip,
.order-3d-die.skin-dice_pioneer_founder .die-pip,
.order-3d-die.skin-pioneer_founder .die-pip {
  background: radial-gradient(circle at 35% 35%, #1e293b 0%, #090d16 80%) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 245, 166, 0.9),
    0 1px 3px rgba(251, 191, 36, 0.7) !important;
}

#floating-dice.skin-dice_pioneer_founder .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-pioneer_founder .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_pioneer_founder .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-pioneer_founder .die[data-val="1"] .die-pip.pip-center {
  background: radial-gradient(circle at 35% 35%, #ef4444 0%, #991b1b 75%, #450a0a 100%) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 0 1.2px #ffd700,
    0 0 10px rgba(239, 68, 68, 0.95) !important;
}

@keyframes goldPioneerShimmer {
  0% {
    background-position: 0% 0%;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  }

  100% {
    background-position: 100% 100%;
    box-shadow: 0 0 32px rgba(255, 215, 0, 1), 0 0 16px rgba(245, 158, 11, 0.9), inset 0 2px 6px rgba(255, 255, 255, 1);
  }
}

/* 25. Polished Copper (Cobre Forjado) 🟤 */
#floating-dice.skin-dice_copper .die,
#floating-dice.skin-copper .die,
.floating-dice-hud.skin-dice_copper .die,
.floating-dice-hud.skin-copper .die,
.die.skin-dice_copper,
.die.skin-copper,
.order-3d-die.skin-dice_copper,
.order-3d-die.skin-copper,
.casino-die.skin-dice_copper,
.skin-dice_copper .casino-die {
  background: linear-gradient(145deg, #f59e0b 0%, #d97706 25%, #b45309 55%, #78350f 85%, #451a03 100%) !important;
  border: 1.8px solid #fdba74 !important;
  color: #ffedd5 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 8px #fb923c !important;
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.8), inset 0 1px 0 rgba(254, 215, 170, 0.8) !important;
}

#floating-dice.skin-dice_copper .die .die-pip,
#floating-dice.skin-copper .die .die-pip,
.floating-dice-hud.skin-dice_copper .die .die-pip,
.floating-dice-hud.skin-copper .die .die-pip,
.die.skin-dice_copper .die-pip,
.die.skin-copper .die-pip,
.order-3d-die.skin-dice_copper .die-pip,
.order-3d-die.skin-copper .die-pip {
  background: #ffedd5 !important;
  box-shadow: 0 0 6px rgba(251, 146, 60, 0.85), inset 0 1px 1px rgba(120, 53, 15, 0.75) !important;
}

#floating-dice.skin-dice_copper .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-copper .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_copper .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-copper .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_copper[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_copper .die-pip.pip-center {
  background: #ea580c !important;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.95), inset 0 1px 1px rgba(0, 0, 0, 0.5) !important;
}

/* 26. Carved Wood (Roble Ancestral) 🪵 */
#floating-dice.skin-dice_wood_carved .die,
#floating-dice.skin-wood_carved .die,
.floating-dice-hud.skin-dice_wood_carved .die,
.floating-dice-hud.skin-wood_carved .die,
.die.skin-dice_wood_carved,
.die.skin-wood_carved,
.order-3d-die.skin-dice_wood_carved,
.order-3d-die.skin-wood_carved,
.casino-die.skin-dice_wood_carved,
.skin-dice_wood_carved .casino-die {
  background: linear-gradient(145deg, #92400e 0%, #78350f 35%, #542a0c 70%, #381a06 100%) !important;
  border: 1.8px solid #b45309 !important;
  color: #1a0902 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 6px #78350f !important;
  box-shadow: 0 0 14px rgba(120, 53, 15, 0.75), inset 0 1px 0 rgba(251, 191, 36, 0.55) !important;
}

#floating-dice.skin-dice_wood_carved .die .die-pip,
#floating-dice.skin-wood_carved .die .die-pip,
.floating-dice-hud.skin-dice_wood_carved .die .die-pip,
.floating-dice-hud.skin-wood_carved .die .die-pip,
.die.skin-dice_wood_carved .die-pip,
.die.skin-wood_carved .die-pip,
.order-3d-die.skin-dice_wood_carved .die-pip,
.order-3d-die.skin-wood_carved .die-pip {
  background: #1a0902 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 0.5px 0.5px rgba(251, 191, 36, 0.35) !important;
}

#floating-dice.skin-dice_wood_carved .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-wood_carved .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_wood_carved .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-wood_carved .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_wood_carved[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_wood_carved .die-pip.pip-center {
  background: #d97706 !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.95), inset 0 1px 1px rgba(0, 0, 0, 0.5) !important;
}

/* 27. Sea Pearl (Perla Nácar) 🦪 */
#floating-dice.skin-dice_pearl .die,
#floating-dice.skin-pearl .die,
.floating-dice-hud.skin-dice_pearl .die,
.floating-dice-hud.skin-pearl .die,
.die.skin-dice_pearl,
.die.skin-pearl,
.order-3d-die.skin-dice_pearl,
.order-3d-die.skin-pearl,
.casino-die.skin-dice_pearl,
.skin-dice_pearl .casino-die {
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 20%, #e0f2fe 45%, #ede9fe 68%, #fce7f3 85%, #e2e8f0 100%) !important;
  border: 1.8px solid #ffffff !important;
  color: #334155 !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.9), 0 0 8px rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 18px rgba(244, 114, 182, 0.55), 0 0 12px rgba(56, 189, 248, 0.5), inset 0 1px 0 #ffffff !important;
}

#floating-dice.skin-dice_pearl .die .die-pip,
#floating-dice.skin-pearl .die .die-pip,
.floating-dice-hud.skin-dice_pearl .die .die-pip,
.floating-dice-hud.skin-pearl .die .die-pip,
.die.skin-dice_pearl .die-pip,
.die.skin-pearl .die-pip,
.order-3d-die.skin-dice_pearl .die-pip,
.order-3d-die.skin-pearl .die-pip {
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 0 4px rgba(244, 114, 182, 0.55) !important;
}

#floating-dice.skin-dice_pearl .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-pearl .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_pearl .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-pearl .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_pearl[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_pearl .die-pip.pip-center {
  background: #f43f5e !important;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.95), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
}

/* 28. Turquoise (Turquesa Maya) 💎 */
#floating-dice.skin-dice_turquoise .die,
#floating-dice.skin-turquoise .die,
.floating-dice-hud.skin-dice_turquoise .die,
.floating-dice-hud.skin-turquoise .die,
.die.skin-dice_turquoise,
.die.skin-turquoise,
.order-3d-die.skin-dice_turquoise,
.order-3d-die.skin-turquoise,
.casino-die.skin-dice_turquoise,
.skin-dice_turquoise .casino-die {
  background: linear-gradient(145deg, #2dd4bf 0%, #14b8a6 28%, #0d9488 62%, #115e59 88%, #042f2e 100%) !important;
  border: 1.8px solid #fde047 !important;
  color: #fef08a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 8px #14b8a6 !important;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.8), 0 0 8px rgba(253, 224, 71, 0.4), inset 0 1px 0 rgba(254, 240, 138, 0.85) !important;
}

#floating-dice.skin-dice_turquoise .die .die-pip,
#floating-dice.skin-turquoise .die .die-pip,
.floating-dice-hud.skin-dice_turquoise .die .die-pip,
.floating-dice-hud.skin-turquoise .die .die-pip,
.die.skin-dice_turquoise .die-pip,
.die.skin-turquoise .die-pip,
.order-3d-die.skin-dice_turquoise .die-pip,
.order-3d-die.skin-turquoise .die-pip {
  background: #fef08a !important;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.95), inset 0 1px 1px rgba(113, 63, 18, 0.65) !important;
}

#floating-dice.skin-dice_turquoise .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-turquoise .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_turquoise .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-turquoise .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_turquoise[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_turquoise .die-pip.pip-center {
  background: #dc2626 !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.95), inset 0 1px 1px rgba(254, 240, 138, 0.85) !important;
}

/* 29. Frostbite Ice (Escarcha Glacial) ❄️ */
#floating-dice.skin-dice_frostbite .die,
#floating-dice.skin-frostbite .die,
.floating-dice-hud.skin-dice_frostbite .die,
.floating-dice-hud.skin-frostbite .die,
.die.skin-dice_frostbite,
.die.skin-frostbite,
.order-3d-die.skin-dice_frostbite,
.order-3d-die.skin-frostbite,
.casino-die.skin-dice_frostbite,
.skin-dice_frostbite .casino-die {
  background: linear-gradient(145deg, #ffffff 0%, #bae6fd 22%, #38bdf8 52%, #0284c7 82%, #0c4a6e 100%) !important;
  border: 1.8px solid #ffffff !important;
  color: #ffffff !important;
  text-shadow: 0 0 6px #bae6fd, 0 0 12px #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.9), inset 0 1px 0 #ffffff !important;
}

#floating-dice.skin-dice_frostbite .die .die-pip,
#floating-dice.skin-frostbite .die .die-pip,
.floating-dice-hud.skin-dice_frostbite .die .die-pip,
.floating-dice-hud.skin-frostbite .die .die-pip,
.die.skin-dice_frostbite .die-pip,
.die.skin-frostbite .die-pip,
.order-3d-die.skin-dice_frostbite .die-pip,
.order-3d-die.skin-frostbite .die-pip {
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 1), 0 0 14px rgba(186, 230, 253, 0.85) !important;
}

#floating-dice.skin-dice_frostbite .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-frostbite .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_frostbite .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-frostbite .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_frostbite[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_frostbite .die-pip.pip-center {
  background: #67e8f9 !important;
  box-shadow: 0 0 10px rgba(103, 232, 249, 1), 0 0 16px rgba(56, 189, 248, 0.85) !important;
}

/* 30. Onyx & Gold (Ónice & Oro) 🪙 */
#floating-dice.skin-dice_onyx_gold .die,
#floating-dice.skin-onyx_gold .die,
.floating-dice-hud.skin-dice_onyx_gold .die,
.floating-dice-hud.skin-onyx_gold .die,
.die.skin-dice_onyx_gold,
.die.skin-onyx_gold,
.order-3d-die.skin-dice_onyx_gold,
.order-3d-die.skin-onyx_gold,
.casino-die.skin-dice_onyx_gold,
.skin-dice_onyx_gold .casino-die {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 35%, #020617 72%, #000000 100%) !important;
  border: 1.8px solid #fbbf24 !important;
  color: #ffd700 !important;
  text-shadow: 0 0 8px #f59e0b, 0 0 14px #fbbf24 !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.75) !important;
}

#floating-dice.skin-dice_onyx_gold .die .die-pip,
#floating-dice.skin-onyx_gold .die .die-pip,
.floating-dice-hud.skin-dice_onyx_gold .die .die-pip,
.floating-dice-hud.skin-onyx_gold .die .die-pip,
.die.skin-dice_onyx_gold .die-pip,
.die.skin-onyx_gold .die-pip,
.order-3d-die.skin-dice_onyx_gold .die-pip,
.order-3d-die.skin-onyx_gold .die-pip {
  background: #ffd700 !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.95), inset 0 1px 1px rgba(255, 255, 255, 0.65) !important;
}

#floating-dice.skin-dice_onyx_gold .die[data-val="1"] .die-pip.pip-center,
#floating-dice.skin-onyx_gold .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-dice_onyx_gold .die[data-val="1"] .die-pip.pip-center,
.floating-dice-hud.skin-onyx_gold .die[data-val="1"] .die-pip.pip-center,
.die.skin-dice_onyx_gold[data-val="1"] .die-pip.pip-center,
.order-3d-die.skin-dice_onyx_gold .die-pip.pip-center {
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 1), 0 0 14px rgba(251, 191, 36, 0.85), inset 0 1px 1px rgba(254, 240, 138, 0.85) !important;
}

/* ==========================================================================
   KMKZ 3D DICE SHIELD: Ensure 3D dice cubes NEVER inherit 2D flat backgrounds,
   borders, or shadows from skin selectors or global .die definitions.
   ========================================================================== */
#floating-dice[id="floating-dice"] .die.has-cube-3d,
#floating-dice[id="floating-dice"][class*="skin-"] .die.has-cube-3d,
.floating-dice-hud[class*="skin-"] .die.has-cube-3d,
.floating-dice-hud .die.has-cube-3d,
.die.has-cube-3d[class*="skin-"],
.die.has-cube-3d {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  width: var(--cube-sz, 34px) !important;
  height: var(--cube-sz, 34px) !important;
  min-width: var(--cube-sz, 34px) !important;
  min-height: var(--cube-sz, 34px) !important;
}

/* Profile Frame Skins */
.avatar-frame-wood,
.user-frame-frame_wood {
  box-shadow: 0 0 0 3px #92400e, 0 0 12px rgba(146, 64, 14, 0.6) !important;
  border-radius: 50%;
}

.avatar-frame-bronze,
.user-frame-frame_bronze {
  box-shadow: 0 0 0 3px #cd7f32, 0 0 14px rgba(205, 127, 50, 0.7) !important;
  border-radius: 50%;
}

.avatar-frame-emerald,
.user-frame-frame_emerald {
  box-shadow: 0 0 0 3px #10b981, 0 0 16px rgba(16, 185, 129, 0.8) !important;
  border-radius: 50%;
}

/* Pioneer Hall of Fame & Tribute Banner in Ranking */
.pioneer-tribute-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(251, 191, 36, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.pioneer-tribute-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.pioneer-tribute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.pioneer-tribute-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.pioneer-tribute-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 12px;
}

.pioneer-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pioneer-user-chip {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #fef08a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.pioneer-user-chip:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.pioneer-legend-badge {
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  color: #000000 !important;
  font-weight: 900 !important;
  font-size: 0.7rem !important;
  padding: 1.5px 6px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin-left: 0 !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  max-width: max-content !important;
  line-height: 1.2 !important;
}

.devops-legend-badge {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.7rem !important;
  padding: 1.5px 6px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin-left: 0 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  max-width: max-content !important;
  line-height: 1.2 !important;
  border: 1px solid rgba(110, 231, 183, 0.6) !important;
}

.podium-badge-pill.devops {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

.podium-pioneer-tag {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid #fbbf24;
  color: #fef08a;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}

/* Turn Timer Seconds Text & Progress Bar Styles */
#turn-timer {
  display: inline-block !important;
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.5px !important;
}

.timer-progress-container {
  display: block !important;
}

#timer-progress-fill {
  display: block !important;
}

/* Active Turn & Myself Highlights — PROFESSIONAL ULTRA UI */
.hex-player-pod.active-turn {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  filter: none !important;
  transform: none !important;
}

.hex-player-pod.is-myself {
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.15), 0 3px 10px rgba(0, 0, 0, 0.5) !important;
  filter: none !important;
}

.hex-player-pod.active-turn.is-myself {
  background: linear-gradient(145deg, rgba(20, 38, 70, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.55), inset 0 0 14px rgba(56, 189, 248, 0.25), 0 6px 18px rgba(0, 0, 0, 0.7) !important;
  filter: none !important;
  transform: none !important;
}

.hex-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  width: 100% !important;
  margin-top: 2px !important;
  position: relative !important;
}

.hex-avatar-icon {
  font-size: 1.05rem !important;
  line-height: 1 !important;
}

.hex-vp-crown {
  background: #fbbf24 !important;
  color: #0f172a !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 4px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.hex-timer-badge {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 4px !important;
  border-radius: 6px !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8) !important;
  margin: 1px 0 !important;
}

.hex-satellite-badges {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2px 4px !important;
  width: 100% !important;
  padding: 0 4px !important;
  box-sizing: border-box !important;
  justify-items: center !important;
}

.hex-sat-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  padding: 1px 3px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

.hex-sat-badge.over-limit {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.3) !important;
}

.hex-sat-badge.owner-crown {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.25) !important;
}

.hex-player-name-label {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 80px !important;
  text-align: center !important;
  margin-bottom: 2px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   NAVIGATION TAB BAR - DEDICATED SECTION COLORS & SOFT BORDER ICON AESTHETICS
   ========================================================================== */
.tab-bar-item {
  pointer-events: auto !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  flex: 0 0 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 5px !important;
  cursor: pointer !important;
  border-radius: 16px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  outline: none !important;
  color: #64748b !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  user-select: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
  transform-origin: center center !important;
}

.tab-bar-item .tab-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
}

.tab-bar-item .custom-tab-svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  margin: auto !important;
  transform: none !important;
  stroke: #64748b;
  transition: stroke 0.25s ease, filter 0.25s ease, transform 0.25s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.tab-bar-item .tab-label {
  display: none !important;
}

/* Active Glow Pill underneath the active tab */
.tab-bar-item::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 3.5px;
  background: #fbbf24;
  border-radius: 4px;
  opacity: 0;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tab-bar-item.active-tab::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ─────────────────────────────────────────────────────────────
   1. SECCIÓN JUGAR / SALAS (GOLD / AMBER: #FBBF24)
   ───────────────────────────────────────────────────────────── */
.tab-bar-item[data-tab="play"]:hover,
.tab-bar-item.tab-play:hover {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  transform: translateY(-2px) !important;
}

.tab-bar-item[data-tab="play"]:hover .custom-tab-svg,
.tab-bar-item.tab-play:hover .custom-tab-svg {
  stroke: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5)) !important;
}

.tab-bar-item[data-tab="play"].active-tab,
.tab-bar-item.tab-play.active-tab {
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.18) 0%, rgba(15, 23, 42, 0.9) 85%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(251, 191, 36, 0.2), inset 0 0 10px rgba(251, 191, 36, 0.08) !important;
  transform: translateY(-4px) !important;
  color: #fbbf24 !important;
}

.tab-bar-item[data-tab="play"].active-tab .custom-tab-svg,
.tab-bar-item.tab-play.active-tab .custom-tab-svg {
  stroke: #fbbf24 !important;
  fill: rgba(251, 191, 36, 0.12) !important;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65)) !important;
}

.tab-bar-item[data-tab="play"].active-tab::after,
.tab-bar-item.tab-play.active-tab::after {
  background: #fbbf24 !important;
  box-shadow: 0 0 8px #fbbf24, 0 0 14px #fbbf24 !important;
}

/* ─────────────────────────────────────────────────────────────
   2. SECCIÓN SOCIAL / AMIGOS (CYAN / SKY: #38BDF8)
   ───────────────────────────────────────────────────────────── */
.tab-bar-item[data-tab="social"]:hover,
.tab-bar-item.tab-social:hover {
  background: rgba(14, 165, 233, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-2px) !important;
}

.tab-bar-item[data-tab="social"]:hover .custom-tab-svg,
.tab-bar-item.tab-social:hover .custom-tab-svg {
  stroke: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5)) !important;
}

.tab-bar-item[data-tab="social"].active-tab,
.tab-bar-item.tab-social.active-tab {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.18) 0%, rgba(15, 23, 42, 0.9) 85%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.08) !important;
  transform: translateY(-4px) !important;
  color: #38bdf8 !important;
}

.tab-bar-item[data-tab="social"].active-tab .custom-tab-svg,
.tab-bar-item.tab-social.active-tab .custom-tab-svg {
  stroke: #38bdf8 !important;
  fill: rgba(56, 189, 248, 0.12) !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65)) !important;
}

.tab-bar-item[data-tab="social"].active-tab::after,
.tab-bar-item.tab-social.active-tab::after {
  background: #38bdf8 !important;
  box-shadow: 0 0 8px #38bdf8, 0 0 14px #38bdf8 !important;
}

/* ─────────────────────────────────────────────────────────────
   3. SECCIÓN RÁNKING (EMERALD / GREEN: #34D399)
   ───────────────────────────────────────────────────────────── */
.tab-bar-item[data-tab="ranking"]:hover,
.tab-bar-item.tab-ranking:hover {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
  transform: translateY(-2px) !important;
}

.tab-bar-item[data-tab="ranking"]:hover .custom-tab-svg,
.tab-bar-item.tab-ranking:hover .custom-tab-svg {
  stroke: #34d399 !important;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5)) !important;
}

.tab-bar-item[data-tab="ranking"].active-tab,
.tab-bar-item.tab-ranking.active-tab {
  background: radial-gradient(circle at center, rgba(52, 211, 153, 0.18) 0%, rgba(15, 23, 42, 0.9) 85%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(52, 211, 153, 0.2), inset 0 0 10px rgba(52, 211, 153, 0.08) !important;
  transform: translateY(-4px) !important;
  color: #34d399 !important;
}

.tab-bar-item[data-tab="ranking"].active-tab .custom-tab-svg,
.tab-bar-item.tab-ranking.active-tab .custom-tab-svg {
  stroke: #34d399 !important;
  fill: rgba(52, 211, 153, 0.12) !important;
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.65)) !important;
}

.tab-bar-item[data-tab="ranking"].active-tab::after,
.tab-bar-item.tab-ranking.active-tab::after {
  background: #34d399 !important;
  box-shadow: 0 0 8px #34d399, 0 0 14px #34d399 !important;
}

/* ─────────────────────────────────────────────────────────────
   4. SECCIÓN TIENDA (AMETHYST / PURPLE: #C084FC)
   ───────────────────────────────────────────────────────────── */
.tab-bar-item[data-tab="shop"]:hover,
.tab-bar-item.tab-shop:hover {
  background: rgba(168, 85, 247, 0.1) !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
  transform: translateY(-2px) !important;
}

.tab-bar-item[data-tab="shop"]:hover .custom-tab-svg,
.tab-bar-item.tab-shop:hover .custom-tab-svg {
  stroke: #c084fc !important;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.5)) !important;
}

.tab-bar-item[data-tab="shop"].active-tab,
.tab-bar-item.tab-shop.active-tab {
  background: radial-gradient(circle at center, rgba(192, 132, 252, 0.18) 0%, rgba(15, 23, 42, 0.9) 85%) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(192, 132, 252, 0.2), inset 0 0 10px rgba(192, 132, 252, 0.08) !important;
  transform: translateY(-4px) !important;
  color: #c084fc !important;
}

.tab-bar-item[data-tab="shop"].active-tab .custom-tab-svg,
.tab-bar-item.tab-shop.active-tab .custom-tab-svg {
  stroke: #c084fc !important;
  fill: rgba(192, 132, 252, 0.12) !important;
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.65)) !important;
}

.tab-bar-item[data-tab="shop"].active-tab::after,
.tab-bar-item.tab-shop.active-tab::after {
  background: #c084fc !important;
  box-shadow: 0 0 8px #c084fc, 0 0 14px #c084fc !important;
}

/* ─────────────────────────────────────────────────────────────
   5. SECCIÓN AJUSTES & PERFIL (ROSE / CORAL: #FB7185)
   ───────────────────────────────────────────────────────────── */
.tab-bar-item[data-tab="settings"]:hover,
.tab-bar-item.tab-settings:hover,
.tab-bar-item[data-tab="profile"]:hover,
.tab-bar-item.tab-profile:hover {
  background: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(251, 113, 133, 0.35) !important;
  transform: translateY(-2px) !important;
}

.tab-bar-item[data-tab="settings"]:hover .custom-tab-svg,
.tab-bar-item.tab-settings:hover .custom-tab-svg,
.tab-bar-item[data-tab="profile"]:hover .custom-tab-svg,
.tab-bar-item.tab-profile:hover .custom-tab-svg {
  stroke: #fb7185 !important;
  filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.5)) !important;
}

.tab-bar-item[data-tab="settings"].active-tab,
.tab-bar-item.tab-settings.active-tab,
.tab-bar-item[data-tab="profile"].active-tab,
.tab-bar-item.tab-profile.active-tab {
  background: radial-gradient(circle at center, rgba(251, 113, 133, 0.18) 0%, rgba(15, 23, 42, 0.9) 85%) !important;
  border: 1.5px solid rgba(251, 113, 133, 0.45) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(251, 113, 133, 0.2), inset 0 0 10px rgba(251, 113, 133, 0.08) !important;
  transform: translateY(-4px) !important;
  color: #fb7185 !important;
}

.tab-bar-item[data-tab="settings"].active-tab .custom-tab-svg,
.tab-bar-item.tab-settings.active-tab .custom-tab-svg,
.tab-bar-item[data-tab="profile"].active-tab .custom-tab-svg,
.tab-bar-item.tab-profile.active-tab .custom-tab-svg {
  stroke: #fb7185 !important;
  fill: rgba(251, 113, 133, 0.12) !important;
  filter: drop-shadow(0 0 8px rgba(251, 113, 133, 0.65)) !important;
}

.tab-bar-item[data-tab="settings"].active-tab::after,
.tab-bar-item.tab-settings.active-tab::after,
.tab-bar-item[data-tab="profile"].active-tab::after,
.tab-bar-item.tab-profile.active-tab::after {
  background: #fb7185 !important;
  box-shadow: 0 0 8px #fb7185, 0 0 14px #fb7185 !important;
}

/* 🎨 Page Section Thematic Accents */
#page-play .page-content-card {
  border-top: 2px solid rgba(251, 191, 36, 0.45) !important;
}

#page-play .hex-badge {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

#page-social .page-content-card {
  border-top: 2px solid rgba(56, 189, 248, 0.45) !important;
}

#page-social .hex-badge {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

#page-ranking .page-content-card {
  border-top: 2px solid rgba(52, 211, 153, 0.45) !important;
}

#page-ranking .hex-badge {
  background: rgba(52, 211, 153, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

#page-shop .page-content-card {
  border-top: 2px solid rgba(192, 132, 252, 0.45) !important;
}

#page-shop .hex-badge {
  background: rgba(192, 132, 252, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  color: #c084fc !important;
}

#page-settings .page-content-card,
#page-profile .page-content-card {
  border-top: 2px solid rgba(251, 113, 133, 0.45) !important;
}

#page-settings .hex-badge,
#page-profile .hex-badge {
  background: rgba(251, 113, 133, 0.12) !important;
  border-color: rgba(251, 113, 133, 0.4) !important;
  color: #fb7185 !important;
}

/* Header Compact Bar for SPA */
.spa-header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.2);
  z-index: 50;
}

/* REGULAR HEXAGON THEMATIC BADGES & FRAMES */
.reg-hex-avatar {
  width: 52px;
  height: 58px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  position: relative;
  flex-shrink: 0;
}

.reg-hex-avatar::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #0f172a;
  z-index: -1;
}

.reg-hex-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(251, 191, 36, 0.12);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}



/* ==========================================================================
   GLOBAL RANKING & PODIUM — MODERN AESTHETIC & PROFESSIONAL ARCHITECTURE
   ========================================================================== */

.podium-container {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 12px !important;
  margin: 14px 0 20px 0 !important;
  padding: 22px 14px 10px 14px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(10, 15, 28, 0.78) 100%) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Sutil resplandor cenital limpio, sin estridencias */
.podium-container::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 110px;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.10) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(20px);
  z-index: 0;
}

/* Columna de Jugador (Monolito Esculpido) */
.podium-col,
.podium-card {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: 140px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  position: relative !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  border-radius: 16px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
  outline: none !important;
  user-select: none !important;
  z-index: 1 !important;
}

.podium-col:hover,
.podium-card:hover {
  transform: translateY(-4px) !important;
  z-index: 5 !important;
}

.podium-col:focus-visible,
.podium-card:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6) !important;
  outline-offset: 2px !important;
}

/* Orden visual: 2º (izquierda), 1º (centro), 3º (derecha) */
.podium-col.first,
.podium-card.first {
  order: 2 !important;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08) 0%, rgba(15, 23, 42, 0.75) 45%, rgba(10, 15, 28, 0.9) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.28) !important;
  border-top: 2px solid rgba(251, 191, 36, 0.65) !important;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6), 0 0 16px rgba(251, 191, 36, 0.06) !important;
}

.podium-col.second,
.podium-card.second {
  order: 1 !important;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.06) 0%, rgba(15, 23, 42, 0.75) 45%, rgba(10, 15, 28, 0.9) 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.18) !important;
  border-top: 1.5px solid rgba(226, 232, 240, 0.5) !important;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.5) !important;
}

.podium-col.third,
.podium-card.third {
  order: 3 !important;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.06) 0%, rgba(15, 23, 42, 0.75) 45%, rgba(10, 15, 28, 0.9) 100%) !important;
  border: 1px solid rgba(249, 115, 22, 0.18) !important;
  border-top: 1.5px solid rgba(249, 115, 22, 0.5) !important;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.5) !important;
}

/* Contenido Superior de la Tarjeta */
.podium-card-content {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 10px 6px 12px 6px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 2 !important;
}

/* Corona Minimalista para el Primer Lugar */
.podium-crown-minimal {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 2px !important;
  height: 18px !important;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.4)) !important;
  animation: crownHover 3s ease-in-out infinite alternate !important;
}

@keyframes crownHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* Avatar Wrapper & Ring */
.podium-avatar-wrapper,
.podium-avatar-hex-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 6px !important;
}

.podium-avatar-frame {
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
  background: #0f172a !important;
  box-sizing: border-box !important;
  transition: transform 0.25s ease !important;
}

.podium-avatar-frame.first {
  width: 50px !important;
  height: 50px !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.podium-avatar-frame.second {
  width: 42px !important;
  height: 42px !important;
  border: 2px solid #cbd5e1 !important;
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.25), 0 4px 8px rgba(0, 0, 0, 0.5) !important;
}

.podium-avatar-frame.third {
  width: 42px !important;
  height: 42px !important;
  border: 2px solid #d97706 !important;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.25), 0 4px 8px rgba(0, 0, 0, 0.5) !important;
}

.podium-avatar-frame svg,
.podium-avatar-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Micro-disco de Rango en la esquina del Avatar */
.podium-rank-badge {
  position: absolute !important;
  bottom: -2px !important;
  right: -2px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  z-index: 3 !important;
}

.podium-rank-badge.first {
  background: linear-gradient(135deg, #fef08a, #f59e0b) !important;
  color: #0f172a !important;
  border: 1.5px solid #0f172a !important;
}

.podium-rank-badge.second {
  background: linear-gradient(135deg, #ffffff, #94a3b8) !important;
  color: #0f172a !important;
  border: 1.5px solid #0f172a !important;
}

.podium-rank-badge.third {
  background: linear-gradient(135deg, #fed7aa, #d97706) !important;
  color: #ffffff !important;
  border: 1.5px solid #0f172a !important;
}

/* Nombre del Usuario */
.podium-name,
.podium-user-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.80rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  max-width: 95% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  margin-bottom: 3px !important;
}

.podium-col.first .podium-name,
.podium-card.first .podium-name {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

/* Fila de Puntuación (Score Pill limpio) */
.podium-score-pill,
.podium-score-row,
.podium-elo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
  white-space: nowrap !important;
  margin-bottom: 4px !important;
  box-shadow: none !important;
}

.podium-col.first .podium-score-pill,
.podium-card.first .podium-score-pill {
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: #fef08a !important;
  background: rgba(251, 191, 36, 0.08) !important;
}

.podium-score-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

.podium-score-value,
.podium-score-num {
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.2px !important;
}

/* Insignia de rol/nivel compacta */
.podium-badge-wrapper {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
}

.podium-badge-pill {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.podium-badge-pill.pioneer {
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fef08a !important;
}

.podium-badge-pill.devops {
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

/* Pedestal Arquitectónico Escalonado Integrado */
.podium-step-pedestal {
  width: 100% !important;
  margin-top: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 0 14px 14px !important;
  position: relative !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
}

.podium-step-pedestal.first {
  height: 56px !important;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-left: 1px solid rgba(251, 191, 36, 0.2) !important;
  border-right: 1px solid rgba(251, 191, 36, 0.2) !important;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25) !important;
}

.podium-step-pedestal.second {
  height: 38px !important;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border-top: 1.5px solid rgba(226, 232, 240, 0.25) !important;
  border-left: 1px solid rgba(226, 232, 240, 0.15) !important;
  border-right: 1px solid rgba(226, 232, 240, 0.15) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.2) !important;
}

.podium-step-pedestal.third {
  height: 24px !important;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border-top: 1.5px solid rgba(249, 115, 22, 0.25) !important;
  border-left: 1px solid rgba(249, 115, 22, 0.15) !important;
  border-right: 1px solid rgba(249, 115, 22, 0.15) !important;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2) !important;
}

/* Watermark Numérico Elegante en el Pedestal */
.pedestal-rank-watermark {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -0.5px !important;
  user-select: none !important;
}

.podium-step-pedestal.first .pedestal-rank-watermark {
  color: rgba(251, 191, 36, 0.45) !important;
  font-size: 1.5rem !important;
}

.podium-step-pedestal.second .pedestal-rank-watermark {
  color: rgba(226, 232, 240, 0.35) !important;
}

.podium-step-pedestal.third .pedestal-rank-watermark {
  color: rgba(249, 115, 22, 0.35) !important;
}

/* Hexagonal Rank Tile in Table Rows - Flawless Pointy-Top Regular Hexagon */
.hex-rank-tile {
  width: 28px !important;
  height: 32px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #94a3b8 !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
}

.hex-rank-tile.top-1 {
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.7)) !important;
}

.hex-rank-tile.top-2 {
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 50%, #64748B 100%) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  filter: drop-shadow(0 0 6px rgba(203, 213, 225, 0.6)) !important;
}

.hex-rank-tile.top-3 {
  background: linear-gradient(135deg, #FED7AA 0%, #EA580C 50%, #7C2D12 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  filter: drop-shadow(0 0 6px rgba(234, 88, 12, 0.6)) !important;
}

/* Mobile Responsive Optimization (< 520px) */
@media (max-width: 520px) {
  .podium-container {
    padding: 16px 8px 8px 8px !important;
    gap: 8px !important;
    border-radius: 16px !important;
  }

  .podium-avatar-frame.first {
    width: 44px !important;
    height: 44px !important;
  }

  .podium-avatar-frame.second,
  .podium-avatar-frame.third {
    width: 38px !important;
    height: 38px !important;
  }

  .podium-name,
  .podium-user-name {
    font-size: 0.74rem !important;
  }

  .podium-score-pill,
  .podium-elo {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  .podium-step-pedestal.first {
    height: 44px !important;
  }

  .podium-step-pedestal.second {
    height: 30px !important;
  }

  .podium-step-pedestal.third {
    height: 20px !important;
  }

  .pedestal-rank-watermark {
    font-size: 1.1rem !important;
  }

  .podium-step-pedestal.first .pedestal-rank-watermark {
    font-size: 1.2rem !important;
  }
}

@media (max-width: 360px) {
  .podium-container {
    padding: 14px 4px 6px 4px !important;
    gap: 4px !important;
  }
}


/* Table Enhancements — Responsive Leaderboard Card Layout */
.leaderboard-table-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 18px !important;
  background: rgba(10, 16, 30, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  margin-top: 14px !important;
  margin-bottom: 12px !important;
  padding: 6px 8px 10px 8px !important;
}

.leaderboard-table-container #ranking-header-score-label .kmkz-coin-hex,
#ranking-header-score-label .ui-svg-icon,
.ranking-header-score-inline .kmkz-coin-hex,
.ranking-header-score-inline .ui-svg-icon {
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

#btn-explain-elo:hover {
  color: #fef08a !important;
  text-decoration: underline !important;
}

.responsive-ranking-table {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  table-layout: fixed !important;
  border-spacing: 0 6px !important;
  border-collapse: separate !important;
}

.responsive-ranking-table thead th {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  padding: 6px 10px !important;
  display: table-cell !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.responsive-ranking-table col.ranking-col-player {
  width: auto !important;
}

.responsive-ranking-table col.ranking-col-score {
  width: 125px !important;
}

.responsive-ranking-table .th-player-col {
  text-align: left !important;
  width: auto !important;
}

.responsive-ranking-table .th-score-col {
  text-align: right !important;
  width: 125px !important;
  min-width: 105px !important;
  white-space: nowrap !important;
  display: table-cell !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  padding: 6px 10px 6px 4px !important;
}

#ranking-header-score-label {
  display: table-cell !important;
  text-align: right !important;
  vertical-align: middle !important;
  width: 125px !important;
  min-width: 105px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  padding: 6px 10px 6px 4px !important;
}

.ranking-header-score-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

#ranking-header-score-label .kmkz-coin-hex,
.ranking-header-score-inline .kmkz-coin-hex {
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.responsive-ranking-table tbody tr.ranking-row {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  animation: rowFadeIn 0.3s ease-out forwards !important;
  min-height: 48px !important;
}

.responsive-ranking-table tbody tr.ranking-row td {
  padding: 6px 8px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

.responsive-ranking-table tbody tr.ranking-row td:first-child {
  border-top-left-radius: 12px !important;
  border-bottom-left-radius: 12px !important;
  width: auto !important;
  max-width: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.responsive-ranking-table tbody tr.ranking-row td:last-child {
  border-top-right-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  width: 125px !important;
  min-width: 105px !important;
  text-align: right !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.responsive-ranking-table tbody tr.ranking-row:hover,
.responsive-ranking-table tbody tr.ranking-row:focus-visible {
  background: rgba(30, 41, 59, 0.92) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  outline: none !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(56, 189, 248, 0.4) !important;
}

.responsive-ranking-table tbody tr.ranking-row.is-me {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22) 0%, rgba(15, 23, 42, 0.90) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}

/* Player Cell & Meta Information */
.player-cell {
  display: table-cell !important;
  vertical-align: middle !important;
  padding: 6px 6px 6px 8px !important;
  width: auto !important;
  max-width: 0 !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.player-cell-inner {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Fallback if markup does not have player-cell-inner */
.player-cell:not(:has(.player-cell-inner)) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.player-cell .hex-rank-tile {
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.player-avatar-mini {
  font-size: 1.1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.player-avatar-mini svg,
.player-avatar-mini img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important;
  overflow: visible !important;
}

.player-avatar-mini .avatar-fallback-glyph {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
  font-size: 15px !important;
  user-select: none !important;
}

.player-meta-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  flex: 1 1 0% !important;
  overflow: hidden !important;
}

.player-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.player-name {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  max-width: 100% !important;
}

.player-sub-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
}

.player-level-badge {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  white-space: nowrap !important;
}

.player-star-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.you-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  background: #38bdf8 !important;
  color: #0f172a !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  flex-shrink: 0 !important;
}

.player-cell .pioneer-legend-badge,
.player-cell .devops-legend-badge {
  flex-shrink: 1 !important;
  max-width: 86px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ELO / Score Cell & Badge */
.elo-cell {
  display: table-cell !important;
  text-align: right !important;
  vertical-align: middle !important;
  width: 125px !important;
  min-width: 105px !important;
  box-sizing: border-box !important;
  padding: 6px 10px 6px 4px !important;
  overflow: visible !important;
}

.elo-pill-badge {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  background: rgba(251, 191, 36, 0.14) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  padding: 3px 8px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  width: auto !important;
  max-width: none !important;
  flex-shrink: 0 !important;
}

.elo-val {
  font-family: 'JetBrains Mono', 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  color: #fef08a !important;
  white-space: nowrap !important;
}

.elo-icon {
  font-size: 0.82rem !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.elo-icon .kmkz-coin-hex,
.elo-icon .ui-svg-icon {
  width: 17px !important;
  height: 17px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}

@media (max-width: 480px) {
  .leaderboard-table-container {
    min-height: 200px !important;
    max-height: calc(100vh - 270px) !important;
    padding: 4px 6px 8px 6px !important;
    margin-top: 10px !important;
  }

  .player-cell {
    padding: 5px 6px !important;
  }

  .player-cell-inner {
    gap: 6px !important;
  }

  .player-avatar-mini {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.95rem !important;
  }

  .hex-rank-tile {
    width: 24px !important;
    height: 28px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    font-size: 0.72rem !important;
  }

  .player-name {
    font-size: 0.80rem !important;
  }

  .responsive-ranking-table thead th {
    padding: 5px 6px !important;
    font-size: 0.70rem !important;
  }

  .responsive-ranking-table col.ranking-col-score {
    width: 90px !important;
  }

  .responsive-ranking-table .th-score-col,
  #ranking-header-score-label {
    width: 90px !important;
    min-width: 78px !important;
  }

  .responsive-ranking-table tbody tr.ranking-row td:last-child {
    width: 90px !important;
    min-width: 78px !important;
  }

  .elo-cell {
    width: 90px !important;
    min-width: 78px !important;
    padding: 5px 4px 5px 2px !important;
    overflow: visible !important;
  }

  .elo-pill-badge {
    padding: 3px 6px !important;
    gap: 4px !important;
    max-width: none !important;
  }

  .elo-val {
    font-size: 0.78rem !important;
  }

  .player-sub-row {
    gap: 3px !important;
  }

  .player-cell .pioneer-legend-badge,
  .player-cell .devops-legend-badge {
    font-size: 0.7rem !important;
    max-width: 72px !important;
    padding: 1px 4px !important;
  }

  .player-level-badge {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }

  .player-star-badge {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }
}

@media (max-width: 360px) {
  .player-avatar-mini {
    display: flex !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 0.82rem !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .player-cell-inner {
    gap: 5px !important;
  }

  .responsive-ranking-table col.ranking-col-score {
    width: 80px !important;
  }

  .responsive-ranking-table .th-score-col,
  #ranking-header-score-label {
    width: 80px !important;
    min-width: 68px !important;
  }

  .responsive-ranking-table tbody tr.ranking-row td:last-child {
    width: 80px !important;
    min-width: 68px !important;
  }

  .elo-cell {
    width: 80px !important;
    min-width: 68px !important;
    padding: 4px 3px 4px 2px !important;
    overflow: visible !important;
  }

  .player-cell .pioneer-legend-badge,
  .player-cell .devops-legend-badge {
    font-size: 0.7rem !important;
    max-width: 58px !important;
    padding: 1px 3px !important;
  }

  .elo-pill-badge {
    padding: 2px 5px !important;
    gap: 3px !important;
    max-width: none !important;
  }

  .elo-val {
    font-size: 0.72rem !important;
  }

  .elo-icon .kmkz-coin-hex,
  .elo-icon .ui-svg-icon {
    width: 14px !important;
    height: 14px !important;
  }
}

/* Animations */
@keyframes podiumRise {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crownFloat {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-4px);
  }
}

@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 360px) {
  .podium-container {
    gap: 4px !important;
    padding: 10px 4px 5px 4px !important;
    margin: 6px 0 12px 0 !important;
  }

  .podium-card {
    padding: 6px 1px 0 1px !important;
    border-radius: 10px 10px 6px 6px !important;
  }

  .podium-card.first {
    min-height: 168px !important;
  }

  .podium-card.second {
    min-height: 148px !important;
  }

  .podium-card.third {
    min-height: 134px !important;
  }

  .podium-crown-halo {
    top: -10px !important;
  }

  .podium-avatar-frame.first,
  .podium-card.first .podium-avatar-hex {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.25rem !important;
  }

  .podium-avatar-frame,
  .podium-avatar-hex {
    width: 30px !important;
    height: 30px !important;
    font-size: 1.0rem !important;
  }

  .podium-name {
    font-size: 0.68rem !important;
  }

  .podium-card.first .podium-name {
    font-size: 0.74rem !important;
  }

  .podium-score-pill,
  .podium-elo {
    font-size: 0.64rem !important;
    padding: 1px 4px !important;
    margin-bottom: 3px !important;
  }

  .podium-badge-pill {
    font-size: 0.50rem !important;
    padding: 0.5px 3px !important;
    margin-bottom: 2px !important;
  }

  .podium-step-platform.first {
    height: 30px !important;
    min-height: 30px !important;
  }

  .podium-step-platform.second {
    height: 24px !important;
    min-height: 24px !important;
  }

  .podium-step-platform.third {
    height: 19px !important;
    min-height: 19px !important;
  }

  .podium-step-platform.first .step-number {
    font-size: 1.05rem !important;
  }

  .podium-step-platform.second .step-number {
    font-size: 0.95rem !important;
  }

  .podium-step-platform.third .step-number {
    font-size: 0.85rem !important;
  }
}

/* ==========================================================================
   UNIFIED PAGE COMPONENT STYLES (Profile, Shop, Social, Ranking)
   ======================================================*/
/* ═══════════════════════════════════════════════════
   PROFILE PAGE — Mobile-First Responsive Redesign
   ═══════════════════════════════════════════════════ */

.profile-page,
#page-settings .profile-page,
#page-profile .profile-page {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* ── Card Base (Glassmorphism Harmonized with Page Content Cards) ── */
.pcard,
.pcard.hero-card-compact,
.pcard-collection-wrap,
.pcard-account-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(145deg, rgba(20, 30, 48, 0.75) 0%, rgba(12, 18, 32, 0.88) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  padding: 16px 18px !important;
  position: relative !important;
  overflow: visible !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.pcard:hover,
.pcard.hero-card-compact:hover,
.pcard-collection-wrap:hover,
.pcard-account-card:hover {
  border-color: rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(251, 191, 36, 0.15) !important;
}

.pcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.35), transparent);
}

/* ── pcard-title ── */
.pcard-title {
  font-size: 0.82rem;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Tab Navigation (Harmonized with Ranking & Shop Tabs) ── */
.profile-nav-tabs,
.tab-nav {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.profile-nav-tabs .tab-btn,
.tab-btn {
  min-height: 44px !important;
  padding: 11px 12px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 3.5px solid #020617 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.profile-nav-tabs .tab-btn:hover:not(.active),
.tab-btn:hover:not(.active) {
  color: #f1f5f9 !important;
  background: linear-gradient(180deg, #273549, #131d31) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.profile-nav-tabs .tab-btn.active,
.tab-btn.active {
  color: #fbbf24 !important;
  background: linear-gradient(180deg, #334155, #1e293b) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  border-bottom: 3.5px solid #d97706 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(251, 191, 36, 0.35) !important;
}

.tab-panel {
  display: none !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tab-panel.active {
  display: flex !important;
}

@media (max-width: 768px) {

  .profile-page,
  #page-settings .profile-page,
  #page-profile .profile-page {
    gap: 14px !important;
  }

  .pcard,
  .pcard.hero-card-compact,
  .pcard-collection-wrap,
  .pcard-account-card {
    padding: 14px 14px !important;
    border-radius: 16px !important;
  }

  .tab-panel {
    gap: 14px !important;
  }
}

@media (max-width: 480px) {

  .profile-page,
  #page-settings .profile-page,
  #page-profile .profile-page {
    gap: 12px !important;
  }

  .pcard,
  .pcard.hero-card-compact,
  .pcard-collection-wrap,
  .pcard-account-card {
    padding: 12px 12px !important;
    border-radius: 14px !important;
  }

  .tab-panel {
    gap: 12px !important;
  }
}

/* ── Hero Avatar Edit Pencil ── */

.hero-avatar-edit-pencil {
  position: absolute !important;
  bottom: -4px !important;
  right: -4px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border: 2px solid #0f172a !important;
  color: #000 !important;
  font-size: 0.8rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.6) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 10 !important;
  line-height: 1 !important;
}

.hero-avatar-edit-pencil:hover {
  transform: scale(1.2) rotate(15deg) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.9) !important;
}

/* ==========================================================================
   AVATAR EMOJI CUSTOMIZER MODAL (Responsive, No Overflow, Vertical Scroll Only)
   ========================================================================== */

#modal-edit-avatar {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(2, 6, 23, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 99999 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#modal-edit-avatar.hidden {
  display: none !important;
}

.modal-avatar-glass {
  max-width: 460px !important;
  width: 100% !important;
  padding: 24px 20px !important;
  border-radius: 24px !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  background: linear-gradient(145deg, #0f172a, #1e293b) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(251, 191, 36, 0.15) !important;
  color: #fff !important;
  text-align: center !important;
  position: relative !important;
  box-sizing: border-box !important;
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.modal-avatar-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  font-size: 1.1rem !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s !important;
  z-index: 10 !important;
}

.modal-avatar-close-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fff !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: scale(1.05) !important;
}

.modal-avatar-header-badge {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 4px !important;
}

.modal-avatar-title {
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 16px 0 !important;
  letter-spacing: 0.3px !important;
}

.modal-avatar-preview-wrap {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
}

.modal-avatar-preview-circle {
  width: 76px !important;
  height: 76px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(56, 189, 248, 0.2)) !important;
  border: 3px solid #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.6rem !important;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Custom Emoji Input Container */
.avatar-custom-input-box {
  margin-bottom: 16px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.avatar-custom-input-label {
  display: block !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  margin-bottom: 6px !important;
  text-align: left !important;
  line-height: 1.3 !important;
}

.avatar-custom-input-row {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
}

.avatar-custom-input-field {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 1.35rem !important;
  text-align: center !important;
  padding: 6px 10px !important;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, sans-serif !important;
}

.avatar-custom-input-field:focus {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

.btn-apply-emoji {
  flex: 0 0 auto !important;
  padding: 0 16px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.avatar-preset-heading {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  text-align: left !important;
  margin-bottom: 8px !important;
}

/* Preset Emoji Grid - STRICT VERTICAL SCROLL ONLY */
.avatar-preset-grid {
  display: grid !important;
  grid-template-columns: repeat(8, 1fr) !important;
  gap: 6px !important;
  max-height: 180px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 6px 4px !important;
  margin-bottom: 18px !important;
  background: rgba(10, 15, 29, 0.7) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.avatar-preset-grid::-webkit-scrollbar {
  width: 5px !important;
}

.avatar-preset-grid::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5) !important;
  border-radius: 8px !important;
}

.avatar-preset-grid::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35) !important;
  border-radius: 8px !important;
}

.avatar-preset-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.65) !important;
}

.btn-emoji-choice {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  font-size: 1.35rem !important;
  cursor: pointer !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, sans-serif !important;
}

.btn-emoji-choice:hover {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: #fbbf24 !important;
  transform: scale(1.15) !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4) !important;
}

.btn-emoji-choice.selected {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(56, 189, 248, 0.35)) !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.6) !important;
  transform: scale(1.1) !important;
}

.btn-emoji-svg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
}

.btn-emoji-svg-icon .kmkz-custom-avatar,
.btn-emoji-svg-icon .avatar-svg-icon,
.btn-emoji-svg-icon .kmkz-avatar-svg {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-avatar-choice:hover .kmkz-custom-avatar,
.btn-avatar-choice:hover .avatar-svg-icon {
  transform: scale(1.18);
  filter: drop-shadow(0 3px 8px rgba(251, 191, 36, 0.6));
}

.btn-emoji-choice.selected .kmkz-custom-avatar,
.btn-emoji-choice.selected .avatar-svg-icon {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.85));
}

.btn-emoji-svg-icon svg,
.kmkz-custom-avatar svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* Base custom avatar svg container */
.kmkz-custom-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.kmkz-avatar-svg {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
  max-height: 100%;
}

.kmkz-avatar-svg[width="100%"] {
  width: 100%;
  height: 100%;
}

.avatar-badge-circle,
#dash-avatar-icon,
#stat-profile-avatar,
.modal-avatar-preview-circle,
.hero-avatar-circle,
.stat-player-avatar-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50%;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

#hero-avatar-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
  background: transparent !important;
}

#hero-avatar-icon svg,
.hero-avatar svg,
.hero-avatar-wrap svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: block !important;
  margin: auto !important;
  border: none !important;
  box-shadow: none !important;
}


.modal-avatar-actions-row {
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 14px !important;
  box-sizing: border-box !important;
}

#btn-cancel-custom-avatar,
.modal-avatar-btn-cancel {
  flex: 1 !important;
  min-height: 44px !important;
  padding: 11px 16px !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  background: rgba(30, 41, 59, 0.7) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

#btn-cancel-custom-avatar:hover,
.modal-avatar-btn-cancel:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}

#btn-cancel-custom-avatar:active,
.modal-avatar-btn-cancel:active {
  transform: translateY(0) !important;
}

#btn-save-custom-avatar,
.modal-avatar-btn-save,
.btn-modal-action.primary {
  flex: 2 !important;
  min-height: 46px !important;
  width: 100% !important;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #040810 !important;
  border: 1.5px solid #fde68a !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

#btn-save-custom-avatar:hover,
.modal-avatar-btn-save:hover,
.btn-modal-action.primary:hover {
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 50%, #ea580c 100%) !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.7), 0 0 12px rgba(251, 191, 36, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

#btn-save-custom-avatar:active,
.modal-avatar-btn-save:active,
.btn-modal-action.primary:active {
  transform: translateY(0) scale(0.99) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4) !important;
}

@media (max-width: 640px) {
  #modal-edit-avatar {
    padding: 10px !important;
  }

  .modal-avatar-glass {
    padding: 18px 12px 14px 12px !important;
    border-radius: 20px !important;
  }

  .avatar-preset-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    max-height: 155px !important;
    padding: 4px !important;
    gap: 5px !important;
  }

  .btn-emoji-choice {
    height: 36px !important;
    font-size: 1.25rem !important;
  }
}

@media (max-width: 420px) {
  .avatar-preset-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }

  .btn-emoji-choice {
    height: 38px !important;
  }
}

@media (max-width: 320px) {
  .avatar-preset-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }

  .btn-emoji-choice {
    height: 36px !important;
  }
}

/* Avatar Frame Skins */
.hero-avatar.frame-flame,
.hero-avatar-wrap.frame-flame .hero-avatar {
  filter: drop-shadow(0 0 12px #f97316) drop-shadow(0 0 20px #ef4444) !important;
  animation: frameFlamePulse 1.8s infinite ease-in-out !important;
}

@keyframes frameFlamePulse {

  0%,
  100% {
    filter: drop-shadow(0 0 10px #f97316) drop-shadow(0 0 18px #ef4444);
  }

  50% {
    filter: drop-shadow(0 0 16px #ef4444) drop-shadow(0 0 28px #fb923c);
  }
}

.hero-avatar.frame-gold,
.hero-avatar-wrap.frame-gold .hero-avatar {
  filter: drop-shadow(0 0 14px #fbbf24) drop-shadow(0 0 22px #d97706) !important;
  animation: frameGoldGlow 2.5s infinite linear !important;
}

@keyframes frameGoldGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 20px rgba(217, 119, 6, 0.6));
  }

  50% {
    filter: drop-shadow(0 0 18px rgba(255, 220, 80, 0.95)) drop-shadow(0 0 30px rgba(245, 158, 11, 0.85));
  }
}

.hero-avatar.frame-cyber,
.hero-avatar-wrap.frame-cyber .hero-avatar {
  filter: drop-shadow(0 0 12px #22d3ee) drop-shadow(0 0 20px #a855f7) !important;
  animation: frameCyberPulse 1.5s infinite ease-in-out !important;
}

@keyframes frameCyberPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 10px #22d3ee) drop-shadow(0 0 18px #a855f7);
  }

  50% {
    filter: drop-shadow(0 0 16px #c084fc) drop-shadow(0 0 26px #06b6d4);
  }
}

.hero-avatar.frame-galaxy,
.hero-avatar-wrap.frame-galaxy .hero-avatar {
  filter: drop-shadow(0 0 14px #a855f7) drop-shadow(0 0 22px #ec4899) !important;
  animation: frameGalaxyRotate 3s infinite ease-in-out !important;
}

@keyframes frameGalaxyRotate {

  0%,
  100% {
    filter: drop-shadow(0 0 12px #a855f7) drop-shadow(0 0 20px #ec4899);
  }

  50% {
    filter: drop-shadow(0 0 18px #ec4899) drop-shadow(0 0 28px #818cf8);
  }
}



.xp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  margin-bottom: 4px;
  color: #94a3b8;
  font-weight: 700;
}

.xp-row #hero-level {
  color: #38bdf8;
}

.xp-bar-bg {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width .6s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Stats Row (below hero) ── */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  transition: background .2s;
}

.stat-tile:hover {
  background: rgba(56, 189, 248, 0.06);
}

.stat-tile .val {
  font-size: 0.95rem;
  font-weight: 900;
  color: #38bdf8;
  display: block;
  line-height: 1.2;
}

.stat-tile .lbl {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
  display: block;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .03em;
}



/* ── Inline Username Edit ── */
.hero-name-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity .2s, background .2s;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hero-name-edit-btn:hover,
.hero-name-edit-btn:focus {
  opacity: 1;
  background: rgba(56, 189, 248, 0.12);
  outline: none;
}

.hero-name-input {
  padding: 6px 10px !important;
  font-size: 16px !important;
  /* no iOS zoom */
  border-radius: 9px !important;
  height: 34px;
  flex: 1;
  min-width: 0;
}

.hero-name-save-btn {
  min-height: 34px;
  padding: 4px 10px !important;
  border-radius: 9px !important;
  font-size: 0.9rem !important;
  flex-shrink: 0;
}

.hero-name-cancel-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  min-height: 34px;
  padding: 3px 8px;
  flex-shrink: 0;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s;
}

.hero-name-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}



/* ── Form Fields ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(56, 189, 248, 0.18);
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  /* 16px prevents iOS auto-zoom */
  font-weight: 600;
  transition: border-color .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.field-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.field-input[readonly] {
  cursor: default;
  opacity: 0.65;
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.field-row .field-input {
  flex: 1;
  min-width: 140px;
}

.btn-save {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 900;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  transition: transform .2s, opacity .2s, background-color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-copy {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(56, 189, 248, 0.22);
  background: transparent;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: transform .2s, opacity .2s, background-color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: #38bdf8;
}

/* ── Legacy .color-swatches (non-carousel fallback) ── */
.color-swatches {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}


.swatch {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform .2s, opacity .2s, background-color .2s, border-color .2s, box-shadow .2s;
  background: rgba(255, 255, 255, 0.05);
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.active {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: scale(1.08);
}


.cosmetic-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.06);
}

.cosmetic-item.equipped {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.cosmetic-item.locked {
  opacity: 0.45;
  cursor: default;
}

.cosmetic-item .item-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.cosmetic-item .item-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}

.cosmetic-item .item-tag {
  font-size: 0.7rem;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 700;
}

.item-tag.equipped-tag {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.item-tag.locked-tag {
  background: rgba(100, 116, 139, 0.2);
  color: #64748b;
}

.item-tag.free-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.titles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.title-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(56, 189, 248, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .2s, opacity .2s, background-color .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title-item:hover {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}

.title-item.equipped {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.title-item.locked {
  opacity: 0.45;
  cursor: default;
}

.title-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e2e8f0;
}

.title-desc {
  font-size: 0.72rem;
  color: #64748b;
}

.title-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  width: fit-content;
}

/* Shop Styles */
.shop-items-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.shop-card-item {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(251, 191, 36, 0.25);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.shop-card-item:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.shop-card-item.owned {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.75));
}

.preview-canvas-container {
  width: 100%;
  height: 90px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.preview-canvas-container canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-toast-banner {
  display: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Social & Leaderboard Styles */
.social-filter-pills {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.social-pill {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.social-pill.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.3));
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.social-pill[data-filter="spectate"].active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(126, 34, 206, 0.35));
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}


.friend-card-plato {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.friend-card-plato:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.avatar-status-badge {
  position: relative;
  flex-shrink: 0;
}

.avatar-icon-wrap {
  width: 48px;
  height: 54px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #0f172a;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.in-game {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.status-dot.offline {
  background: #64748b;
}

.friend-actions-group {
  display: flex;
  gap: 6px;
}

.btn-friend-action {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-friend-action.challenge {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #000;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-friend-action.challenge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.5);
}

.btn-friend-action.copy-id {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.btn-friend-action.remove {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.my-id-card-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.8));
  border: 1.5px dashed rgba(56, 189, 248, 0.3);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

/* 📱 Responsive Header Switcher (Never Overlap Controls) */
@media (max-width: 768px) {

  .mobile-stats-buttons,
  .app-header .mobile-stats-buttons,
  #mobile-stats-buttons {
    display: none !important;
  }
}

/* 📱 Mobile Responsive Layout Optimizations */
@media (max-width: 600px) {

  .page-content-card,
  .profile-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 14px 10px 100px 10px !important;
    box-sizing: border-box !important;
  }

  .hero-section {
    gap: 14px !important;
  }

  .hero-avatar-wrap {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    margin: 4px 4px 4px 2px !important;
  }

  .hero-avatar {
    font-size: 1.55rem !important;
  }

  .hero-name {
    font-size: 1.08rem !important;
  }

  .hero-badges-compact {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 5px !important;
  }

  .hero-badge-pill {
    padding: 3px 8px !important;
    font-size: 0.74rem !important;
    border-radius: 8px !important;
  }

  .hero-badge-pill .lbl {
    font-size: 0.7rem !important;
  }

  /* Profile: 2-col stats on small screens */
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Profile hero quick actions: fluid responsive grid */
  .hero-quick-actions {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-quick-btn {
    min-height: 38px !important;
    padding: 6px 8px !important;
    font-size: 0.76rem !important;
    gap: 5px !important;
  }

  .hero-quick-btn .btn-quick-badge {
    font-size: 0.7rem !important;
    padding: 2px 5px !important;
  }

  .collection-tabs-pills {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .collection-tab-btn,
  .collection-tabs-pills .shop-tab-btn {
    padding: 6px 2px !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Cosmetics grid: 2 columns on mobile */
  #shop-items-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .shop-container,
  .leaderboard-container,
  .social-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Full width action rows, room creation controls, and grids */
  .lobby-action-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  #btn-create-room {
    width: 100% !important;
    padding: 16px !important;
    font-size: 1.05rem !important;
  }

  .join-room-box {
    width: 100% !important;
    flex-direction: row !important;
  }

  #input-room-code {
    flex: 1 !important;
    font-size: 1rem !important;
  }

  .join-room-box button {
    width: auto !important;
  }

  .shop-items-grid,
  .cosmetics-grid,
  .shop-items-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }
}

@media (max-width: 360px) {
  .hero-section {
    gap: 10px !important;
  }

  .hero-avatar-wrap {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    margin: 2px !important;
  }

  .hero-avatar {
    font-size: 1.4rem !important;
  }

  .hero-name {
    font-size: 0.98rem !important;
  }

  .hero-badges-compact {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
  }

  .hero-badge-pill {
    padding: 2.5px 6px !important;
    font-size: 0.7rem !important;
  }

  .hero-quick-actions {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }

  .collection-tabs-pills {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }

  .collection-tab-btn,
  .collection-tabs-pills .shop-tab-btn {
    padding: 5px 2px !important;
    font-size: 0.7rem !important;
  }
}


/* Popover Notifications Overlay Modal */
.notifications-drawer-overlay {
  position: fixed !important;
  top: 65px !important;
  right: 16px !important;
  width: 360px !important;
  max-width: calc(100vw - 32px) !important;
  z-index: 9999999 !important;
}

.notifications-drawer-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.notifications-drawer-overlay:not(.hidden) {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ⚙️ Modern Settings Modal & Match Info Grid */
.settings-card-modern {
  max-width: 480px !important;
  width: 92% !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-radius: 24px !important;
  padding: 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
  box-sizing: border-box !important;
}

.settings-section-title {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.settings-match-info-box {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  margin: 12px 0 16px 0 !important;
}

.settings-info-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.settings-info-card {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.info-card-label {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
}

.info-card-value {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
}

.info-card-value.warning {
  color: #f87171 !important;
}

.settings-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.settings-toggle-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 14px !important;
  background: rgba(30, 41, 59, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.settings-toggle-row:hover {
  background: rgba(30, 41, 59, 0.8) !important;
}

.custom-toggle-input {
  width: 22px !important;
  height: 22px !important;
  cursor: pointer !important;
  accent-color: #38bdf8 !important;
}

.dev-tools-box {
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding-top: 12px !important;
  margin-top: 6px !important;
}

.btn-dev-logs {
  width: 100% !important;
  margin-top: 10px !important;
  padding: 10px !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fca5a5 !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
}

/* ⏱️ Turn Timer Box Widget */
.timer-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 48px !important;
  padding: 0 !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  color: #38bdf8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#turn-timer,
.timer-value {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  letter-spacing: 0px !important;
  font-variant-numeric: tabular-nums !important;
}

/* ==========================================================================
   ✨ NUEVO CENTRO SOCIAL — ESTILOS PREMIUM
   ========================================================================== */

/* Hero Banner del Jugador */
.social-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.social-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.social-hero-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
}

.social-hero-avatar-ring {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  flex-shrink: 0;
}

.social-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-hero-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
}

.social-hero-title-badge {
  font-size: 0.72rem;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.social-hero-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 700;
}

.social-hero-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Caja de Código de Usuario / Copiar ID */
.social-hero-id-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.social-hero-id-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-hero-id-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: monospace;
  letter-spacing: 0.5px;
}

/* Animación de Pulso de Estado */
.friend-status-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

.friend-status-pulse.online {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-green 2s infinite;
}

.friend-status-pulse.ingame {
  background: #a855f7;
  box-shadow: 0 0 10px #a855f7;
  animation: pulse-purple 2s infinite;
}

.friend-status-pulse.offline {
  background: #64748b;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes pulse-purple {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

/* Tarjeta Mejorada de Amigo */
.friend-card-v2 {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.friend-card-v2:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.friend-v2-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.friend-v2-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.friend-v2-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.friend-v2-username {
  font-weight: 900;
  font-size: 0.94rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.friend-v2-tag {
  font-size: 0.72rem;
  color: #64748b;
  font-family: monospace;
  font-weight: 600;
}

.friend-v2-subtext {
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.friend-v2-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-friend-invite {
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-friend-invite:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.btn-friend-remove {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-friend-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

/* Solicitudes Pendientes Section */
.pending-requests-card {
  margin-bottom: 20px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.pending-requests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pending-requests-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pending-requests-badge-anim {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.pending-request-item {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pending-request-item:last-child {
  margin-bottom: 0;
}

/* Empty State Animado - Compact Luxury Layout */
.social-empty-state {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important;
  padding: 12px 14px !important;
  color: #cbd5e1 !important;
  font-size: 0.82rem !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.78) 100%) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.social-empty-state:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(56, 189, 248, 0.2) !important;
}

.social-empty-icon,
.social-empty-icon.ui-svg-icon {
  font-size: 1.2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  margin-bottom: 0 !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 10px !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25) !important;
  flex-shrink: 0 !important;
  flex: 0 0 36px !important;
  opacity: 1 !important;
  filter: none !important;
  box-sizing: border-box !important;
}

.social-empty-icon svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: block !important;
}

.social-empty-text {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #cbd5e1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* Botón Minimalista de la Tienda */
.btn-shop-action {
  width: 100% !important;
  padding: 3px 4px !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  border: none !important;
  text-align: center !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  white-space: nowrap !important;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3) !important;
}

.btn-shop-action.btn-buy:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5) !important;
}

.btn-shop-action.btn-equip {
  background: rgba(56, 189, 248, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

.btn-shop-action.btn-equip:hover {
  background: rgba(56, 189, 248, 0.35) !important;
  color: #ffffff !important;
}

.btn-shop-action.btn-active {
  background: rgba(34, 197, 94, 0.2) !important;
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  color: #4ade80 !important;
}

/* 🃏 Cartas de Desarrollo — Carrusel Horizontal Dividido & Accesible */
.hud-scroll-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#dev-cards-hud-list,
.hud-cards-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  touch-action: pan-x !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 12px 14px 12px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(192, 132, 252, 0.5) rgba(15, 23, 42, 0.6) !important;
}

.dev-cards-lane {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
}

.dev-lane-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 2px 4px !important;
  flex-shrink: 0 !important;
}

.dev-lane-header .lane-title {
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #38bdf8 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
  white-space: nowrap !important;
}

.dev-lane-header.used .lane-title {
  color: #94a3b8 !important;
  text-shadow: none !important;
}

.dev-lane-cards {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
}

/* Divisor vertical entre Activas y Usadas */
.dev-cards-divider {
  display: flex !important;
  align-items: stretch !important;
  padding: 16px 2px 0 2px !important;
  flex-shrink: 0 !important;
}

.dev-cards-divider .divider-line {
  width: 2px !important;
  height: 100% !important;
  min-height: 110px !important;
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.6) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  border-radius: 2px !important;
}

#dev-cards-hud-list .hud-dev-card,
.hud-cards-list .hud-dev-card {
  flex-shrink: 0 !important;
  min-width: 110px !important;
  width: 110px !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 14px !important;
  padding: 10px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 4px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
  position: relative !important;
  user-select: none !important;
}

#dev-cards-hud-list .hud-dev-card:hover:not(.played):not(.locked),
.hud-cards-list .hud-dev-card:hover:not(.played):not(.locked) {
  transform: translateY(-4px) scale(1.03) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.35) !important;
}

/* Cartas de desarrollo Usadas / Agotadas */
.dev-cards-lane.used-lane .hud-dev-card,
#dev-cards-hud-list .hud-dev-card.played,
.hud-cards-list .hud-dev-card.played {
  opacity: 0.65 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
  filter: grayscale(0.35) !important;
  box-shadow: none !important;
}

.dev-cards-lane.used-lane .hud-dev-card:hover,
#dev-cards-hud-list .hud-dev-card.played:hover {
  opacity: 0.85 !important;
  transform: none !important;
}

/* Badges de estado */
.card-status-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  margin-top: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.card-status-badge.played-badge {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
}

.card-status-badge.vp-badge {
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
}

.card-status-badge.locked-badge {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* Scrollbar Personalizado Sutil */
#dev-cards-hud-list::-webkit-scrollbar,
.hud-cards-list::-webkit-scrollbar {
  height: 6px !important;
}

#dev-cards-hud-list::-webkit-scrollbar-track,
.hud-cards-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 4px !important;
}

#dev-cards-hud-list::-webkit-scrollbar-thumb,
.hud-cards-list::-webkit-scrollbar-thumb {
  background: rgba(192, 132, 252, 0.4) !important;
  border-radius: 4px !important;
}

#dev-cards-hud-list::-webkit-scrollbar-thumb:hover,
.hud-cards-list::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 132, 252, 0.75) !important;
}

.dev-cards-hud {
  max-width: min(520px, 94vw) !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   MINIMALIST HUD PLAYER TRADE BAR & COMPACT TRADE RESPONSE CARD
   ========================================================================== */
.hud-player-trade-bar {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #2dd4bf;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(45, 212, 191, 0.25);
  z-index: 100;
  animation: hudTradeBarSlide 0.25s ease-out;
  box-sizing: border-box;
}

@keyframes hudTradeBarSlide {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98) translateX(-50%);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(-50%);
  }
}

.hud-player-trade-bar.hidden {
  display: none !important;
}

.hud-trade-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.hud-trade-bar-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #2dd4bf;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-trade-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hud-trade-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  box-sizing: border-box;
  min-width: 0;
}

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

.hud-trade-side-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
}

.hud-trade-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 32px;
}

.hud-trade-chips .empty-hint {
  font-size: 0.72rem;
  color: #64748b;
  font-style: italic;
}

.hud-give-chip {
  background: rgba(45, 212, 191, 0.2);
  border: 1px solid #2dd4bf;
  color: #2dd4bf;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-hud-mini-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-hud-mini-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hud-trade-divider {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fbbf24;
  user-select: none;
  flex-shrink: 0;
}

.hud-trade-want-selectors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  flex-wrap: wrap;
}

.hud-want-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  flex: 1;
  min-width: 38px;
  justify-content: center;
}

.hud-want-chip:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
}

.hud-want-chip.is-selected {
  background: rgba(251, 191, 36, 0.22);
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.28);
}

.hud-want-chip * {
  pointer-events: none;
}

.hud-want-chip .want-count {
  font-weight: 900;
  font-size: 0.78rem;
  color: #fbbf24;
  min-width: 10px;
  text-align: center;
}

.hud-want-chip.no-stock {
  opacity: 0.42;
  filter: grayscale(80%);
  cursor: not-allowed;
  border-color: rgba(239, 68, 68, 0.35) !important;
  position: relative;
}

.hud-want-chip.no-stock:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.hud-want-chip.no-stock::after {
  content: '✕';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 11px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.8);
}

.hud-trade-bar-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-hud-send-trade {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1.5px solid #34d399;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.btn-hud-send-trade:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-hud-send-trade:not(:disabled):hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-hud-close-trade {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
  font-weight: 800;
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-hud-close-trade:hover {
  background: #ef4444;
  color: #fff;
}

/* --- TRADE ACTIVE ULTRA-COMPACT FLOATING CARD (AAA ESPORTS & LUXURY REDESIGN - DOCKED ABOVE BOTTOM HUD) --- */
:root {
  --action-bar-dock-height: 80px;
}

@media (max-width: 768px) {
  :root {
    --action-bar-dock-height: 148px;
  }
}

.trade-active-compact-card {
  position: fixed !important;
  top: auto !important;
  bottom: var(--trade-overlay-bottom, calc(var(--action-bar-dock-height, 148px) + 8px)) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 25000 !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 15, 29, 0.98) 100%) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  border-top: 1.5px solid rgba(251, 191, 36, 0.85) !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  box-shadow: 0 16px 45px -8px rgba(0, 0, 0, 0.92), 0 0 30px -5px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 15px rgba(245, 158, 11, 0.04) !important;
  width: 360px !important;
  max-width: calc(100vw - 20px) !important;
  max-height: calc(100vh - 160px) !important;
  box-sizing: border-box !important;
  animation: tradeCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: auto !important;
  overflow: hidden !important;
}

.trade-active-compact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, transparent);
  box-shadow: 0 0 12px #fbbf24;
  pointer-events: none;
}

@keyframes tradeCardPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.95);
    filter: blur(3px);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    filter: blur(0);
  }
}

.trade-active-compact-card.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.trade-active-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

.trade-active-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 10px !important;
}

.trade-active-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.trade-active-avatar {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 0.80rem !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

.trade-active-avatar.hidden {
  display: none !important;
}

.trade-active-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  letter-spacing: 0.2px !important;
}

.trade-timer-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.12)) !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  border-radius: 20px !important;
  padding: 3px 9px !important;
  color: #fde68a !important;
  font-weight: 900 !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.03em !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.trade-accepted-alert {
  color: #34d399 !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  animation: acceptedGlow 1s infinite alternate ease-in-out !important;
}

@keyframes acceptedGlow {
  from {
    color: #34d399;
    text-shadow: 0 0 4px rgba(52, 211, 153, 0.4);
  }

  to {
    color: #6ee7b7;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
  }
}

.btn-trade-close-mini {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  flex-shrink: 0 !important;
}

.btn-trade-close-mini:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35) !important;
}

/* Timer progress bar */
.trade-timer-bar-container {
  width: 100% !important;
  height: 5px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  padding: 1px !important;
  box-sizing: border-box !important;
}

.trade-timer-bar-fill {
  height: 100% !important;
  width: 100% !important;
  background: linear-gradient(90deg, #10b981 0%, #34d399 40%, #fbbf24 75%, #ef4444 100%) !important;
  border-radius: 4px !important;
  transition: width 0.3s linear !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5) !important;
}

.trade-active-body {
  font-size: 0.8rem !important;
  margin: 0 !important;
  width: 100% !important;
}

.trade-compact-grid {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(20, 29, 48, 0.90)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.trade-arrow-divider {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
  animation: tradeArrowPulse 1.8s infinite alternate ease-in-out !important;
}

@keyframes tradeArrowPulse {
  from {
    transform: scale(0.95);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  }

  to {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
  }
}

.trade-res-section {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.trade-res-section-label {
  font-weight: 900 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.trade-res-section.recibes .trade-res-section-label {
  color: #34d399 !important;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.35) !important;
}

.trade-res-section.entregas .trade-res-section-label {
  color: #fca5a5 !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.35) !important;
}

.trade-res-chips {
  display: flex !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
}

.trade-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
  font-weight: 900 !important;
  font-size: 0.80rem !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.15s ease !important;
}

.trade-chip:hover {
  transform: translateY(-1px) scale(1.03) !important;
}

.trade-chip.wood {
  border-color: rgba(74, 222, 128, 0.5) !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(21, 128, 61, 0.2)) !important;
  color: #86efac !important;
}

.trade-chip.brick {
  border-color: rgba(248, 113, 113, 0.5) !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.2)) !important;
  color: #fca5a5 !important;
}

.trade-chip.sheep {
  border-color: rgba(192, 132, 252, 0.5) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(126, 34, 206, 0.2)) !important;
  color: #e9d5ff !important;
}

.trade-chip.wheat {
  border-color: rgba(250, 204, 21, 0.5) !important;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(161, 98, 7, 0.2)) !important;
  color: #fef08a !important;
}

.trade-chip.ore {
  border-color: rgba(203, 213, 225, 0.5) !important;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(71, 85, 105, 0.2)) !important;
  color: #f1f5f9 !important;
}

.chip-qty {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.trade-res-empty {
  color: #64748b !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

/* Receiver Accept / Reject action buttons */
.trade-compact-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
}

.trade-compact-actions.hidden,
#trade-receiver-actions.hidden {
  display: none !important;
}

.btn-trade-tick {
  flex: 1 !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.03em !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn-trade-tick.accept {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.btn-trade-tick.accept:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-trade-tick.reject {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  border: 1px solid rgba(248, 113, 113, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.btn-trade-tick.reject:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-trade-tick:active {
  transform: scale(0.97) !important;
}

.btn-trade-tick:disabled,
.btn-trade-tick.disabled {
  background: rgba(71, 85, 105, 0.4) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.45 !important;
  filter: grayscale(0.8) !important;
  pointer-events: none !important;
}

/* Sender Rival Response Items */
.trade-sender-responses {
  max-height: 140px;
  overflow-y: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.trade-sender-responses.hidden,
#trade-sender-view.hidden {
  display: none !important;
}

.trade-rival-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 7px 12px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-sizing: border-box !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.trade-rival-item.accepted {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.15) 100%) !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35) !important;
}

.trade-rival-item.rejected {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.rival-info {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.rival-avatar {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 50% !important;
  border: 2px solid #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 0.74rem !important;
  color: #fff !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.rival-text-col {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}

.rival-name {
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.rival-status-tag {
  font-weight: 800 !important;
  font-size: 0.7rem !important;
}

.rival-status-tag.accept {
  color: #34d399 !important;
  text-shadow: 0 0 6px rgba(52, 211, 153, 0.5) !important;
}

.rival-status-tag.reject {
  color: #fca5a5 !important;
}

.rival-status-tag.waiting {
  color: #94a3b8 !important;
}

/* Outstanding Deal Execute Button for the Sender */
.btn-trade-deal-execute {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1px solid #34d399 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.80rem !important;
  padding: 6px 14px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  white-space: nowrap !important;
  animation: pulseDealBtn 1.5s infinite alternate ease-in-out !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
}

@keyframes pulseDealBtn {
  from {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
  }

  to {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.8), 0 0 12px #34d399;
  }
}

.btn-trade-deal-execute:hover {
  filter: brightness(1.2) !important;
  transform: scale(1.08) !important;
}

.btn-trade-deal-execute:active {
  transform: scale(0.96) !important;
}

/* Receiver Response Feedback Card */
.trade-response-feedback {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  margin-top: 6px !important;
  box-sizing: border-box !important;
}

.trade-response-feedback.accepted {
  background: rgba(16, 185, 129, 0.20) !important;
  border: 1.5px solid #10b981 !important;
  color: #34d399 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25) !important;
}

.trade-response-feedback.rejected {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fca5a5 !important;
}

.trade-response-feedback .feedback-icon {
  font-size: 1.2rem !important;
}

.trade-response-feedback .feedback-text {
  display: flex !important;
  flex-direction: column !important;
  font-size: 0.80rem !important;
}

.trade-response-feedback .feedback-text strong {
  font-weight: 900 !important;
  font-size: 0.84rem !important;
}

.trade-response-feedback .feedback-text span {
  font-size: 0.72rem !important;
  opacity: 0.9 !important;
}

@media (max-width: 640px) {
  .trade-active-compact-card {
    top: auto !important;
    bottom: var(--trade-overlay-bottom, calc(var(--action-bar-dock-height, 148px) + 8px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(348px, calc(100vw - 16px)) !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    max-height: calc(100vh - 165px) !important;
  }

  .btn-trade-tick {
    min-height: 42px !important;
    height: 42px !important;
  }
}

/* --- Lobby Players List & Grid Responsive Layout --- */
#lobby-players-list,
.players-lobby-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  box-sizing: border-box !important;
}

.lobby-player-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 14px !important;
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.38) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

.lobby-player-item:hover {
  border-color: rgba(251, 191, 36, 0.8) !important;
  background: rgba(15, 23, 42, 0.6) !important;
  transform: translateY(-1px) !important;
}

.lobby-player-item.bot {
  background: rgba(15, 23, 42, 0.38) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
}

.lobby-player-item .p-name {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  color: #ffffff !important;
  flex: 1 !important;
  min-width: 0 !important;
  word-break: break-word !important;
}

.btn-remove-bot {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  border-radius: 8px !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-remove-bot:hover {
  background: rgba(239, 68, 68, 0.5) !important;
  color: #ffffff !important;
}

@media (min-width: 640px) {

  #lobby-players-list,
  .players-lobby-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 12px !important;
  }
}

/* --- Modern Premium Social Center Styles --- */
.social-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 18px !important;
  padding: 16px 20px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(12px) !important;
}

.social-filter-pills,
.social-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 5px !important;
  border-radius: 14px !important;
  margin-bottom: 14px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.social-pill,
.social-tab-btn {
  flex: 1 1 auto !important;
  min-width: 70px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.social-pill.active,
.social-tab-btn.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4) !important;
}

.friend-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  gap: 8px !important;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.friend-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35) !important;
}

.friend-card button {
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.pending-requests-card {
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  margin-bottom: 14px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* ==========================================================================
   KMKZ UNIFIED CYBER-SETTINGS & ACCESSIBILITY SYSTEM (PREMIUM MODAL & PAGE)
   ========================================================================== */

/* Settings Modal Container & Card Frame */
#settings-overlay .overlay-content.settings-card-modern,
.settings-card-modern {
  max-width: 860px !important;
  width: min(860px, calc(100vw - 32px)) !important;
  box-sizing: border-box !important;
  padding: 20px 22px !important;
  max-height: min(92dvh, 840px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
  border-radius: 22px !important;
  background: linear-gradient(145deg, rgba(13, 20, 36, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  position: relative !important;
  margin: auto !important;
}

.settings-card-modern .trade-modal-header,
.settings-nav-tabs {
  flex: 0 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-card-modern .trade-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.settings-card-modern .trade-modal-header h2 {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  letter-spacing: 0.3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Nav Tabs */
#settings-overlay .settings-nav-tabs,
.settings-nav-tabs {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 6px !important;
  margin-bottom: 14px !important;
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.88) 0%, rgba(6, 10, 22, 0.96) 100%) !important;
  padding: 5px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

.settings-tab-nav-btn {
  flex: 1 !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.settings-tab-nav-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.settings-tab-nav-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.35)) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25) !important;
}

/* Scrollable Panel */
.settings-tab-panel {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
  padding: 4px 6px 14px 2px !important;
  max-height: calc(92dvh - 130px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-tab-panel::-webkit-scrollbar {
  width: 5px;
}

.settings-tab-panel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 6px;
}

.settings-tab-panel::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 6px;
}

/* Settings Sections List (Clean, Unified Vertical Stack) */
.settings-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Unified Section Card (Standardized Dimensions & Cyber-Glass Aesthetic) */
.settings-section-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.65) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.18) !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.settings-section-card:hover {
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

@media (min-width: 768px) {
  #settings-tab-options .settings-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  #settings-tab-options .settings-list > .settings-section-card {
    margin-bottom: 0 !important;
    height: 100% !important;
  }

  /* Pair Interfaz y Tablero (left, 2 rows) with Comunicación + Rendimiento (right) */
  #settings-tab-options .settings-list > .settings-section-card:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 2 / span 2 !important;
  }

  #settings-tab-options .settings-list > .settings-section-card:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  #settings-tab-options .settings-list > .settings-section-card:nth-child(5) {
    grid-column: 2 !important;
    grid-row: 3 !important;
  }

  #settings-tab-options .settings-list > .settings-section-card:nth-child(8) {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #settings-tab-options .settings-list > .settings-section-card:nth-child(8) > .settings-section-header {
    grid-column: 1 / -1 !important;
    margin-bottom: 2px !important;
  }

  #settings-tab-options .settings-list > #setting-dev-mode-row {
    grid-column: 1 / -1 !important;
  }
}

/* Section Header & Title */
.settings-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 2px !important;
  margin-bottom: 2px !important;
}

.settings-section-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.settings-section-title-wrap .ui-svg-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

.settings-section-title-wrap .ui-svg-icon.gold {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
  color: #fbbf24 !important;
}

.settings-section-title-wrap .ui-svg-icon.emerald {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
}

.settings-section-title-wrap .ui-svg-icon.cyan {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  color: #38bdf8 !important;
}

.settings-section-title {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #f8fafc !important;
  margin: 0 !important;
}

.settings-section-badge {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.settings-section-badge.cyan {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.settings-section-badge.gold {
  background: rgba(251, 191, 36, 0.14) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
}

/* ==========================================================================
   UNIFIED ACCESSIBLE TOGGLE ROW & TEXT HIERARCHY
   ========================================================================== */
.settings-toggle-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 52px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 0 !important;
}

.settings-toggle-row:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px) !important;
}

.settings-toggle-row:active {
  transform: translateY(0) scale(0.99) !important;
}

.settings-toggle-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
}

.settings-toggle-title {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  line-height: 1.3 !important;
  word-break: break-word !important;
}

.settings-toggle-desc {
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
}

/* Compatibility with rows where text is in bare <span> */
.settings-toggle-row>span {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  word-break: break-word !important;
  line-height: 1.3 !important;
}

/* ==========================================================================
   HIGH-TECH TACTILE SWITCH (ACCESSIBLE 46x26px, SILKY HARDWARE ACCELERATION)
   ========================================================================== */
.custom-toggle-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 46px !important;
  height: 26px !important;
  min-width: 46px !important;
  min-height: 26px !important;
  border-radius: 9999px !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border: 2px solid rgba(148, 163, 184, 0.35) !important;
  cursor: pointer !important;
  position: relative !important;
  outline: none !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

.custom-toggle-input::before {
  content: none !important;
  display: none !important;
}

.custom-toggle-input::after {
  content: "" !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #94a3b8 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
  opacity: 1 !important;
  color: transparent !important;
  font-size: 0 !important;
}

.custom-toggle-input:checked {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45) !important;
}

.custom-toggle-input:checked::after {
  transform: translate3d(20px, 0, 0) !important;
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

.custom-toggle-input:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   VOLUME SLIDERS (INSET DECK WITH LUMINOUS TRACK & ACCESSIBLE THUMB)
   ========================================================================== */
.settings-slider-group {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.settings-slider-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.settings-slider-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.settings-slider-label {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
}

.settings-slider-val {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

.settings-slider-val.cyan {
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

.settings-slider-val.gold {
  background: rgba(251, 191, 36, 0.14) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fbbf24 !important;
}

.settings-range-slider {
  width: 100% !important;
  height: 28px !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.settings-range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.settings-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #f8fafc;
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.settings-range-slider.cyan::-webkit-slider-thumb {
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.settings-range-slider.gold::-webkit-slider-thumb {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.settings-range-slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

/* ==========================================================================
   LANGUAGE SELECTOR & PERFORMANCE PROFILE SEGMENTED CONTROLS
   ========================================================================== */
.settings-lang-selector {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-lang-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.settings-lang-btn:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #ffffff !important;
}

.settings-lang-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.35)) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3) !important;
}

.perf-profile-selector {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 4px !important;
}

.btn-perf-opt {
  min-height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  background: transparent !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-perf-opt:hover {
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.btn-perf-opt.active {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

/* ==========================================================================
   STANDARDIZED ACTION BUTTONS (.btn-settings-action)
   ========================================================================== */
.btn-settings-action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 46px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 0 !important;
}

.btn-settings-action:active {
  transform: scale(0.99) !important;
}

.btn-settings-action.primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(2, 132, 199, 0.4) 100%) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.28) !important;
}

.btn-settings-action.primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4) 0%, rgba(2, 132, 199, 0.55) 100%) !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45) !important;
  transform: translateY(-1px) !important;
}

.btn-settings-action.cyan {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.btn-settings-action.cyan:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.btn-settings-action.gold {
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

.btn-settings-action.gold:hover {
  background: rgba(251, 191, 36, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.btn-settings-action.danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}

.btn-settings-action.danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.btn-settings-action.secondary {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #cbd5e1 !important;
}

.btn-settings-action.secondary:hover {
  background: rgba(51, 65, 85, 0.8) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   TAB 2: MATCH INFO GRID & ROOM CODE BOX (UNIFIED CARD STYLING)
   ========================================================================== */
.settings-info-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-info-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 60px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
}

.settings-info-card .info-card-label {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.settings-info-card .info-card-value {
  font-size: 0.95rem !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.settings-info-card .info-card-value.warning {
  color: #fbbf24 !important;
}

.settings-room-code-box {
  margin-top: 12px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.settings-room-code-interactive {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#settings-room-code-val,
.settings-room-code-badge {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 85px) !important;
  font-family: 'Outfit', 'Segoe UI', monospace !important;
  font-size: clamp(0.72rem, 2.2vw, 0.88rem) !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.5px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  user-select: all !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
}

.btn-copy-settings-room-code {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 6px 12px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.35)) !important;
  border: 1px solid #fbbf24 !important;
  border-radius: 8px !important;
  color: #fef08a !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

/* ==========================================================================
   MOBILE & TOUCH RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 600px) {
  #settings-overlay {
    padding: 8px !important;
  }

  #settings-overlay .overlay-content.settings-card-modern,
  .settings-card-modern {
    width: calc(100vw - 12px) !important;
    max-width: 100% !important;
    max-height: 94dvh !important;
    padding: 14px 12px 16px 12px !important;
    border-radius: 18px !important;
  }

  .settings-section-card {
    padding: 12px !important;
    border-radius: 14px !important;
    gap: 8px !important;
  }

  .settings-toggle-row {
    min-height: 50px !important;
    padding: 9px 12px !important;
    gap: 10px !important;
  }

  .settings-toggle-title {
    font-size: 0.82rem !important;
  }

  .settings-toggle-desc {
    font-size: 0.7rem !important;
  }

  .custom-toggle-input {
    width: 44px !important;
    height: 25px !important;
    min-width: 44px !important;
    min-height: 25px !important;
  }

  .custom-toggle-input::after {
    width: 17px !important;
    height: 17px !important;
  }

  .custom-toggle-input:checked::after {
    transform: translate3d(19px, 0, 0) !important;
  }

  .btn-settings-action {
    min-height: 44px !important;
    font-size: 0.82rem !important;
    padding: 8px 12px !important;
  }

  .settings-info-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .settings-info-card {
    padding: 8px 10px !important;
    min-height: 56px !important;
  }
}

/* --- Social Center Search & Add Friend Input Bar --- */
#social-page-add-wrap,
#modal-add-friend-wrap {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 14px !important;
}

.social-search-bar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.social-search-input-wrap {
  position: relative !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 12px !important;
  padding: 0 12px 0 38px !important;
  height: 42px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.social-search-input-wrap:focus-within {
  border-color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.98) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.social-search-icon {
  position: absolute !important;
  left: 12px !important;
  font-size: 1rem !important;
  color: #94a3b8 !important;
  pointer-events: none !important;
  opacity: 0.8 !important;
  transition: opacity 0.2s ease, color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.social-search-input-wrap:focus-within .social-search-icon {
  opacity: 1 !important;
  color: #38bdf8 !important;
}

.social-search-input-wrap input,
#social-input-add-friend {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.social-search-input-wrap input::placeholder,
#social-input-add-friend::placeholder {
  color: #94a3b8 !important;
  font-weight: 500 !important;
  font-size: 0.84rem !important;
}

.btn-social-add-submit {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  flex: 0 0 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-social-add-submit:hover {
  background: linear-gradient(135deg, #38bdf8, #0284c7) !important;
  box-shadow: 0 5px 14px rgba(56, 189, 248, 0.45) !important;
  transform: translateY(-1px) scale(1.05) !important;
}

.btn-social-add-submit:active {
  transform: scale(0.94) !important;
}

.btn-social-pending-toggle {
  position: relative !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(249, 115, 22, 0.15) !important;
  color: #f97316 !important;
  border: 1px solid rgba(249, 115, 22, 0.45) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  flex: 0 0 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 8px rgba(249, 115, 22, 0.25) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-social-pending-toggle:hover {
  background: rgba(249, 115, 22, 0.28) !important;
  border-color: #f97316 !important;
  color: #fb923c !important;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45) !important;
  transform: translateY(-1px) scale(1.05) !important;
}

.btn-social-pending-toggle:active {
  transform: scale(0.94) !important;
}

.btn-social-pending-toggle .badge-count {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 17px !important;
  height: 17px !important;
  border-radius: 9999px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  padding: 0 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid #0b1122 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6) !important;
  pointer-events: none !important;
}

.pending-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pending-modal-item:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.3);
}

/* --- Jet Black with Fine Silver Border Cards & Integrated Action Buttons --- */
.friend-card-v2 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 16px !important;
  background: rgba(8, 11, 20, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.22) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.friend-card-v2:hover {
  background: rgba(13, 18, 30, 0.98) !important;
  border-color: rgba(248, 250, 252, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 14px rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px) !important;
}

.btn-card-action-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  padding: 7px 14px !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-card-action-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%) !important;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.5) !important;
  transform: translateY(-1px) !important;
}

.btn-card-action-secondary {
  background: rgba(248, 250, 252, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(226, 232, 240, 0.25) !important;
  padding: 7px 12px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-card-action-secondary:hover {
  background: rgba(248, 250, 252, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
}

.btn-card-action-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  padding: 7px 12px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-card-action-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

/* --- Ultra-Compact Shop Items Grid (2 Cards Per Row) & High-Contrast Touch Buttons --- */
#shop-items-grid,
.shop-items-grid,
.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#collection-items-grid,
.collection-items-grid {
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}


.shop-card-hex-legacy-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-shop-action {
  width: 100% !important;
  padding: 6px 2px !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  text-align: center !important;
  white-space: nowrap !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #fbbf24 !important;
  box-shadow: 0 3px 10px rgba(251, 191, 36, 0.35) !important;
}

.btn-shop-action.btn-buy:hover {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(251, 191, 36, 0.5) !important;
}

.btn-shop-action.btn-equip {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.35) !important;
}

.btn-shop-action.btn-equip:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #0369a1 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(56, 189, 248, 0.5) !important;
}

.btn-shop-action.btn-active {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid #22c55e !important;
  cursor: default !important;
}

/* ═══════════════════════════════════════════════════════════════════
   DICE ROLL ORDER OVERLAY — Tirada Inicial (HUD Bottom Panel)
   Panel integrado en el juego: semitransparente, anclado al fondo.
   El tablero sigue siendo visible detrás del overlay.
   ═══════════════════════════════════════════════════════════════════ */
.dice-roll-order-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 90%, rgba(2, 6, 23, 0.45) 0%, rgba(2, 6, 23, 0.0) 70%);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 14px;
  box-sizing: border-box;
  animation: slideUpOrderPanel 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
  pointer-events: none;
  transition: background 0.3s ease;
}

.dice-roll-order-overlay.is-minimized {
  background: transparent !important;
  pointer-events: none !important;
}

.dice-roll-order-overlay>* {
  pointer-events: auto;
}

.dice-roll-order-overlay.hidden {
  display: none !important;
}

@keyframes slideUpOrderPanel {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dice-roll-order-card {
  background: radial-gradient(130% 120% at 50% -20%,
      rgba(26, 38, 66, 0.96) 0%,
      rgba(13, 20, 36, 0.98) 50%,
      rgba(7, 11, 22, 0.99) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(251, 191, 36, 0.4) inset,
    0 0 45px rgba(245, 158, 11, 0.16);
  border-radius: 24px;
  width: 100%;
  max-width: min(94vw, 560px);
  padding: 0 0 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: min(620px, 90vh);
  z-index: 10001;
  user-select: none;
  transition: box-shadow 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.dice-roll-order-card.has-custom-pos {
  position: fixed !important;
  bottom: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
}

.dice-roll-order-card.is-dragging {
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.9), 0 0 40px rgba(251, 191, 36, 0.55) !important;
  opacity: 0.96;
  cursor: grabbing !important;
  transition: none !important;
}

.dice-roll-order-window-bar,
.dice-roll-order-drag-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 2px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dice-roll-order-window-bar:active,
.dice-roll-order-drag-bar:active {
  cursor: grabbing;
}

.dice-order-drag-grip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(251, 191, 36, 0.9);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 9999px;
  padding: 3px 14px;
  pointer-events: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dice-roll-order-window-bar:hover .dice-order-drag-grip,
.dice-roll-order-drag-bar:hover .dice-order-drag-grip {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
  transform: scale(1.02);
}

.dice-order-drag-handle {
  font-size: 0.88rem;
  line-height: 1;
  color: #fbbf24;
  letter-spacing: 1px;
}

.dice-order-drag-label {
  font-family: system-ui, -apple-system, sans-serif;
  opacity: 0.9;
}

.dice-order-window-controls {
  display: none !important;
}

.btn-dice-order-minimize {
  display: none !important;
}

/* Floating Minimized Capsule / Pill */
.dice-roll-order-minibar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(251, 191, 36, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 9999px;
  z-index: 10001;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.dice-roll-order-minibar.has-custom-pos {
  position: fixed !important;
  bottom: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
}

.dice-roll-order-minibar.is-dragging {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(251, 191, 36, 0.6) !important;
  cursor: grabbing !important;
  transition: none !important;
}

.dice-roll-order-minibar:hover {
  border-color: #fbbf24;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.85), 0 0 28px rgba(251, 191, 36, 0.5);
}

.dice-order-mini-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-mini-dice-svg {
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.4));
  animation: diceMiniFloat 2.4s ease-in-out infinite alternate;
}

@keyframes diceMiniFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-2px) rotate(8deg);
  }
}

.dice-order-mini-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.dice-order-mini-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #fbbf24;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dice-order-mini-status {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-roll-order-mini {
  padding: 5px 14px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fde68a;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.65);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-roll-order-mini:hover {
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.85);
}

.btn-dice-order-toggle-expand {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #38bdf8;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-dice-order-toggle-expand:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.1);
}

.dice-roll-order-header {
  margin-bottom: 8px;
  margin-top: 6px;
  padding: 4px 18px 0;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.dice-roll-order-icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dice-order-header-aura {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, rgba(56, 189, 248, 0.15) 50%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
  animation: diceAuraBreathe 3s ease-in-out infinite alternate;
}

@keyframes diceAuraBreathe {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.08); opacity: 1; }
}

.dice-order-crest-svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.35));
}

.dice-roll-order-crest-dice {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  perspective: 700px;
}

.dice-roll-order-crest-dice .crest-dice-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  filter: drop-shadow(0 6px 16px rgba(245, 158, 11, 0.45));
}

.dice-roll-order-crest-dice .order-3d-die {
  --cube-sz: 36px !important;
  --cube-half: 18px !important;
  width: 36px !important;
  height: 36px !important;
}

.dice-roll-order-crest-dice .order-3d-die .die-cube {
  width: 36px !important;
  height: 36px !important;
}

.dice-roll-order-crest-dice .order-3d-die .die-face {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
}

.dice-roll-order-crest-dice .order-3d-die .die-face-1 { transform: rotateY(0deg) translateZ(18px) !important; }
.dice-roll-order-crest-dice .order-3d-die .die-face-6 { transform: rotateY(180deg) translateZ(18px) !important; }
.dice-roll-order-crest-dice .order-3d-die .die-face-3 { transform: rotateY(90deg) translateZ(18px) !important; }
.dice-roll-order-crest-dice .order-3d-die .die-face-4 { transform: rotateY(-90deg) translateZ(18px) !important; }
.dice-roll-order-crest-dice .order-3d-die .die-face-5 { transform: rotateX(90deg) translateZ(18px) !important; }
.dice-roll-order-crest-dice .order-3d-die .die-face-2 { transform: rotateX(-90deg) translateZ(18px) !important; }

.dice-roll-order-crest-dice .order-3d-die:first-child .die-cube {
  animation: dieAestheticFloat1 3.4s ease-in-out infinite alternate !important;
}

.dice-roll-order-crest-dice .order-3d-die:last-child .die-cube {
  animation: dieAestheticFloat2 3.8s ease-in-out infinite alternate 0.35s !important;
}

.dice-roll-order-icon {
  font-size: 2.3rem;
  margin-bottom: 2px;
  display: inline-block;
  transform: translateZ(0);
}

.dice-roll-order-title {
  color: #fbbf24;
  font-family: 'Cinzel', serif, sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0 0 4px 0;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 14px rgba(245, 158, 11, 0.3);
}

.dice-roll-order-subtitle {
  color: #cbd5e1;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
}

/* Responsive Player Cards Grid */
.dice-roll-order-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
}

/* Individual Player Card - Modern Aesthetic */
.order-player-card {
  background: linear-gradient(175deg, rgba(18, 26, 46, 0.85) 0%, rgba(10, 15, 29, 0.95) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.22s ease;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  min-width: 0;
}

.order-player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--player-col, #38bdf8), transparent);
  box-shadow: 0 0 10px var(--player-col, #38bdf8);
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0.9;
}

.order-player-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 36px -4px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.order-player-card.is-me {
  border-color: rgba(56, 189, 248, 0.65) !important;
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.16) 0%, transparent 75%),
              linear-gradient(175deg, rgba(14, 165, 233, 0.08) 0%, rgba(10, 15, 29, 0.96) 100%) !important;
  box-shadow: 0 10px 32px -4px rgba(0, 0, 0, 0.7), 0 0 22px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(186, 230, 253, 0.3) !important;
}

.order-player-card.has-rolled {
  border-color: rgba(34, 197, 94, 0.55) !important;
}

.order-player-card.is-winner {
  border-color: #fbbf24 !important;
  background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.22) 0%, transparent 75%),
              linear-gradient(175deg, rgba(251, 191, 36, 0.12) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  box-shadow: 0 12px 38px -4px rgba(0, 0, 0, 0.75), 0 0 28px rgba(251, 191, 36, 0.45), inset 0 1px 0 rgba(254, 240, 138, 0.4) !important;
  transform: scale(1.03);
}

/* Card Header - Decluttered & Modern */
.order-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.order-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.order-player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--player-col, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.order-player-avatar-stage {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-player-avatar-stage svg,
.order-player-avatar-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-bot-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.order-player-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.order-player-name {
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
}

.order-player-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.order-me-pill {
  font-size: 0.62rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.45);
}

.order-crown-pill {
  font-size: 0.62rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Center 3D Dice Stage */
.order-card-dice-stage {
  padding: 10px 0 6px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  perspective: 700px;
}

.order-dice-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.order-dice-spacer {
  color: rgba(148, 163, 184, 0.4);
  font-size: 0.82rem;
  font-weight: 700;
  user-select: none;
  line-height: 1;
}

/* 3D Realistic Die Component (Optimized GPU) with Custom Player Skin Support */
.order-3d-die.has-cube-3d,
.order-3d-die.has-cube-3d[class*="skin-"] {
  --cube-sz: 42px;
  --cube-half: 21px;
  width: 42px !important;
  height: 42px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  contain: none !important;
  perspective: 700px;
  transform-style: preserve-3d;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-3d-die .die-cube {
  width: var(--cube-sz, 42px);
  height: var(--cube-sz, 42px);
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
}

.order-3d-die .die-face {
  width: var(--cube-sz, 42px);
  height: var(--cube-sz, 42px);
  border-radius: 9px !important;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  padding: 13% !important;
  place-items: center !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.65), inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.order-3d-die .die-face-1 { transform: rotateY(0deg) translateZ(var(--cube-half, 21px)); }
.order-3d-die .die-face-6 { transform: rotateY(180deg) translateZ(var(--cube-half, 21px)); }
.order-3d-die .die-face-3 { transform: rotateY(90deg) translateZ(var(--cube-half, 21px)); }
.order-3d-die .die-face-4 { transform: rotateY(-90deg) translateZ(var(--cube-half, 21px)); }
.order-3d-die .die-face-5 { transform: rotateX(90deg) translateZ(var(--cube-half, 21px)); }
.order-3d-die .die-face-2 { transform: rotateX(-90deg) translateZ(var(--cube-half, 21px)); }

/* Flat 2D Die Override for Initial Turn Order Roll */
.order-3d-die.order-2d-die,
.order-3d-die.order-2d-die[class*="skin-"] {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  perspective: none !important;
  transform-style: flat !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.order-3d-die.order-2d-die .order-2d-face {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  border-radius: inherit !important;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
}

.order-3d-die.order-2d-die.is-waiting-2d {
  opacity: 0.72 !important;
}

.order-3d-die.order-2d-die.is-rolling-2d {
  animation: order2dSpinPulse 0.45s ease-in-out infinite !important;
}

.order-2d-placeholder {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  opacity: 0.85 !important;
  user-select: none !important;
}

@keyframes order2dSpinPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(8deg); }
}

.order-3d-die .die-shadow-3d {
  position: absolute;
  width: 36px;
  height: 12px;
  left: 3px;
  bottom: -7px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 55%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.order-3d-die.is-landed {
  animation: dieBounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

@keyframes dieBounceIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.order-3d-die.is-waiting {
  opacity: 0.95;
}

.order-3d-die.is-waiting .die-cube.is-waiting-cube-1,
.order-3d-die.is-waiting .die-cube.is-waiting-cube {
  animation: dieAestheticFloat1 3.4s ease-in-out infinite alternate !important;
  will-change: transform;
}

.order-3d-die.is-waiting .die-cube.is-waiting-cube-2 {
  animation: dieAestheticFloat2 3.8s ease-in-out infinite alternate 0.35s !important;
  will-change: transform;
}

@keyframes dieAestheticFloat1 {
  0% {
    transform: translateY(0) rotateX(22deg) rotateY(-26deg) rotateZ(2deg);
  }
  100% {
    transform: translateY(-5px) rotateX(26deg) rotateY(-20deg) rotateZ(5deg);
  }
}

@keyframes dieAestheticFloat2 {
  0% {
    transform: translateY(-1px) rotateX(18deg) rotateY(30deg) rotateZ(-2deg);
  }
  100% {
    transform: translateY(-6px) rotateX(22deg) rotateY(36deg) rotateZ(-4deg);
  }
}

/* Retained keyframe for backwards compatibility */
@keyframes dieWaitingFloat {
  0% {
    transform: translateY(0) rotateX(22deg) rotateY(-26deg) rotateZ(2deg);
  }
  100% {
    transform: translateY(-5px) rotateX(26deg) rotateY(-20deg) rotateZ(5deg);
  }
}

.order-3d-die.is-waiting .die-shadow-3d {
  animation: dieAestheticShadow 3.4s ease-in-out infinite alternate !important;
}

@keyframes dieAestheticShadow {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.72);
    opacity: 0.3;
  }
}

.order-3d-die.is-waiting .die-face {
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.45), inset 0 0 10px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.die-val-waiting {
  font-size: 1.1rem;
  font-weight: 800;
  color: #64748b;
}

.order-3d-die.is-rolling {
  animation: kmkzDiceTumbleDie1 0.42s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, box-shadow;
}

.order-3d-die.is-rolling:nth-of-type(2) {
  animation: kmkzDiceTumbleDie2 0.46s infinite cubic-bezier(0.35, 0, 0.25, 1) !important;
}

.die-val-rolling {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Die Pip Grid Layout */
.order-3d-die .die-inner {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 6px;
  box-sizing: border-box;
}

.order-3d-die .die-pip {
  position: absolute;
  width: 7px;
  height: 7px;
  background: currentColor !important;
  box-shadow: 0 0 3px currentColor;
  border-radius: 50%;
}

/* ==========================================================================
   INDIVIDUAL PLAYER EQUIPPED DICE SKINS FOR INITIAL ROLL (.order-3d-die)
   ========================================================================== */
.order-3d-die.skin-dice_default,
.order-3d-die.skin-default {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.order-3d-die.skin-dice_default .die-pip,
.order-3d-die.skin-default .die-pip {
  background: #0f172a !important;
  box-shadow: none !important;
}

.order-3d-die.skin-dice_default .die-pip.pip-center,
.order-3d-die.skin-default .die-pip.pip-center {
  background: #dc2626 !important;
}

.order-3d-die.skin-dice_ruby,
.order-3d-die.skin-ruby,
.order-3d-die.skin-dice_red,
.order-3d-die.skin-red {
  background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%) !important;
  border: 1.5px solid #fca5a5 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.75), inset 0 1px 0 rgba(254, 202, 202, 0.6) !important;
}

.order-3d-die.skin-dice_sapphire,
.order-3d-die.skin-sapphire,
.order-3d-die.skin-dice_blue,
.order-3d-die.skin-blue {
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  border: 1.5px solid #7dd3fc !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.75), inset 0 1px 0 rgba(186, 230, 253, 0.7) !important;
}

.order-3d-die.skin-dice_emerald,
.order-3d-die.skin-emerald,
.order-3d-die.skin-dice_green,
.order-3d-die.skin-green {
  background: linear-gradient(145deg, #10b981 0%, #047857 50%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.75), inset 0 1px 0 rgba(167, 243, 208, 0.7) !important;
}

.order-3d-die.skin-dice_amber,
.order-3d-die.skin-amber,
.order-3d-die.skin-dice_orange,
.order-3d-die.skin-orange {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.75), inset 0 1px 0 rgba(254, 215, 170, 0.7) !important;
}

.order-3d-die.skin-dice_amethyst,
.order-3d-die.skin-amethyst,
.order-3d-die.skin-dice_purple,
.order-3d-die.skin-purple {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 50%, #4c1d95 100%) !important;
  border: 1.5px solid #c4b5fd !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.75), inset 0 1px 0 rgba(221, 214, 254, 0.7) !important;
}

.order-3d-die.skin-dice_topaz,
.order-3d-die.skin-topaz,
.order-3d-die.skin-dice_yellow,
.order-3d-die.skin-yellow {
  background: linear-gradient(145deg, #eab308 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.75), inset 0 1px 0 rgba(254, 240, 138, 0.8) !important;
}

.order-3d-die.skin-dice_sakura,
.order-3d-die.skin-sakura,
.order-3d-die.skin-dice_pink,
.order-3d-die.skin-pink {
  background: linear-gradient(145deg, #ec4899 0%, #be185d 50%, #831843 100%) !important;
  border: 1.5px solid #fbcfe8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.75), inset 0 1px 0 rgba(251, 207, 232, 0.7) !important;
}

.order-3d-die.skin-dice_obsidian,
.order-3d-die.skin-obsidian,
.order-3d-die.skin-dice_black,
.order-3d-die.skin-black {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #64748b !important;
  color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(148, 163, 184, 0.5) !important;
}

.order-3d-die.skin-dice_cyan,
.order-3d-die.skin-cyan,
.order-3d-die.skin-dice_ice,
.order-3d-die.skin-ice {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 1.5px solid #bae6fd !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8), inset 0 1px 0 rgba(224, 242, 254, 0.8) !important;
}

.order-3d-die.skin-dice_diamond,
.order-3d-die.skin-diamond {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 30%, #fdf4ff 60%, #e2e8f0 100%) !important;
  border: 1.8px solid #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

.order-3d-die.skin-dice_gold,
.order-3d-die.skin-gold {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 50%, #b45309 100%) !important;
  border: 1.8px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.9) !important;
}

.order-3d-die.skin-dice_rainbow,
.order-3d-die.skin-rainbow {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6, #ec4899, #ef4444) !important;
  background-size: 300% 300% !important;
  border: 1.8px solid #ffffff !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  animation: rainbowDiceShift 3.5s ease infinite !important;
}

.order-3d-die.skin-dice_fire,
.order-3d-die.skin-fire {
  background: linear-gradient(145deg, #f97316 0%, #c2410c 100%) !important;
  border: 1.5px solid #fed7aa !important;
  color: #fff7ed !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.85), inset 0 1px 0 rgba(253, 230, 138, 0.7) !important;
}

.order-3d-die.skin-dice_neon,
.order-3d-die.skin-neon {
  background: linear-gradient(145deg, #06b6d4 0%, #4f46e5 100%) !important;
  border: 1.5px solid #67e8f9 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.85), inset 0 1px 0 rgba(165, 243, 252, 0.8) !important;
}

.order-3d-die.skin-dice_cosmic,
.order-3d-die.skin-cosmic {
  background: linear-gradient(145deg, #a855f7 0%, #3b0764 100%) !important;
  border: 1.5px solid #e9d5ff !important;
  color: #faf5ff !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.85), inset 0 1px 0 rgba(233, 213, 255, 0.8) !important;
}

.order-3d-die.skin-dice_bicolor_fire_ice,
.order-3d-die.skin-bicolor_fire_ice {
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
}
.order-3d-die.skin-dice_bicolor_fire_ice:first-of-type,
.order-3d-die.skin-bicolor_fire_ice:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_fire_ice,
.order-3d-die.die-1.skin-bicolor_fire_ice {
  background: linear-gradient(145deg, #fbbf24 0%, #f97316 45%, #dc2626 100%) !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.7) !important;
}
.order-3d-die.skin-dice_bicolor_fire_ice:last-of-type,
.order-3d-die.skin-bicolor_fire_ice:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_fire_ice,
.order-3d-die.die-2.skin-bicolor_fire_ice {
  background: linear-gradient(145deg, #7dd3fc 0%, #0284c7 45%, #0c4a6e 100%) !important;
  border: 1.5px solid #bae6fd !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.85), inset 0 1px 0 rgba(186, 230, 253, 0.7) !important;
}

.order-3d-die.skin-dice_bicolor_black_gold,
.order-3d-die.skin-bicolor_black_gold {
  border: 1.5px solid #fbbf24 !important;
  color: #ffd700 !important;
}
.order-3d-die.skin-dice_bicolor_black_gold:first-of-type,
.order-3d-die.skin-bicolor_black_gold:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_black_gold,
.order-3d-die.die-1.skin-bicolor_black_gold {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffd700 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55), inset 0 0 8px rgba(0, 0, 0, 0.9) !important;
}
.order-3d-die.skin-dice_bicolor_black_gold:last-of-type,
.order-3d-die.skin-bicolor_black_gold:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_black_gold,
.order-3d-die.die-2.skin-bicolor_black_gold {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.order-3d-die.skin-dice_bicolor_cyber_neon,
.order-3d-die.skin-bicolor_cyber_neon {
  border: 1.5px solid #00f3ff !important;
  color: #ffffff !important;
}
.order-3d-die.skin-dice_bicolor_cyber_neon:first-of-type,
.order-3d-die.skin-bicolor_cyber_neon:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_cyber_neon,
.order-3d-die.die-1.skin-bicolor_cyber_neon {
  background: linear-gradient(145deg, #00f3ff 0%, #0891b2 50%, #083344 100%) !important;
  border: 1.5px solid #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.9), inset 0 0 8px rgba(0, 243, 255, 0.5) !important;
}
.order-3d-die.skin-dice_bicolor_cyber_neon:last-of-type,
.order-3d-die.skin-bicolor_cyber_neon:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_cyber_neon,
.order-3d-die.die-2.skin-bicolor_cyber_neon {
  background: linear-gradient(145deg, #f472b6 0%, #ec4899 45%, #831843 100%) !important;
  border: 1.5px solid #f472b6 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.9), inset 0 0 8px rgba(236, 72, 153, 0.5) !important;
}

.order-3d-die.skin-dice_bicolor_emerald_gold,
.order-3d-die.skin-bicolor_emerald_gold {
  border: 1.5px solid #6ee7b7 !important;
  color: #ffffff !important;
}
.order-3d-die.skin-dice_bicolor_emerald_gold:first-of-type,
.order-3d-die.skin-bicolor_emerald_gold:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_emerald_gold,
.order-3d-die.die-1.skin-bicolor_emerald_gold {
  background: linear-gradient(145deg, #34d399 0%, #10b981 45%, #064e3b 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  color: #fef08a !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.85), inset 0 1px 0 rgba(167, 243, 208, 0.7) !important;
}
.order-3d-die.skin-dice_bicolor_emerald_gold:last-of-type,
.order-3d-die.skin-bicolor_emerald_gold:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_emerald_gold,
.order-3d-die.die-2.skin-bicolor_emerald_gold {
  background: linear-gradient(145deg, #fef08a 0%, #eab308 50%, #854d0e 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #064e3b !important;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.85), inset 0 1px 0 rgba(254, 240, 138, 0.7) !important;
}

.order-3d-die.skin-dice_bicolor_twilight,
.order-3d-die.skin-bicolor_twilight {
  border: 1.5px solid #c084fc !important;
  color: #ffffff !important;
}
.order-3d-die.skin-dice_bicolor_twilight:first-of-type,
.order-3d-die.skin-bicolor_twilight:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_twilight,
.order-3d-die.die-1.skin-bicolor_twilight {
  background: linear-gradient(145deg, #c084fc 0%, #7c3aed 50%, #3b0764 100%) !important;
  border: 1.5px solid #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.85), inset 0 1px 0 rgba(233, 213, 255, 0.7) !important;
}
.order-3d-die.skin-dice_bicolor_twilight:last-of-type,
.order-3d-die.skin-bicolor_twilight:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_twilight,
.order-3d-die.die-2.skin-bicolor_twilight {
  background: linear-gradient(145deg, #fbbf24 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.85), inset 0 1px 0 rgba(254, 215, 170, 0.7) !important;
}

.order-3d-die.skin-dice_bicolor_yinyang,
.order-3d-die.skin-bicolor_yinyang {
  border: 1.5px solid #94a3b8 !important;
  color: #ffffff !important;
}
.order-3d-die.skin-dice_bicolor_yinyang:first-of-type,
.order-3d-die.skin-bicolor_yinyang:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_yinyang,
.order-3d-die.die-1.skin-bicolor_yinyang {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%) !important;
  border: 1.5px solid #94a3b8 !important;
  color: #020617 !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}
.order-3d-die.skin-dice_bicolor_yinyang:last-of-type,
.order-3d-die.skin-bicolor_yinyang:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_yinyang,
.order-3d-die.die-2.skin-bicolor_yinyang {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
  border: 1.5px solid #64748b !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.order-3d-die.skin-dice_bicolor_blood_void,
.order-3d-die.skin-bicolor_blood_void {
  border: 1.5px solid #f87171 !important;
  color: #fca5a5 !important;
}
.order-3d-die.skin-dice_bicolor_blood_void:first-of-type,
.order-3d-die.skin-bicolor_blood_void:first-of-type,
.order-3d-die.die-1.skin-dice_bicolor_blood_void,
.order-3d-die.die-1.skin-bicolor_blood_void {
  background: linear-gradient(145deg, #f87171 0%, #dc2626 45%, #7f1d1d 100%) !important;
  border: 1.5px solid #f87171 !important;
  color: #fee2e2 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85), inset 0 1px 0 rgba(254, 202, 202, 0.7) !important;
}
.order-3d-die.skin-dice_bicolor_blood_void:last-of-type,
.order-3d-die.skin-bicolor_blood_void:last-of-type,
.order-3d-die.die-2.skin-dice_bicolor_blood_void,
.order-3d-die.die-2.skin-bicolor_blood_void {
  background: linear-gradient(145deg, #090d16 0%, #020617 60%, #000000 100%) !important;
  border: 1.5px solid #6366f1 !important;
  color: #c7d2fe !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.95) !important;
}

/* ==========================================================================
   EXPANDED CATALOG DICE SKINS (3D Cubes & Order Roll)
   ========================================================================== */

/* Wood Basic - Roble Tallado */
.skin-dice_wood_basic .die-face, .skin-wood_basic .die-face,
.order-3d-die.skin-dice_wood_basic .die-face, .order-3d-die.skin-wood_basic .die-face {
  background: linear-gradient(145deg, #a16207 0%, #713f12 50%, #451a03 100%) !important;
  border: 1.5px solid #ca8a04 !important;
  color: #fef08a !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.3), 0 0 12px rgba(161, 98, 7, 0.6) !important;
}
.order-3d-die.skin-dice_wood_basic, .order-3d-die.skin-wood_basic {
  color: #fef08a !important;
}

/* Slate Grey - Pizarra Gris */
.skin-dice_slate_grey .die-face, .skin-slate_grey .die-face,
.order-3d-die.skin-dice_slate_grey .die-face, .order-3d-die.skin-slate_grey .die-face {
  background: linear-gradient(145deg, #64748b 0%, #334155 50%, #1e293b 100%) !important;
  border: 1.5px solid #94a3b8 !important;
  color: #f8fafc !important;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.25), 0 0 12px rgba(51, 65, 85, 0.6) !important;
}
.order-3d-die.skin-dice_slate_grey, .order-3d-die.skin-slate_grey {
  color: #f8fafc !important;
}

/* Clay Baked - Arcilla Cocida */
.skin-dice_clay_baked .die-face, .skin-clay_baked .die-face,
.order-3d-die.skin-dice_clay_baked .die-face, .order-3d-die.skin-clay_baked .die-face {
  background: linear-gradient(145deg, #ea580c 0%, #c2410c 50%, #7c2d12 100%) !important;
  border: 1.5px solid #fdba74 !important;
  color: #fff7ed !important;
  box-shadow: inset 0 0 8px rgba(253, 186, 116, 0.35), 0 0 12px rgba(234, 88, 12, 0.6) !important;
}
.order-3d-die.skin-dice_clay_baked, .order-3d-die.skin-clay_baked {
  color: #fff7ed !important;
}

/* Bronze Pitted - Bronce Rústico */
.skin-dice_bronze_pitted .die-face, .skin-bronze_pitted .die-face,
.order-3d-die.skin-dice_bronze_pitted .die-face, .order-3d-die.skin-bronze_pitted .die-face {
  background: linear-gradient(145deg, #d97706 0%, #92400e 50%, #78350f 100%) !important;
  border: 1.5px solid #fcd34d !important;
  color: #fef3c7 !important;
  box-shadow: inset 0 0 8px rgba(252, 211, 77, 0.35), 0 0 12px rgba(217, 119, 6, 0.6) !important;
}
.order-3d-die.skin-dice_bronze_pitted, .order-3d-die.skin-bronze_pitted {
  color: #fef3c7 !important;
}

/* Bamboo Grain - Bambú Tratado */
.skin-dice_bamboo_grain .die-face, .skin-bamboo_grain .die-face,
.order-3d-die.skin-dice_bamboo_grain .die-face, .order-3d-die.skin-bamboo_grain .die-face {
  background: linear-gradient(145deg, #84cc16 0%, #4d7c0f 50%, #365314 100%) !important;
  border: 1.5px solid #bef264 !important;
  color: #ecfccb !important;
  box-shadow: inset 0 0 8px rgba(190, 242, 100, 0.35), 0 0 12px rgba(132, 204, 22, 0.6) !important;
}
.order-3d-die.skin-dice_bamboo_grain, .order-3d-die.skin-bamboo_grain {
  color: #ecfccb !important;
}

/* Sandstone Dune - Arenisca Roja */
.skin-dice_sandstone_dune .die-face, .skin-sandstone_dune .die-face,
.order-3d-die.skin-dice_sandstone_dune .die-face, .order-3d-die.skin-sandstone_dune .die-face {
  background: linear-gradient(145deg, #f97316 0%, #c2410c 50%, #9a3412 100%) !important;
  border: 1.5px solid #fed7aa !important;
  color: #fff7ed !important;
  box-shadow: inset 0 0 8px rgba(254, 215, 170, 0.35), 0 0 12px rgba(249, 115, 22, 0.6) !important;
}
.order-3d-die.skin-dice_sandstone_dune, .order-3d-die.skin-sandstone_dune {
  color: #fff7ed !important;
}

/* Iron Spiked - Hierro Forjado */
.skin-dice_iron_spiked .die-face, .skin-iron_spiked .die-face,
.order-3d-die.skin-dice_iron_spiked .die-face, .order-3d-die.skin-iron_spiked .die-face {
  background: linear-gradient(145deg, #475569 0%, #1e293b 50%, #0f172a 100%) !important;
  border: 1.5px solid #94a3b8 !important;
  color: #38bdf8 !important;
  box-shadow: inset 0 0 8px rgba(148, 163, 184, 0.35), 0 0 14px rgba(56, 189, 248, 0.45) !important;
}
.order-3d-die.skin-dice_iron_spiked, .order-3d-die.skin-iron_spiked {
  color: #38bdf8 !important;
}

/* Copper Patina - Cobre Verdigris */
.skin-dice_copper_patina .die-face, .skin-copper_patina .die-face,
.order-3d-die.skin-dice_copper_patina .die-face, .order-3d-die.skin-copper_patina .die-face {
  background: linear-gradient(145deg, #14b8a6 0%, #0f766e 50%, #115e59 100%) !important;
  border: 1.5px solid #5eead4 !important;
  color: #ccfbf1 !important;
  box-shadow: inset 0 0 8px rgba(94, 234, 212, 0.4), 0 0 14px rgba(20, 184, 166, 0.6) !important;
}
.order-3d-die.skin-dice_copper_patina, .order-3d-die.skin-copper_patina {
  color: #ccfbf1 !important;
}

/* Bone Carved - Hueso Arcano */
.skin-dice_bone_carved .die-face, .skin-bone_carved .die-face,
.order-3d-die.skin-dice_bone_carved .die-face, .order-3d-die.skin-bone_carved .die-face {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 50%, #e2e8f0 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #7c3aed !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.4), 0 0 14px rgba(124, 58, 237, 0.45) !important;
}
.order-3d-die.skin-dice_bone_carved, .order-3d-die.skin-bone_carved {
  color: #7c3aed !important;
}

/* Glass Frost - Cristal Escarchado */
.skin-dice_glass_frost .die-face, .skin-glass_frost .die-face,
.order-3d-die.skin-dice_glass_frost .die-face, .order-3d-die.skin-glass_frost .die-face {
  background: linear-gradient(145deg, rgba(224, 242, 254, 0.9) 0%, rgba(125, 211, 252, 0.8) 50%, rgba(14, 165, 233, 0.75) 100%) !important;
  border: 1.5px solid #ffffff !important;
  color: #0369a1 !important;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.7), 0 0 16px rgba(56, 189, 248, 0.7) !important;
}
.order-3d-die.skin-dice_glass_frost, .order-3d-die.skin-glass_frost {
  color: #0369a1 !important;
}

/* Marble Carrara - Mármol Blanco */
.skin-dice_marble_carrara .die-face, .skin-marble_carrara .die-face,
.order-3d-die.skin-dice_marble_carrara .die-face, .order-3d-die.skin-marble_carrara .die-face {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%) !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1), inset 0 1px 1px #ffffff, 0 1px 4px rgba(0, 0, 0, 0.25) !important;
}
.order-3d-die.skin-dice_marble_carrara, .order-3d-die.skin-marble_carrara {
  color: #0f172a !important;
}

/* Brass Steam - Latón Steampunk */
.skin-dice_brass_steam .die-face, .skin-brass_steam .die-face,
.order-3d-die.skin-dice_brass_steam .die-face, .order-3d-die.skin-brass_steam .die-face {
  background: linear-gradient(145deg, #facc15 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 1.5px solid #fef08a !important;
  color: #451a03 !important;
  box-shadow: inset 0 0 8px rgba(254, 240, 138, 0.4), 0 0 14px rgba(202, 138, 4, 0.7) !important;
}
.order-3d-die.skin-dice_brass_steam, .order-3d-die.skin-brass_steam {
  color: #451a03 !important;
}

/* Sapphire Glow - Zafiro Espectral */
.skin-dice_sapphire_glow .die-face, .skin-sapphire_glow .die-face,
.order-3d-die.skin-dice_sapphire_glow .die-face, .order-3d-die.skin-sapphire_glow .die-face {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 45%, #1e1b4b 100%) !important;
  border: 1.8px solid #bae6fd !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 10px rgba(186, 230, 253, 0.6), 0 0 20px rgba(56, 189, 248, 0.85) !important;
}
.order-3d-die.skin-dice_sapphire_glow, .order-3d-die.skin-sapphire_glow {
  color: #ffffff !important;
}

/* Amethyst Shadow - Amatista Sombría */
.skin-dice_amethyst_shadow .die-face, .skin-amethyst_shadow .die-face,
.order-3d-die.skin-dice_amethyst_shadow .die-face, .order-3d-die.skin-amethyst_shadow .die-face {
  background: linear-gradient(145deg, #a855f7 0%, #6b21a8 50%, #2e1065 100%) !important;
  border: 1.8px solid #e9d5ff !important;
  color: #faf5ff !important;
  box-shadow: inset 0 0 10px rgba(233, 213, 255, 0.5), 0 0 20px rgba(168, 85, 247, 0.85) !important;
}
.order-3d-die.skin-dice_amethyst_shadow, .order-3d-die.skin-amethyst_shadow {
  color: #faf5ff !important;
}

/* Obsidian Magma - Obsidiana Ígnea */
.skin-dice_obsidian_magma .die-face, .skin-obsidian_magma .die-face,
.order-3d-die.skin-dice_obsidian_magma .die-face, .order-3d-die.skin-obsidian_magma .die-face {
  background: linear-gradient(145deg, #1e1b4b 0%, #0f172a 45%, #020617 100%) !important;
  border: 1.8px solid #f97316 !important;
  color: #fb923c !important;
  box-shadow: inset 0 0 10px rgba(249, 115, 22, 0.5), 0 0 20px rgba(234, 88, 12, 0.85) !important;
}
.order-3d-die.skin-dice_obsidian_magma, .order-3d-die.skin-obsidian_magma {
  color: #fb923c !important;
}

/* Emerald Matrix - Esmeralda Cuántica */
.skin-dice_emerald_matrix .die-face, .skin-emerald_matrix .die-face,
.order-3d-die.skin-dice_emerald_matrix .die-face, .order-3d-die.skin-emerald_matrix .die-face {
  background: linear-gradient(145deg, #34d399 0%, #059669 50%, #022c22 100%) !important;
  border: 1.8px solid #6ee7b7 !important;
  color: #ecfdf5 !important;
  box-shadow: inset 0 0 10px rgba(110, 231, 183, 0.6), 0 0 20px rgba(16, 185, 129, 0.85) !important;
}
.order-3d-die.skin-dice_emerald_matrix, .order-3d-die.skin-emerald_matrix {
  color: #ecfdf5 !important;
}

/* Ruby Blood - Rubí Carmesí */
.skin-dice_ruby_blood .die-face, .skin-ruby_blood .die-face,
.order-3d-die.skin-dice_ruby_blood .die-face, .order-3d-die.skin-ruby_blood .die-face {
  background: linear-gradient(145deg, #f43f5e 0%, #be123c 50%, #4c0519 100%) !important;
  border: 1.8px solid #fecdd3 !important;
  color: #fff1f2 !important;
  box-shadow: inset 0 0 10px rgba(254, 205, 211, 0.6), 0 0 20px rgba(244, 63, 94, 0.85) !important;
}
.order-3d-die.skin-dice_ruby_blood, .order-3d-die.skin-ruby_blood {
  color: #fff1f2 !important;
}

/* Gold 24K - Oro Puro 24K */
.skin-dice_gold_24k .die-face, .skin-gold_24k .die-face,
.order-3d-die.skin-dice_gold_24k .die-face, .order-3d-die.skin-gold_24k .die-face {
  background: linear-gradient(145deg, #fef08a 0%, #fbbf24 45%, #b45309 100%) !important;
  border: 2px solid #ffffff !important;
  color: #451a03 !important;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.8), 0 0 22px rgba(251, 191, 36, 0.9) !important;
}
.order-3d-die.skin-dice_gold_24k, .order-3d-die.skin-gold_24k {
  color: #451a03 !important;
}

/* Cosmic Nebula - Nebulosa Cósmica */
.skin-dice_cosmic_nebula .die-face, .skin-cosmic_nebula .die-face,
.order-3d-die.skin-dice_cosmic_nebula .die-face, .order-3d-die.skin-cosmic_nebula .die-face {
  background: linear-gradient(145deg, #c084fc 0%, #7c3aed 45%, #1e1b4b 100%) !important;
  border: 2px solid #e9d5ff !important;
  color: #38bdf8 !important;
  box-shadow: inset 0 0 12px rgba(233, 213, 255, 0.7), 0 0 22px rgba(124, 58, 237, 0.9) !important;
}
.order-3d-die.skin-dice_cosmic_nebula, .order-3d-die.skin-cosmic_nebula {
  color: #38bdf8 !important;
}

/* Hologram Cyber - Holográfico Cyber-Grid */
.skin-dice_hologram_cyber .die-face, .skin-hologram_cyber .die-face,
.order-3d-die.skin-dice_hologram_cyber .die-face, .order-3d-die.skin-hologram_cyber .die-face {
  background: linear-gradient(145deg, #22d3ee 0%, #0891b2 50%, #164e63 100%) !important;
  border: 2px solid #a5f3fc !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 12px rgba(165, 243, 252, 0.8), 0 0 22px rgba(34, 211, 238, 0.9) !important;
}
.order-3d-die.skin-dice_hologram_cyber, .order-3d-die.skin-hologram_cyber {
  color: #ffffff !important;
}

/* Plasma Supernova - Supernova Primigenia */
.skin-dice_plasma_supernova .die-face, .skin-plasma_supernova .die-face,
.order-3d-die.skin-dice_plasma_supernova .die-face, .order-3d-die.skin-plasma_supernova .die-face {
  background: linear-gradient(145deg, #fb7185 0%, #e11d48 45%, #881337 100%) !important;
  border: 2px solid #fecdd3 !important;
  color: #fef08a !important;
  box-shadow: inset 0 0 12px rgba(254, 205, 211, 0.8), 0 0 24px rgba(244, 63, 94, 0.95) !important;
}
.order-3d-die.skin-dice_plasma_supernova, .order-3d-die.skin-plasma_supernova {
  color: #fef08a !important;
}

/* Chronos Infinite - Cronos Infinito */
.skin-dice_chronos_infinite .die-face, .skin-chronos_infinite .die-face,
.order-3d-die.skin-dice_chronos_infinite .die-face, .order-3d-die.skin-chronos_infinite .die-face {
  background: linear-gradient(145deg, #818cf8 0%, #4f46e5 45%, #312e81 100%) !important;
  border: 2px solid #c7d2fe !important;
  color: #fef08a !important;
  box-shadow: inset 0 0 12px rgba(199, 210, 254, 0.8), 0 0 24px rgba(99, 102, 241, 0.95) !important;
}
.order-3d-die.skin-dice_chronos_infinite, .order-3d-die.skin-chronos_infinite {
  color: #fef08a !important;
}

/* Ensure 3D Cube Container has zero flat background/border/shadow from any skin */
.order-3d-die.has-cube-3d,
.order-3d-die.has-cube-3d[class*="skin-"],
.order-3d-die.has-cube-3d.skin-dice_amber,
.order-3d-die.has-cube-3d.skin-amber,
.order-3d-die.has-cube-3d.skin-dice_orange,
.order-3d-die.has-cube-3d.skin-orange {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 3D Cube & 2D Flat Pips for Roll Order Die (Strict CSS Grid alignment) */
.order-3d-die.has-cube-3d .die-face .die-pip,
.order-3d-die.order-2d-die .die-face .die-pip {
  position: relative !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: auto !important;
  width: clamp(5.5px, 20%, 9.5px) !important;
  height: clamp(5.5px, 20%, 9.5px) !important;
}

.order-3d-die.has-cube-3d .die-pip.pip-top-left,
.order-3d-die.order-2d-die .die-pip.pip-top-left { grid-area: 1 / 1 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-top-right,
.order-3d-die.order-2d-die .die-pip.pip-top-right { grid-area: 1 / 3 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-mid-left,
.order-3d-die.order-2d-die .die-pip.pip-mid-left { grid-area: 2 / 1 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-center,
.order-3d-die.order-2d-die .die-pip.pip-center { grid-area: 2 / 2 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-mid-right,
.order-3d-die.order-2d-die .die-pip.pip-mid-right { grid-area: 2 / 3 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-bottom-left,
.order-3d-die.order-2d-die .die-pip.pip-bottom-left { grid-area: 3 / 1 !important; }
.order-3d-die.has-cube-3d .die-pip.pip-bottom-right,
.order-3d-die.order-2d-die .die-pip.pip-bottom-right { grid-area: 3 / 3 !important; }

/* Pip Positions for Roll Order Die (Legacy non-3D fallback) */
.order-3d-die:not(.has-cube-3d) .die-pip.pip-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-top-left {
  top: 6px;
  left: 6px;
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-top-right {
  top: 6px;
  right: 6px;
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-mid-left {
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-mid-right {
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-bottom-left {
  bottom: 6px;
  left: 6px;
}

.order-3d-die:not(.has-cube-3d) .die-pip.pip-bottom-right {
  bottom: 6px;
  right: 6px;
}

/* Ensure 3D cube containers remain completely transparent regardless of cosmetic skin */
.order-3d-die.has-cube-3d,
.order-3d-die.has-cube-3d[class*="skin-"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Score Pill - Clean & Modern Aesthetic */
.order-card-footer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.order-player-score-pill {
  width: 100%;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.order-player-score-pill.is-rolled {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.order-player-score-pill .score-breakdown {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
}

.order-player-score-pill .score-equal {
  color: #64748b;
  font-size: 0.72rem;
}

.order-player-score-pill .score-total,
.order-player-score-pill strong {
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 900;
}

.order-player-score-pill.is-champion {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22) 0%, rgba(217, 119, 6, 0.3) 100%) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35) !important;
}

.order-player-score-pill.is-champion .score-total,
.order-player-score-pill.is-champion strong {
  color: #fde68a !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.order-player-score-pill.is-rolling-badge {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.order-player-score-pill.is-pending {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.order-player-score-pill.is-inactive {
  background: transparent;
  border-color: transparent;
  color: #64748b;
  font-size: 0.7rem;
}

.score-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.score-status-dot.is-pulsing {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: scoreDotPulse 1.2s infinite ease-in-out;
}

@keyframes scoreDotPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

.score-status-dot.is-waiting {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  opacity: 0.8;
}

/* Winner Announcement Banner */
.order-winner-announcement-banner {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1.5px solid #fbbf24;
  border-radius: 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  animation: slideUpBanner 0.3s ease-out;
}

@keyframes slideUpBanner {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.winner-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.winner-trophy-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 6px #fbbf24);
}

/* Action Button */
.dice-roll-order-actions {
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.btn-roll-order {
  width: 100%;
  padding: 13px 22px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(254, 240, 138, 0.4);
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-roll-order-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.btn-roll-order::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: btnSweep 3s infinite ease-in-out;
}

@keyframes btnSweep {
  0% {
    left: -100%;
  }

  40%,
  100% {
    left: 200%;
  }
}

.btn-roll-order:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #ea580c 100%);
}

.btn-roll-order:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-roll-order:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #94a3b8;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Mobile Responsive: panel inferior ── */
@media (max-width: 640px) {
  .dice-roll-order-overlay {
    padding: 0 8px 10px;
  }

  .dice-roll-order-card {
    padding: 0 0 8px;
    border-radius: 18px;
    max-height: min(560px, 90vh);
    max-width: calc(100vw - 14px);
  }

  .dice-roll-order-header {
    margin-bottom: 4px;
    margin-top: 4px;
    padding: 0 10px;
  }

  .dice-roll-order-icon-badge {
    margin-bottom: 2px;
  }

  .dice-order-crest-svg {
    width: 32px;
    height: 32px;
  }

  .dice-order-header-aura {
    inset: -6px;
  }

  .dice-roll-order-icon {
    font-size: 1.3rem;
    margin-bottom: 0;
  }

  .dice-roll-order-icon svg {
    width: 22px;
    height: 22px;
  }

  .dice-roll-order-title {
    font-size: 1.05rem;
    margin: 0 0 2px 0;
  }

  .dice-roll-order-subtitle {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .dice-roll-order-players {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 8px;
    padding: 2px 6px;
    max-height: none;
  }

  .order-player-card {
    padding: 6px 5px;
    gap: 4px;
    border-radius: 14px;
  }

  .order-card-header {
    width: 100%;
    gap: 6px;
  }

  .order-player-name {
    font-size: 0.74rem;
  }

  .order-player-avatar {
    width: 28px;
    height: 28px;
  }

  .order-player-badges {
    gap: 3px;
  }

  .order-me-pill,
  .order-crown-pill {
    padding: 1px 4px;
    font-size: 0.58rem;
  }

  .order-card-dice-stage {
    padding: 2px 0;
  }

  .order-3d-die.has-cube-3d {
    --cube-sz: 30px !important;
    --cube-half: 15px !important;
    width: 30px !important;
    height: 30px !important;
  }

  .order-3d-die.has-cube-3d .die-cube {
    width: 30px !important;
    height: 30px !important;
  }

  .order-3d-die.has-cube-3d .die-face {
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
  }

  .order-3d-die.has-cube-3d .die-face-1 { transform: rotateY(0deg) translateZ(15px) !important; }
  .order-3d-die.has-cube-3d .die-face-6 { transform: rotateY(180deg) translateZ(15px) !important; }
  .order-3d-die.has-cube-3d .die-face-3 { transform: rotateY(90deg) translateZ(15px) !important; }
  .order-3d-die.has-cube-3d .die-face-4 { transform: rotateY(-90deg) translateZ(15px) !important; }
  .order-3d-die.has-cube-3d .die-face-5 { transform: rotateX(90deg) translateZ(15px) !important; }
  .order-3d-die.has-cube-3d .die-face-2 { transform: rotateX(-90deg) translateZ(15px) !important; }

  .order-3d-die.has-cube-3d .die-shadow-3d {
    width: 26px !important;
    height: 8px !important;
    bottom: -5px !important;
  }

  .order-3d-die:not(.has-cube-3d) {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .order-3d-die:not(.has-cube-3d) .die-pip {
    width: 5px;
    height: 5px;
  }

  .order-3d-die:not(.has-cube-3d) .die-pip.pip-center {
    width: 6px;
    height: 6px;
  }

  .order-dice-spacer {
    width: 10px;
    height: 10px;
    font-size: 0.65rem;
  }

  .order-player-score-pill {
    padding: 3px 5px;
    font-size: 0.70rem;
    gap: 4px;
    white-space: nowrap;
    border-radius: 8px;
  }

  .order-player-score-pill strong {
    font-size: 0.82rem;
  }

  .dice-roll-order-actions {
    margin-top: 2px;
    padding: 0 6px;
  }

  .order-winner-announcement-banner {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .winner-banner-content {
    gap: 8px;
  }

  .winner-trophy-icon {
    font-size: 1.3rem;
  }

  .winner-banner-texts strong,
  .winner-banner-title {
    font-size: 0.88rem !important;
  }

  .winner-banner-texts div,
  .winner-banner-sub {
    font-size: 0.70rem !important;
  }

  .btn-roll-order {
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: 14px;
  }

  .dice-roll-order-minibar {
    display: none !important;
  }
}

/* ── Landscape mobile: pantalla baja (≤480px) ── */
@media (max-height: 480px) {
  .dice-roll-order-overlay {
    padding: 0 6px 6px;
  }

  .dice-roll-order-card {
    max-height: calc(100vh - 8px);
    max-width: min(96vw, 760px);
    padding: 0 0 4px;
    border-radius: 12px;
  }

  .dice-roll-order-window-bar {
    padding: 3px 10px;
  }

  .dice-roll-order-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0;
    padding: 0 8px;
  }

  .dice-roll-order-icon-badge,
  .dice-roll-order-icon {
    display: none;
  }

  .dice-roll-order-title {
    font-size: 0.85rem;
    margin: 0;
  }

  .dice-roll-order-subtitle {
    font-size: 0.70rem;
    margin: 0;
  }

  .dice-roll-order-players {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px;
    margin-bottom: 4px;
    padding: 2px 4px;
    max-height: none;
  }

  .order-player-card {
    padding: 4px 3px;
    gap: 2px;
    border-radius: 8px;
  }

  .order-card-dice-stage {
    padding: 1px 0;
  }

  .order-3d-die {
    width: 22px;
    height: 22px;
    border-radius: 5px;
  }

  .order-3d-die .die-pip {
    width: 4px;
    height: 4px;
  }

  .order-player-score-pill {
    padding: 2px 4px;
    font-size: 0.7rem;
    gap: 3px;
  }

  .dice-roll-order-actions {
    margin-top: 1px;
    padding: 0 4px;
  }

  .btn-roll-order {
    padding: 5px 10px;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .order-winner-announcement-banner {
    padding: 4px 8px;
    border-radius: 8px;
  }

  .winner-banner-texts strong,
  .winner-banner-title {
    font-size: 0.78rem !important;
  }

  .winner-banner-texts div,
  .winner-banner-sub {
    font-size: 0.7rem !important;
  }
}

/* ── Extra pequeño: ≤380px ── */
@media (max-width: 380px) {
  .dice-roll-order-card {
    max-height: min(520px, 92vh);
  }

  .dice-roll-order-players {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 1px 3px;
  }

  .order-player-card {
    padding: 5px 3px;
  }

  .order-player-name {
    font-size: 0.7rem;
  }

  .order-3d-die.has-cube-3d {
    --cube-sz: 26px !important;
    --cube-half: 13px !important;
    width: 26px !important;
    height: 26px !important;
  }

  .order-3d-die.has-cube-3d .die-cube {
    width: 26px !important;
    height: 26px !important;
  }

  .order-3d-die.has-cube-3d .die-face {
    width: 26px !important;
    height: 26px !important;
    border-radius: 5px !important;
  }

  .order-3d-die.has-cube-3d .die-face-1 { transform: rotateY(0deg) translateZ(13px) !important; }
  .order-3d-die.has-cube-3d .die-face-6 { transform: rotateY(180deg) translateZ(13px) !important; }
  .order-3d-die.has-cube-3d .die-face-3 { transform: rotateY(90deg) translateZ(13px) !important; }
  .order-3d-die.has-cube-3d .die-face-4 { transform: rotateY(-90deg) translateZ(13px) !important; }
  .order-3d-die.has-cube-3d .die-face-5 { transform: rotateX(90deg) translateZ(13px) !important; }
  .order-3d-die.has-cube-3d .die-face-2 { transform: rotateX(-90deg) translateZ(13px) !important; }

  .order-3d-die.has-cube-3d .die-shadow-3d {
    width: 22px !important;
    height: 7px !important;
    bottom: -4px !important;
  }

  .order-player-score-pill {
    font-size: 0.7rem;
    padding: 2px 3px;
  }

  .dice-roll-order-title {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   TURN ACTION STRIPE (Franja / Botón Táctil de Acción de Turno)
   ========================================================================== */
.turn-action-stripe {
  position: fixed;
  top: 122px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  width: fit-content !important;
  min-width: 160px !important;
  max-width: min(92vw, 380px) !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 16px !important;
  border-radius: 9999px !important;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem !important;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.25s ease, top 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  touch-action: none;
  box-sizing: border-box !important;
}

.turn-action-stripe.has-custom-pos {
  bottom: auto !important;
  right: auto !important;
}

#game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
  top: 52px;
}

body.has-notch-margin .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
  top: calc(max(32px, env(safe-area-inset-top, 32px)) + 120px);
}

body.has-notch-margin #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
  top: calc(max(32px, env(safe-area-inset-top, 32px)) + 50px);
}

.turn-action-stripe.is-dragging {
  cursor: grabbing !important;
  opacity: 0.94;
  transform: scale(1.03) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(251, 191, 36, 0.3) !important;
  transition: none !important;
  z-index: 8700 !important;
}

.turn-action-stripe.hidden {
  display: none !important;
}

@keyframes stripePulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.8), 0 8px 24px rgba(0, 0, 0, 0.5);
  }

  50% {
    box-shadow: 0 0 30px 10px rgba(56, 189, 248, 0.75), 0 12px 30px rgba(0, 0, 0, 0.6);
  }

  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

.turn-action-stripe.turn-stripe-pulse-highlight {
  animation: stripePulseHighlight 1.2s ease-in-out;
}

.stripe-drag-handle {
  font-size: 0.85rem;
  opacity: 0.5;
  letter-spacing: -2px;
  margin-right: 2px;
  cursor: grab;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
  transition: opacity 0.15s ease;
}

.turn-action-stripe:hover .stripe-drag-handle {
  opacity: 0.9;
}

.stripe-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.stripe-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.stripe-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
  line-height: 1.2;
}

/* Estado: ¡TIRA LOS DADOS! (Verde Pulsante) */
.turn-action-stripe.stripe-roll {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.92), rgba(34, 197, 94, 0.95)) !important;
  border: 1.5px solid #4ade80 !important;
  color: #ffffff !important;
  pointer-events: auto !important;
  animation: stripeGlowPulse 1.5s infinite ease-in-out;
}

.turn-action-stripe.stripe-roll:hover:not(.is-dragging) {
  box-shadow: 0 12px 35px rgba(34, 197, 94, 0.6);
  filter: brightness(1.1);
}

/* Estado: PASAR TURNO (Azul Elegante) */
.turn-action-stripe.stripe-end {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(37, 99, 235, 0.95)) !important;
  border: 1.5px solid #60a5fa !important;
  color: #ffffff !important;
  pointer-events: auto !important;
}

.turn-action-stripe.stripe-end:hover:not(.is-dragging) {
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
  filter: brightness(1.1);
}

/* Estado: SETUP INICIAL (Ámbar / Dorado) */
.turn-action-stripe.stripe-setup {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.92), rgba(245, 158, 11, 0.95)) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffffff !important;
  pointer-events: auto !important;
  animation: stripeGlowPulseGold 1.6s infinite ease-in-out;
}

/* Estado: LADRÓN / ROBO (Rojo Alerta) */
.turn-action-stripe.stripe-robber {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.92), rgba(239, 68, 68, 0.95)) !important;
  border: 1.5px solid #fca5a5 !important;
  color: #ffffff !important;
  pointer-events: auto !important;
  animation: stripeGlowPulseRed 1.3s infinite ease-in-out;
}

/* Estado: DESCARTE POR 7 (Naranja Alerta) */
.turn-action-stripe.stripe-discard {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.92), rgba(249, 115, 22, 0.95)) !important;
  border: 1.5px solid #fdba74 !important;
  color: #ffffff !important;
  pointer-events: auto !important;
  animation: stripeGlowPulseRed 1.3s infinite ease-in-out;
}

/* Estado: ORO / RECOMPENSA (Dorado Brillante) */
.turn-action-stripe.stripe-gold {
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.92), rgba(234, 179, 8, 0.95)) !important;
  border: 1.5px solid #fde047 !important;
  color: #ffffff !important;
  pointer-events: auto !important;
}

/* Estado: Esperando Turno de Rival (Gris Semitransparente Pasivo) */
.turn-action-stripe.stripe-waiting {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@keyframes stripeGlowPulseRed {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(248, 113, 113, 0.9);
  }
}

@keyframes stripeGlowPulseGold {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 158, 11, 0.5);
  }

  50% {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(251, 191, 36, 0.9);
  }
}

@keyframes stripeGlowPulse {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(34, 197, 94, 0.4);
  }

  50% {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(74, 222, 128, 0.8);
  }
}

/* Posicionamiento inicial adaptativo según notch y barra superior (Dimensiones y tamaño 100% fijos y constantes) */
@media (max-width: 768px) {
  .turn-action-stripe:not(.has-custom-pos) {
    top: 112px;
  }

  body.has-notch-margin .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(24px, env(safe-area-inset-top, 24px)) + 112px);
  }

  body.has-notch-margin #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(24px, env(safe-area-inset-top, 24px)) + 46px);
  }

  #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: 46px;
  }
}

@media (max-width: 480px) {
  .turn-action-stripe:not(.has-custom-pos) {
    top: 104px;
  }

  body.has-notch-margin .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(20px, env(safe-area-inset-top, 20px)) + 104px);
  }

  body.has-notch-margin #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(20px, env(safe-area-inset-top, 20px)) + 42px);
  }

  #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: 42px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .turn-action-stripe:not(.has-custom-pos) {
    top: 40px;
  }

  body.has-notch-margin .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(10px, env(safe-area-inset-top, 10px)) + 38px);
  }

  body.has-notch-margin #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: calc(max(10px, env(safe-area-inset-top, 10px)) + 36px);
  }

  #game-screen.top-bar-hidden .turn-action-stripe:not(.is-dragging):not(.has-custom-pos) {
    top: 36px;
  }
}

/* Tarjetas de Jugador Colapsables (>3 Jugadores) */
#players-list.many-players-bar,
div#players-list.many-players-bar,
.players-top-bar.many-players-bar {
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  overflow-y: visible !important;
  padding: 4px 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#players-list .hex-player-pod.pod-compact,
div#players-list .hex-player-pod.pod-compact,
.players-top-bar .hex-player-pod.pod-compact {
  flex: 1 1 120px !important;
  min-width: 110px !important;
  max-width: 185px !important;
  min-height: 34px !important;
  height: auto !important;
  padding: 4px 8px !important;
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
  border-radius: 10px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#players-list .hex-player-pod.pod-compact:hover,
div#players-list .hex-player-pod.pod-compact:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

#players-list .hex-player-pod.pod-compact .pod-compact-header,
div#players-list .hex-player-pod.pod-compact .pod-compact-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  width: 100 !important;
  width: 100% !important;
}

#players-list .hex-player-pod.pod-compact .pod-compact-header .pod-player-name,
div#players-list .hex-player-pod.pod-compact .pod-compact-header .pod-player-name {
  max-width: 75px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 0.78rem !important;
  color: #f8fafc !important;
}

#players-list .hex-player-pod.pod-compact .pod-expand-arrow,
div#players-list .hex-player-pod.pod-compact .pod-expand-arrow {
  font-size: 0.7rem !important;
  opacity: 0.7 !important;
  margin-left: 2px !important;
  transition: transform 0.2s ease !important;
  display: inline-block !important;
}

/* Esconder detalles cuando está colapsado */
#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-expand-details,
div#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-expand-details,
#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-row-bottom,
div#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-row-bottom,
#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-row-stock,
div#players-list .hex-player-pod.pod-compact:not(.pod-expanded) .pod-row-stock {
  display: none !important;
}

/* Mostrar detalles cuando está expandido */
#players-list .hex-player-pod.pod-compact.pod-expanded,
div#players-list .hex-player-pod.pod-compact.pod-expanded {
  min-width: 175px !important;
  max-width: 220px !important;
  z-index: 120 !important;
}

#players-list .hex-player-pod.pod-compact.pod-expanded .pod-expand-arrow,
div#players-list .hex-player-pod.pod-compact.pod-expanded .pod-expand-arrow {
  transform: rotate(180deg) !important;
  opacity: 1 !important;
}

#players-list .hex-player-pod.pod-compact.pod-expanded .pod-expand-details,
div#players-list .hex-player-pod.pod-compact.pod-expanded .pod-expand-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-top: 5px !important;
  padding-top: 5px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  animation: podDetailsFade 0.2s ease-out forwards !important;
}

#players-list .hex-player-pod.pod-compact.pod-expanded .pod-row-bottom,
div#players-list .hex-player-pod.pod-compact.pod-expanded .pod-row-bottom,
#players-list .hex-player-pod.pod-compact.pod-expanded .pod-row-stock,
div#players-list .hex-player-pod.pod-compact.pod-expanded .pod-row-stock {
  display: flex !important;
}

@keyframes podDetailsFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   POSITIONING FIX: CHAT & DEV CARDS ANCHORED ABOVE BOTTOM RESOURCES HUD DOCK
   ========================================================================== */

/* 1. CHAT DE LA PARTIDA (#chat-hud)
   Organic Glassmorphic HUD with Accessible Semantics */
#chat-hud.chat-hud,
.chat-hud {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  right: auto !important;
  bottom: auto !important;
  width: min(400px, calc(100vw - 24px)) !important;
  height: min(390px, calc(100vh - 120px)) !important;
  max-height: min(460px, calc(100vh - 90px)) !important;
  z-index: 1250 !important;
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.97) 0%, rgba(8, 14, 26, 0.98) 100%) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 22px !important;
  box-shadow:
    0 24px 60px -8px rgba(0, 0, 0, 0.92),
    0 0 32px rgba(56, 189, 248, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
  margin: 0 !important;
  pointer-events: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: box-shadow 0.25s ease, opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  touch-action: none;
}

#chat-messages-list {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: 270px;
  overflow-y: auto;
  padding: 10px 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

#chat-messages-list::-webkit-scrollbar {
  width: 5px;
}

#chat-messages-list::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 10px;
}

.chat-drag-handle {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  padding: 10px 14px !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  flex-shrink: 0 !important;
}

.chat-header-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.chat-drag-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  opacity: 0.75;
}

.chat-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e, 0 0 14px rgba(34, 197, 94, 0.8);
  animation: chatLivePulse 2.2s infinite ease-in-out;
}

@keyframes chatLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.chat-hud-title-text {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.05em !important;
  color: #f8fafc !important;
  text-transform: uppercase !important;
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-drag-handle:active,
#chat-hud.is-dragging .chat-drag-handle {
  cursor: grabbing !important;
}

#chat-hud.is-dragging {
  cursor: grabbing !important;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.96), 0 0 40px rgba(56, 189, 248, 0.45) !important;
  opacity: 0.96 !important;
}

.btn-chat-reset-pos {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #94a3b8 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  padding: 0 !important;
}

.btn-chat-reset-pos:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: scale(1.08);
}

.btn-close-chat-hud {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  padding: 0 !important;
}

.btn-close-chat-hud:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.08);
}

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

/* ==========================================================================
   LIVE CHAT FLOATING SINGLE-LINE TICKER
   Appears below top game HUD, transparent 0% background, high-contrast text-shadow
   ========================================================================== */
.live-chat-floating-ticker {
  position: fixed !important;
  top: calc(52px + env(safe-area-inset-top, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: min(92vw, 620px) !important;
  width: auto !important;
  z-index: 10050 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 3px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.live-chat-floating-ticker.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.live-chat-floating-ticker.ticker-fade-out {
  opacity: 0 !important;
  transform: translate(-50%, -6px) !important;
  pointer-events: none !important;
}

.live-chat-ticker-content {
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #f8fafc !important;
  text-shadow:
    0 1px 3px #000000,
    0 0 8px rgba(0, 0, 0, 0.95),
    0 0 3px #000000,
    0 2px 6px rgba(0, 0, 0, 0.85) !important;
  letter-spacing: 0.015em !important;
}

.live-chat-ticker-author {
  font-weight: 900 !important;
  margin-right: 6px !important;
  text-shadow:
    0 1px 3px #000000,
    0 0 8px rgba(0, 0, 0, 0.95),
    0 0 3px #000000,
    0 2px 6px rgba(0, 0, 0, 0.85) !important;
}

.live-chat-ticker-text {
  color: #f1f5f9 !important;
}

@media (max-width: 768px) {
  .live-chat-floating-ticker {
    top: calc(135px + env(safe-area-inset-top, 0px)) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 2px 8px !important;
  }

  .live-chat-ticker-content {
    font-size: 0.84rem !important;
  }
}

/* 2. MIS CARTAS DE DESARROLLO (#dev-cards-hud)
   Centered cleanly and comfortably above the bottom dock */
@keyframes devCardsHudSlideUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    filter: blur(0);
  }
}

#dev-cards-hud.dev-cards-hud,
.dev-cards-hud {
  position: fixed !important;
  bottom: calc(var(--bottom-dock-height, 80px) + 10px) !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  width: min(540px, calc(100vw - 28px)) !important;
  max-height: min(420px, calc(100vh - var(--bottom-dock-height, 80px) - 24px)) !important;
  z-index: 2500 !important;
  background: rgba(13, 20, 36, 0.96) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border: 1.5px solid rgba(192, 132, 252, 0.45) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.25) !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  pointer-events: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  animation: devCardsHudSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#dev-cards-hud.hidden,
.dev-cards-hud.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Dev Cards Buy Button in HUD - High contrast, visible & rich feedback */
.btn-hud-buy-devcard {
  width: 100% !important;
  margin-top: 12px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(192, 132, 252, 0.35) !important;
  background: linear-gradient(135deg, rgba(26, 35, 58, 0.95), rgba(15, 23, 42, 0.98)) !important;
  color: #f8fafc !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
  user-select: none !important;
}

.btn-hud-buy-devcard:disabled,
.btn-hud-buy-devcard.cannot-buy {
  opacity: 0.96 !important;
  cursor: not-allowed !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(20, 29, 48, 0.92) !important;
}

.btn-hud-buy-devcard.can-buy-active {
  cursor: pointer !important;
  opacity: 1 !important;
  background: linear-gradient(135deg, #9333ea, #d97706) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 22px rgba(168, 85, 247, 0.45), 0 0 16px rgba(251, 191, 36, 0.35) !important;
  animation: pulseDevBuyGlow 2.5s infinite ease-in-out !important;
}

@keyframes pulseDevBuyGlow {

  0%,
  100% {
    box-shadow: 0 4px 22px rgba(168, 85, 247, 0.45), 0 0 16px rgba(251, 191, 36, 0.35);
  }

  50% {
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.7), 0 0 25px rgba(251, 191, 36, 0.55);
  }
}

.btn-hud-buy-devcard.can-buy-active:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.1) !important;
}

.hud-buy-btn-layout {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 10px !important;
}

.hud-buy-left-info {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hud-buy-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
  flex-shrink: 0 !important;
}

.can-buy-active .hud-buy-icon {
  background: rgba(251, 191, 36, 0.35) !important;
  color: #fef08a !important;
}

.hud-buy-text-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 2px !important;
}

.hud-buy-label {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
}

.hud-buy-status-tag {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 1px 6px !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
}

.hud-buy-status-tag.status-ready {
  background: rgba(34, 197, 94, 0.25) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

.hud-buy-status-tag.status-missing {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.hud-buy-status-tag.status-warning {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fcd34d !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.hud-buy-status-tag.status-danger {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.hud-buy-cost-chips {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.hud-cost-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.hud-cost-pill.has-res {
  background: rgba(34, 197, 94, 0.2) !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  color: #86efac !important;
}

.hud-cost-pill.missing-res {
  background: rgba(239, 68, 68, 0.16) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}

.cost-check {
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  color: #4ade80 !important;
}

.cost-cross {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #ef4444 !important;
}

.dev-cards-empty-state {
  animation: fadeInDevEmpty 0.3s ease-out;
}

@keyframes fadeInDevEmpty {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {

  /* Mobile Chat positioned in the UPPER half under the Top HUD so virtual keyboard never covers it */
  #chat-hud.chat-hud,
  .chat-hud {
    position: fixed !important;
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(430px, calc(100vw - 20px)) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(240px, 46vh) !important;
    border-radius: 16px !important;
    border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(56, 189, 248, 0.3) !important;
    z-index: 2500 !important;
    display: flex !important;
    flex-direction: column !important;
    animation: fadeInScaleChat 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
  }

  .chat-drag-handle {
    border-radius: 16px 16px 0 0 !important;
    padding: 7px 12px !important;
    cursor: default !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }

  .chat-drag-handle::before {
    display: none !important;
  }

  .btn-chat-reset-pos {
    display: none !important;
  }

  .btn-close-chat-hud {
    min-width: 32px !important;
    min-height: 32px !important;
  }

  #chat-messages-list {
    flex: 1 1 auto !important;
    min-height: 60px !important;
    max-height: 140px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  #chat-quick-emojis {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 6px !important;
  }

  #chat-quick-emojis::-webkit-scrollbar {
    display: none !important;
  }

  .chat-input-container {
    flex-shrink: 0 !important;
    padding: 6px 8px !important;
    background: rgba(10, 16, 30, 0.98) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    gap: 6px !important;
  }

  #chat-input-text {
    font-size: 16px !important; /* Previene auto-zoom en iOS Safari */
    padding: 7px 46px 7px 12px !important;
  }

  .btn-chat-send {
    padding: 7px 10px !important;
    font-size: 0.78rem !important;
  }

  @keyframes fadeInScaleChat {
    0% {
      transform: translate(-50%, -8px) scale(0.97) !important;
      opacity: 0;
    }

    100% {
      transform: translate(-50%, 0) scale(1) !important;
      opacity: 1;
    }
  }

  /* Mobile Registro de Eventos (#logs-hud) positioned in the UPPER half under Top HUD, exactly where Chat is placed */
  .right-panels-container {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 2500 !important;
  }

  #logs-hud.logs-hud,
  .logs-hud,
  .organic-notice-ticker {
    position: absolute !important;
    top: calc(env(safe-area-inset-top, 0px) + 94px) !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    max-width: min(94vw, 440px) !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 9999px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 2500 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    overflow: visible !important;
  }

  #logs-hud.hidden,
  .logs-hud.hidden,
  .organic-notice-ticker.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #logs-hud.ticker-fade-out,
  .organic-notice-ticker.ticker-fade-out {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(-6px) scale(0.96) !important;
    pointer-events: none !important;
  }

  #logs-hud:not(.hidden),
  .logs-hud:not(.hidden),
  .organic-notice-ticker:not(.hidden) {
    display: flex !important;
    opacity: 1 !important;
  }

  #logs-hud #game-logs-list,
  .logs-hud .logs-list,
  .organic-notice-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #dev-cards-hud.dev-cards-hud,
  .dev-cards-hud {
    bottom: calc(var(--bottom-dock-height, 148px) + 8px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 14px) !important;
    max-width: 480px !important;
    max-height: min(400px, calc(100vh - var(--bottom-dock-height, 148px) - 20px)) !important;
    padding: 10px 12px !important;
    overflow-y: auto !important;
  }
}

/* Shake animation for invalid buy attempt */
@keyframes shakeDevBuyError {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.btn-hud-buy-devcard.btn-shake-error {
  animation: shakeDevBuyError 0.4s ease-in-out !important;
  border-color: #ef4444 !important;
}

/* Responsive improvements for dev card buy button and HUD */
@media (max-width: 520px) {

  #dev-cards-hud.dev-cards-hud,
  .dev-cards-hud {
    padding: 8px 10px !important;
    border-radius: 16px !important;
  }

  .btn-hud-buy-devcard {
    padding: 8px 10px !important;
    margin-top: 8px !important;
  }

  .hud-buy-btn-layout {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .hud-buy-left-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .hud-buy-label {
    font-size: 0.8rem !important;
  }

  .hud-buy-status-tag {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }

  .hud-buy-cost-chips {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .hud-cost-pill {
    flex: 1 1 0 !important;
    justify-content: center !important;
    padding: 5px 6px !important;
    font-size: 0.72rem !important;
  }
}

@media (max-width: 380px) {
  .btn-hud-buy-devcard {
    padding: 7px 8px !important;
  }

  .hud-buy-icon {
    width: 26px !important;
    height: 26px !important;
  }

  .hud-buy-label {
    font-size: 0.76rem !important;
  }

  .hud-buy-status-tag {
    font-size: 0.7rem !important;
  }

  .hud-cost-pill {
    padding: 4px 3px !important;
    font-size: 0.7rem !important;
    gap: 2px !important;
  }
}

@media (max-height: 520px) and (orientation: landscape) {

  #dev-cards-hud.dev-cards-hud,
  .dev-cards-hud {
    max-height: calc(100vh - 55px) !important;
    bottom: calc(var(--bottom-dock-height, 46px) + 6px) !important;
    padding: 8px 12px !important;
    overflow-y: auto !important;
  }

  .btn-hud-buy-devcard {
    margin-top: 6px !important;
    padding: 6px 10px !important;
  }
}

/* ==========================================================================
   🎲 BANCO KMKZ / CYBER TYCOON HERO BUTTON
   ========================================================================== */
.banco-kmkz-lobby-wrapper,
.monopoly-lobby-wrapper {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.btn-banco-kmkz-hero,
.btn-monopoly-hero {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 74px !important;
  box-sizing: border-box !important;
  padding: 16px 20px !important;
  background: linear-gradient(135deg, rgba(8, 17, 36, 0.96) 0%, rgba(10, 25, 55, 0.96) 50%, rgba(30, 27, 75, 0.96) 100%) !important;
  border: 2px solid rgba(0, 240, 255, 0.75) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(0, 240, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  outline: none !important;
  touch-action: manipulation !important;
  user-select: none !important;
}

.btn-banco-kmkz-hero:focus-visible,
.btn-monopoly-hero:focus-visible {
  outline: 2px solid #00f0ff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.8) !important;
}

.btn-banco-kmkz-hero:hover,
.btn-monopoly-hero:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 32px rgba(0, 240, 255, 0.5) !important;
  border-color: #67e8f9 !important;
}

.btn-banco-kmkz-hero:active,
.btn-monopoly-hero:active {
  transform: scale(0.98) !important;
}

.btn-banco-kmkz-hero:hover::after,
.btn-monopoly-hero:hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(30deg);
  animation: monopolyShimmer 1.2s ease-out;
  pointer-events: none;
}

@keyframes monopolyShimmer {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }

  100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

.banco-kmkz-hero-icon,
.monopoly-hero-icon {
  font-size: 2.3rem !important;
  filter: drop-shadow(0 2px 8px rgba(0, 240, 255, 0.6)) !important;
  flex-shrink: 0 !important;
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.25s ease !important;
}

.btn-banco-kmkz-hero:hover .banco-kmkz-hero-icon,
.btn-banco-kmkz-hero:hover .monopoly-hero-icon,
.btn-monopoly-hero:hover .banco-kmkz-hero-icon,
.btn-monopoly-hero:hover .monopoly-hero-icon {
  transform: scale(1.08) rotate(3deg);
}

.banco-kmkz-hero-text,
.monopoly-hero-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 !important;
  margin-left: 14px !important;
  min-width: 0 !important;
}

.banco-kmkz-hero-title-row,
.monopoly-hero-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  line-height: 1.2 !important;
}

.banco-kmkz-hero-title,
.monopoly-hero-title {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  color: #00f0ff !important;
  letter-spacing: 0.06em !important;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6) !important;
  line-height: 1.2 !important;
}

.banco-kmkz-hero-live-pill,
.monopoly-hero-live-pill {
  background: linear-gradient(135deg, #00f0ff, #0088ff) !important;
  color: #020617 !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.7) !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 18px !important;
  box-sizing: border-box !important;
}

.banco-kmkz-hero-subtitle,
.monopoly-hero-subtitle {
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  line-height: 1.2 !important;
}

.banco-kmkz-hero-right,
.monopoly-hero-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.banco-kmkz-hero-badge,
.monopoly-hero-badge {
  background: linear-gradient(135deg, #b026ff, #ff007f) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.74rem !important;
  padding: 5px 11px !important;
  border-radius: 20px !important;
  box-shadow: 0 0 14px rgba(176, 38, 255, 0.6) !important;
  white-space: nowrap !important;
  letter-spacing: 0.03em !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  box-sizing: border-box !important;
}

.banco-kmkz-hero-chevron,
.monopoly-hero-chevron {
  font-size: 0.85rem !important;
  color: #00f0ff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  transition: transform 0.25s ease !important;
}

.btn-banco-kmkz-hero:hover .banco-kmkz-hero-chevron,
.btn-banco-kmkz-hero:hover .monopoly-hero-chevron,
.btn-monopoly-hero:hover .banco-kmkz-hero-chevron,
.btn-monopoly-hero:hover .monopoly-hero-chevron {
  transform: translateX(3px) !important;
}

/* ==========================================================================
   🎰 CASINO KMKZ (Ultra-Modern, Accessible & Luxurious Mini-Games)
   ========================================================================== */
.casino-lobby-wrapper {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* Casino Hero Toggle Button */
.btn-casino-hero {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 74px !important;
  box-sizing: border-box !important;
  padding: 16px 20px !important;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(59, 7, 100, 0.95) 50%, rgba(88, 28, 135, 0.95) 100%) !important;
  border: 2px solid rgba(251, 191, 36, 0.7) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  outline: none !important;
  touch-action: manipulation !important;
  user-select: none !important;
}

.btn-casino-hero:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.8) !important;
}

.btn-casino-hero:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 30px rgba(251, 191, 36, 0.45) !important;
  border-color: #fde047 !important;
}

.btn-casino-hero:active {
  transform: scale(0.98) !important;
}

.btn-casino-hero:hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: rotate(30deg);
  animation: casinoShimmer 1.2s ease-out;
  pointer-events: none;
}

@keyframes casinoShimmer {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }

  100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

.casino-hero-icon {
  font-size: 2.3rem !important;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.6)) !important;
  flex-shrink: 0 !important;
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.25s ease !important;
}

.btn-casino-hero:hover .casino-hero-icon {
  transform: scale(1.08) rotate(3deg);
}

.casino-hero-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 !important;
  margin-left: 14px !important;
  min-width: 0 !important;
}

.casino-hero-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  line-height: 1.2 !important;
}

.casino-hero-title {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.06em !important;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6) !important;
  line-height: 1.2 !important;
}

.casino-hero-live-pill {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7) !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 18px !important;
  box-sizing: border-box !important;
  animation: blinkLive 2s infinite ease-in-out !important;
}

@keyframes blinkLive {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.casino-hero-subtitle {
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  line-height: 1.2 !important;
}

.casino-hero-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.casino-hero-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.74rem !important;
  padding: 5px 11px !important;
  border-radius: 20px !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6) !important;
  white-space: nowrap !important;
  letter-spacing: 0.03em !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  box-sizing: border-box !important;
}

.casino-hero-chevron {
  font-size: 0.85rem !important;
  color: #fbbf24 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s ease !important;
}

.btn-casino-hero[aria-expanded="true"] .casino-hero-chevron {
  transform: rotate(180deg) !important;
}

/* ==========================================================================
   Casino Panel Frame
   ========================================================================== */
.casino-panel {
  width: 100% !important;
  margin-top: 14px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.99) 0%, rgba(10, 15, 29, 1) 100%) !important;
  border: 2px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
  box-sizing: border-box !important;
  transition: opacity 0.25s ease !important;
  contain: content;
}

.casino-panel.hidden {
  display: none !important;
}

/* Casino Header & Live Balance */
.casino-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
}

.casino-header-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.casino-balance-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 12px !important;
  padding: 6px 14px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(251, 191, 36, 0.15) !important;
}

.casino-balance-pill .balance-label {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
}

.casino-balance-pill .balance-amount {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5) !important;
}

.btn-casino-sound {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-casino-sound:hover {
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: rgba(51, 65, 85, 0.9) !important;
}

.btn-casino-sound.is-muted {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

.btn-casino-sound.is-active {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

/* Casino Tabs Navigation — High Accessibility & Contrast */
.casino-tabs {
  display: flex !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  padding: 6px !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.casino-tab {
  flex: 1 !important;
  min-height: 42px !important;
  padding: 8px 14px !important;
  background: transparent !important;
  border: 1.5px solid transparent !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  user-select: none !important;
  white-space: nowrap !important;
  outline: none !important;
}

.casino-tab:focus-visible {
  outline: 2.5px solid #38bdf8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6) !important;
}

.casino-tab:hover:not(.active) {
  color: #ffffff !important;
  background: rgba(51, 65, 85, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px) !important;
}

.casino-tab.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #050811 !important;
  font-weight: 900 !important;
  border-color: #fde68a !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.casino-tab .tab-icon {
  font-size: 1.15rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.casino-tab .tab-label {
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
}

@media (max-width: 480px) {
  .casino-tab {
    padding: 6px 8px !important;
    gap: 5px !important;
  }

  .casino-tab .tab-icon {
    font-size: 1rem !important;
  }

  .casino-tab .tab-label {
    font-size: 0.78rem !important;
  }
}

.casino-tab-content {
  display: none !important;
  animation: casinoFadeIn 0.25s ease-out forwards;
}

.casino-tab-content.active {
  display: block !important;
}

@keyframes casinoFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   🎰 Tab 1: Slots Game (Authentic Vegas 3D Arcade Slot Machine)
   ========================================================================== */
.slots-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 660px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}

/* 3D Vegas Arcade Cabinet Frame */
.slots-arcade-frame {
  width: 100% !important;
  background: linear-gradient(180deg, #2a0845 0%, #16002c 40%, #0d001a 100%) !important;
  border: 4px solid #fbbf24 !important;
  border-radius: 28px !important;
  padding: 18px 22px !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(251, 191, 36, 0.28) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative !important;
  contain: content;
}

/* Top Crown Marquee & Chasing Bulbs */
.slots-cabinet-crown {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.15), rgba(0, 0, 0, 0.4)) !important;
  padding: 8px 12px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  box-sizing: border-box !important;
}

.slots-marquee-bulbs {
  display: flex !important;
  justify-content: space-between !important;
  width: 90% !important;
  gap: 8px !important;
}

.bulb {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.bulb.b-red {
  background: #ef4444 !important;
  box-shadow: 0 0 6px #ef4444 !important;
}

.bulb.b-gold {
  background: #fbbf24 !important;
  box-shadow: 0 0 6px #fbbf24 !important;
}

.bulb.b-green {
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981 !important;
}

.bulb.b-blue {
  background: #38bdf8 !important;
  box-shadow: 0 0 6px #38bdf8 !important;
}

.slots-header-marquee {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.marquee-crown-icon {
  font-size: 1.15rem !important;
}

/* ⭐ Astral Star Luck & Resonance Battery Pod in Slots Header */
.slots-star-luck-badge {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 280px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 14px !important;
  padding: 6px 10px !important;
  margin: 2px auto !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

.slots-star-luck-badge:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(251, 191, 36, 0.25) !important;
}

.slots-star-luck-badge.has-stars {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
}

.slots-star-luck-badge.boost-active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), inset 0 0 10px rgba(56, 189, 248, 0.12) !important;
}

.slots-star-luck-badge.charges-empty {
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.slot-battery-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  width: 100% !important;
}

.slot-battery-left {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.star-badge-mini {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6) !important;
  line-height: 1 !important;
}

.star-badge-mini.dormant {
  color: #94a3b8 !important;
  text-shadow: none !important;
}

.star-badge-mini.zero {
  color: #64748b !important;
  text-shadow: none !important;
}

.slot-battery-status {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
}

.slot-battery-status.active {
  color: #38bdf8 !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
}

.slot-battery-status.paused {
  color: #94a3b8 !important;
}

.slot-battery-status.dormant {
  color: #f59e0b !important;
}

.slot-battery-status.zero {
  color: #64748b !important;
}

/* Interactive Boost Switch Button */
.btn-slot-boost-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 7px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

.btn-slot-boost-toggle:hover {
  filter: brightness(1.15) !important;
  transform: scale(1.03) !important;
}

.btn-slot-boost-toggle .boost-toggle-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #64748b !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-slot-boost-toggle.is-active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
}

.btn-slot-boost-toggle.is-active .boost-toggle-dot {
  background: #38bdf8 !important;
  box-shadow: 0 0 6px #38bdf8 !important;
  animation: boostDotGlow 1.2s infinite alternate !important;
}

.btn-slot-boost-toggle.is-armed {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
}

.btn-slot-boost-toggle.is-armed .boost-toggle-dot {
  background: #f59e0b !important;
}

.btn-slot-boost-toggle.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

@keyframes boostDotGlow {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* Resonance Battery Progress Bar */
.slot-battery-track {
  width: 100% !important;
  height: 6px !important;
  background: rgba(2, 6, 23, 0.9) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  position: relative !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.slot-battery-track.empty {
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.slot-battery-fill {
  height: 100% !important;
  border-radius: 3px !important;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.slot-battery-fill.active {
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #a855f7, #f59e0b) !important;
  background-size: 200% 100% !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.75) !important;
  animation: batteryShimmer 2.2s linear infinite !important;
}

.slot-battery-fill.idle {
  background: linear-gradient(90deg, #475569, #64748b) !important;
}

.slot-battery-fill.zero,
.slot-battery-fill.empty {
  background: transparent !important;
}

@keyframes batteryShimmer {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.slot-battery-info {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  width: 100% !important;
  line-height: 1.2 !important;
}

.slot-battery-nums {
  color: #e2e8f0 !important;
}

.slot-battery-cost {
  color: #38bdf8 !important;
}

.slot-battery-cta {
  width: 100% !important;
  text-align: center !important;
  color: #fbbf24 !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  transition: color 0.15s ease !important;
}

.slot-battery-cta.recharge {
  color: #38bdf8 !important;
}

.slot-battery-cta:hover {
  filter: brightness(1.2) !important;
  text-decoration: underline !important;
}

/* 🍀 KMKZ Slot CMS Luck Pill & Quick Access */
.slot-cms-luck-pill {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.82) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 9999px !important;
  padding: 4px 12px !important;
  margin: 6px auto !important;
  width: calc(100% - 16px) !important;
  max-width: 380px !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.slot-cms-luck-pill.boosted {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(245, 158, 11, 0.28)) !important;
  border-color: rgba(52, 211, 153, 0.7) !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.4), inset 0 0 8px rgba(245, 158, 11, 0.2) !important;
}

.slot-cms-luck-inner {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.slot-cms-luck-icon {
  font-size: 0.85rem !important;
  line-height: 1 !important;
}

.slot-cms-luck-title {
  color: #cbd5e1 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
}

.slot-cms-luck-badge {
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.slot-cms-luck-badge.boosted {
  background: linear-gradient(135deg, #10b981, #f59e0b) !important;
  color: #020617 !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6) !important;
}

.slot-cms-luck-link.hidden,
#slot-cms-admin-link.hidden {
  display: none !important;
}

.slot-cms-luck-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 9999px !important;
  padding: 3px 9px !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.slot-cms-luck-link:hover {
  background: rgba(245, 158, 11, 0.35) !important;
  border-color: #fbbf24 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45) !important;
  color: #fff !important;
}

.slot-cms-luck-arrow {
  font-size: 0.75rem !important;
  transition: transform 0.15s ease !important;
}

.slot-cms-luck-link:hover .slot-cms-luck-arrow {
  transform: translate(1px, -1px) !important;
}

.slots-jackpot-meter {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #000 !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.4) !important;
}

.jackpot-label {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fca5a5 !important;
  letter-spacing: 0.05em !important;
}

.jackpot-value {
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 8px #fbbf24 !important;
}

/* Stage with 3D Glass Window and Side Lever (100% Centered Symmetrically) */
.slots-machine-stage {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}

/* 3-Reel Cylinder Glass Window (3 Rows, Perfectly Symmetrical) */
.slots-reels-window {
  width: 100% !important;
  max-width: 380px !important;
  height: 180px !important;
  background: #09090b !important;
  border-radius: 18px !important;
  border: 3.5px solid #d97706 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  box-shadow:
    inset 0 12px 18px rgba(0, 0, 0, 0.95),
    inset 0 -12px 18px rgba(0, 0, 0, 0.95),
    0 0 16px rgba(217, 119, 6, 0.35) !important;
  overflow: hidden !important;
  position: relative !important;
  margin: 0 auto !important;
  contain: strict;
}

/* Horizontal Laser Payline Indicator (Dead Center) */
.slot-payline-beam {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.9) 0%, rgba(251, 191, 36, 1) 50%, rgba(239, 68, 68, 0.9) 100%) !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.7) !important;
  transform: translateY(-50%) !important;
  z-index: 8 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 6px !important;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.slot-payline-beam.tension-active {
  background: linear-gradient(90deg, #ef4444 0%, #fbbf24 50%, #ef4444 100%) !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.95), 0 0 12px #fbbf24 !important;
  animation: beamTensionPulse 0.4s infinite alternate ease-in-out !important;
}

@keyframes beamTensionPulse {
  0% {
    opacity: 0.75;
    filter: drop-shadow(0 0 4px #ef4444);
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 14px #fbbf24);
  }
}

.payline-arrow-left,
.payline-arrow-right {
  color: #fbbf24 !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  text-shadow: 0 0 8px #fbbf24 !important;
}

.payline-label {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: rgba(220, 38, 38, 0.9) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  border: 1px solid #fbbf24 !important;
  letter-spacing: 0.06em !important;
}

/* 3 Reels Drum Grid */
.slots-reels {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.slot-reel {
  width: 100% !important;
  height: 100% !important;
  border-right: 2px solid rgba(251, 191, 36, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  position: relative !important;
  user-select: none !important;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
  box-sizing: border-box !important;
  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.slot-reel:last-child {
  border-right: none !important;
}

.slot-reel.tension-spin {
  box-shadow: inset 0 0 24px rgba(251, 191, 36, 0.85), 0 0 20px rgba(251, 191, 36, 0.6) !important;
  border-color: #fbbf24 !important;
}

.reel-strip {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  will-change: transform;
}

.reel-cell {
  flex: 1 1 0 !important;
  height: 33.333% !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.reel-cell.top-cell {
  opacity: 0.42 !important;
  transform: scale(0.85) !important;
}

.reel-cell.center-cell {
  opacity: 1 !important;
  transform: scale(1.04) !important;
  z-index: 5 !important;
}

.reel-cell.bottom-cell {
  opacity: 0.42 !important;
  transform: scale(0.85) !important;
}

/* Spinning Motion Blur & Hardware-Accelerated Physics */
.slot-reel.spinning .reel-strip {
  animation: reelStripSpin 0.12s linear infinite !important;
  opacity: 0.95 !important;
  will-change: transform;
}

.slot-reel.spinning.turbo .reel-strip {
  animation-duration: 0.08s !important;
}

.slot-reel.spinning.ultra-turbo .reel-strip {
  animation-duration: 0.05s !important;
}

.slot-reel.tension-spin .reel-strip {
  animation: reelStripSpin 0.24s linear infinite !important;
}

@keyframes reelStripSpin {
  0% {
    transform: translate3d(0, -18px, 0);
  }

  100% {
    transform: translate3d(0, 18px, 0);
  }
}

/* Stop Bounce Physics */
.slot-reel.stopping .reel-strip {
  animation: reelSettleBounce 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.25) !important;
}

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

  60% {
    transform: translateY(4px);
  }

  100% {
    transform: translateY(0);
  }
}

/* Winning Payline Symbol Pulse */
.reel-cell.center-cell.is-win-pulse {
  animation: winCellPulse 0.8s infinite alternate ease-in-out !important;
  filter: drop-shadow(0 0 10px #fbbf24) !important;
}

@keyframes winCellPulse {
  0% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1.14);
  }
}

/* ── DEDICATED SKILL-STOP BONUS MULTIPLIER MODAL OVERLAY ── */
.slot-bonus-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  background: rgba(2, 6, 23, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  animation: bonusOverlayFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  overflow: hidden !important;
}

.slot-bonus-modal-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}

@keyframes bonusOverlayFade {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.slot-bonus-modal-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: min(360px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 30px) !important;
  padding: 16px 14px !important;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%) !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(251, 191, 36, 0.4) !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1000000 !important;
  cursor: default !important;
  overflow-y: auto !important;
}

.slot-bonus-header {
  text-align: center !important;
}

.slot-bonus-badge {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 14px #fbbf24, 0 2px 4px rgba(0, 0, 0, 0.8) !important;
  letter-spacing: 0.5px !important;
  animation: bannerTextPulse 0.8s infinite alternate ease-in-out !important;
}

@keyframes bannerTextPulse {
  0% {
    transform: scale(0.98);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.slot-bonus-subtitle {
  font-size: 0.76rem !important;
  color: #cbd5e1 !important;
  margin-top: 2px !important;
  font-weight: 600 !important;
}

.slot-bonus-reel-window {
  width: 140px !important;
  height: 140px !important;
  position: relative !important;
  overflow: hidden !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 14px !important;
  background: #020617 !important;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.95), 0 0 20px rgba(251, 191, 36, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.slot-bonus-payline-beam {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  transform: translateY(-50%) !important;
  height: 46px !important;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.35) 50%, rgba(251, 191, 36, 0.15) 100%) !important;
  border-top: 2px solid rgba(251, 191, 36, 0.9) !important;
  border-bottom: 2px solid rgba(251, 191, 36, 0.9) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.7) !important;
  pointer-events: none !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 6px !important;
  color: #fbbf24 !important;
  font-size: 0.8rem !important;
}

.slot-reel.bonus-reel {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.reel-cell.bonus-cell {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-weight: 900 !important;
  font-size: 1.85rem !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.reel-cell.bonus-cell.payline-active {
  color: #ffffff !important;
  text-shadow: 0 0 18px #f59e0b, 0 0 26px #fbbf24 !important;
  transform: scale(1.12) !important;
}

.bonus-stop-action-bar {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  gap: 6px !important;
  margin-top: 2px !important;
  box-sizing: border-box !important;
}

.btn-bonus-stop {
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px 14px !important;
  font-size: clamp(0.85rem, 3.6vw, 1rem) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%) !important;
  border: 2px solid #fecaca !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.7), 0 0 16px rgba(239, 68, 68, 0.8) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  user-select: none !important;
  touch-action: manipulation !important;
  animation: stopButtonThrob 0.5s infinite alternate ease-in-out !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.25 !important;
}

.btn-bonus-stop:hover,
.btn-bonus-stop:active {
  transform: scale(0.98) !important;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.9), 0 0 24px #ef4444 !important;
}

@keyframes stopButtonThrob {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
  }

  100% {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.9), 0 0 20px #f87171;
  }
}

.bonus-stop-hint {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  text-align: center !important;
  font-weight: 600 !important;
  padding: 0 4px !important;
}

/* Glass Cylinder Reflections and Depth Shadows */
.reel-cylinder-shadow-top {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 50px !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 100%) !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

.reel-cylinder-shadow-bottom {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 50px !important;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 100%) !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

.reel-glass-reflection {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 60%) !important;
  pointer-events: none !important;
  z-index: 7 !important;
}

/* Mechanical 3D Pull Lever (Right Side) */
.slot-lever-container {
  position: absolute !important;
  right: -14px !important;
  top: 25px !important;
  width: 28px !important;
  height: 125px !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  z-index: 10 !important;
  user-select: none !important;
  touch-action: manipulation !important;
}

.lever-mount {
  width: 22px !important;
  height: 32px !important;
  background: linear-gradient(90deg, #78350f, #d97706, #451a03) !important;
  border-radius: 6px !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8) !important;
  position: absolute !important;
  bottom: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.lever-pivot {
  width: 10px !important;
  height: 10px !important;
  background: #fbbf24 !important;
  border-radius: 50% !important;
  box-shadow: inset 0 0 3px #000 !important;
}

.lever-arm {
  position: absolute !important;
  bottom: 28px !important;
  width: 12px !important;
  height: 105px !important;
  transform-origin: bottom center !important;
  transition: transform 0.15s ease-out !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.lever-shaft {
  width: 7px !important;
  height: 88px !important;
  background: linear-gradient(90deg, #94a3b8, #f8fafc, #64748b) !important;
  border-radius: 4px !important;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.lever-ball {
  width: 30px !important;
  height: 30px !important;
  background: radial-gradient(circle at 35% 35%, #fca5a5 0%, #ef4444 45%, #991b1b 100%) !important;
  border-radius: 50% !important;
  border: 1.5px solid #fee2e2 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 14px rgba(239, 68, 68, 0.7) !important;
  position: absolute !important;
  top: -16px !important;
  transition: transform 0.15s ease !important;
}

.slot-lever-container:hover .lever-ball {
  transform: scale(1.15) !important;
  box-shadow: 0 0 22px #ef4444 !important;
}

/* Lever Pull Action Animation */
.slot-lever-container.pulled .lever-arm {
  transform: rotateX(65deg) translateY(52px) scaleY(0.6) !important;
  transition: transform 0.18s cubic-bezier(0.1, 0.9, 0.2, 1) !important;
}

/* Digital LED Scoreboard Meter Displays */
.slots-digital-scoreboard {
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: #020617 !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 12px !important;
  padding: 6px 12px !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9) !important;
}

.score-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: 1 !important;
}

.score-title {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.08em !important;
}

.score-digits {
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.7) !important;
}

.score-box.win-box .score-digits {
  color: #4ade80 !important;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.7) !important;
}

/* Result Badge (Full Responsive & Safe Multi-Line Text Wrapping) */
.casino-result-badge {
  font-size: clamp(0.72rem, 2.8vw, 0.88rem) !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  min-height: 38px !important;
  height: auto !important;
  text-align: center !important;
  padding: 6px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  line-height: 1.35 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.casino-result-badge>span,
.slots-result-badge>span,
#slots-result-badge>span,
#dice-result-badge>span,
.slot-result-main {
  display: inline !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.slot-result-bonus-line {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
  box-sizing: border-box !important;
  font-size: 0.72rem !important;
  color: #fde047 !important;
  font-weight: 800 !important;
  margin-top: 3px !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6) !important;
  line-height: 1.25 !important;
}

.casino-result-badge svg,
.slots-result-badge svg,
#slots-result-badge svg,
#dice-result-badge svg {
  display: inline-block !important;
  vertical-align: -2px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   🎰 Enhanced Accessible & Beautiful Bet Section
   ========================================================================== */
.casino-bet-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(9, 13, 22, 0.95)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 18px !important;
  padding: 14px 16px !important;
  box-sizing: border-box !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

.casino-bet-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.bet-section-title {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* Stepper Controller Bar with Big Tactile Touch Targets */
.casino-stepper-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
}

.btn-bet-stepper {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border: 2px solid rgba(251, 191, 36, 0.5) !important;
  color: #fbbf24 !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  touch-action: manipulation !important;
}

.btn-bet-stepper:hover {
  transform: translateY(-2px) scale(1.05) !important;
  border-color: #fbbf24 !important;
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
  box-shadow: 0 6px 15px rgba(251, 191, 36, 0.3) !important;
}

.btn-bet-stepper:active {
  transform: translateY(1px) scale(0.96) !important;
}

.bet-input-display-wrap {
  flex: 1 !important;
  max-width: 240px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: #020617 !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 14px !important;
  padding: 6px 12px !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 12px rgba(251, 191, 36, 0.25) !important;
}

.bet-currency-icon {
  font-size: 1.1rem !important;
}

.bet-input-large {
  width: 90px !important;
  background: transparent !important;
  border: none !important;
  color: #fbbf24 !important;
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  text-align: center !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.bet-coin-tag {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.05em !important;
}

/* 3D Realistic Casino Chips Strip */
.bet-chips-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  flex-wrap: wrap !important;
  margin: 4px 0 !important;
}

.chip-btn {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-weight: 900 !important;
  font-size: 0.85rem !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.7),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  padding: 0 !important;
  position: relative !important;
}

.chip-btn::before {
  content: '' !important;
  position: absolute !important;
  inset: 4px !important;
  border-radius: 50% !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.5) !important;
  pointer-events: none !important;
}

.chip-val {
  z-index: 2 !important;
}

/* Color specific 3D Casino Chips */
.chip-btn.chip-10 {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 60%, #0369a1 100%) !important;
  border: 3px solid #7dd3fc !important;
}

.chip-btn.chip-50 {
  background: radial-gradient(circle at 35% 35%, #34d399 0%, #059669 60%, #064e3b 100%) !important;
  border: 3px solid #6ee7b7 !important;
}

.chip-btn.chip-100 {
  background: radial-gradient(circle at 35% 35%, #c084fc 0%, #7c3aed 60%, #4c1d95 100%) !important;
  border: 3px solid #d8b4fe !important;
}

.chip-btn.chip-500 {
  background: radial-gradient(circle at 35% 35%, #fbbf24 0%, #d97706 60%, #78350f 100%) !important;
  border: 3px solid #fde68a !important;
  color: #000 !important;
  text-shadow: none !important;
}

.chip-btn.chip-1000 {
  background: radial-gradient(circle at 35% 35%, #f87171 0%, #dc2626 60%, #7f1d1d 100%) !important;
  border: 3px solid #fca5a5 !important;
}

.chip-btn:hover {
  transform: translateY(-4px) scale(1.08) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 255, 255, 0.4) !important;
}

.chip-btn.active {
  transform: translateY(-4px) scale(1.12) !important;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.9),
    0 0 0 3px #fff,
    0 0 16px #fbbf24 !important;
}

/* Quick Bet Multipliers */
.casino-quick-bet-bar {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
}

.btn-quick-bet {
  flex: 1 !important;
  min-height: 38px !important;
  padding: 6px 10px !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  color: #e2e8f0 !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
  touch-action: manipulation !important;
}

.btn-quick-bet:hover {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 1)) !important;
  color: #fbbf24 !important;
  border-color: #fbbf24 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25) !important;
}

/* Action Spin / Roll Button */
.btn-casino-action {
  width: 100% !important;
  min-height: 48px !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: clamp(0.82rem, 3.8vw, 1.05rem) !important;
  letter-spacing: 0.03em !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  outline: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-casino-action:focus-visible {
  outline: 2px solid #34d399 !important;
  outline-offset: 2px !important;
}

.btn-casino-action:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6) !important;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
}

.btn-casino-action:active {
  transform: translateY(0) !important;
}

.btn-casino-action:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.btn-casino-action.roll-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  color: #000000 !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

.btn-casino-action.roll-btn:hover {
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 100%) !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6) !important;
}

/* Payout Table Quick Card (Mobile-First 100% Responsive) */
.casino-payout-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
}

.payout-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  width: 100% !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-bottom: 4px !important;
  box-sizing: border-box !important;
}

.payout-item:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.payout-combo {
  color: #e2e8f0 !important;
  font-weight: 800 !important;
}

.payout-item.jackpot .payout-val {
  color: #fbbf24 !important;
  font-weight: 900 !important;
}

.payout-item.bonus .payout-val {
  color: #c084fc !important;
  font-weight: 900 !important;
}

.payout-item.high .payout-val {
  color: #34d399 !important;
  font-weight: 900 !important;
}

.payout-item.medium .payout-val {
  color: #38bdf8 !important;
  font-weight: 900 !important;
}

/* ==========================================================================
   🎰 KMKZ SLOTS PRO: Utility Bar, Free Spins Aura & Tension Spin FX
   ========================================================================== */
.slots-quick-utility-bar {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-slot-util {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  user-select: none !important;
  touch-action: manipulation !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.btn-slot-util .slot-util-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  transition: transform 0.2s ease !important;
}

.btn-slot-util:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #fff !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(251, 191, 36, 0.25) !important;
}

.btn-slot-util:active {
  transform: translateY(1px) scale(0.96) !important;
}

.btn-slot-util.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(202, 138, 4, 0.45)) !important;
  border-color: #facc15 !important;
  color: #fef08a !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.45), inset 0 0 8px rgba(250, 204, 21, 0.2) !important;
}

.btn-slot-util.gold {
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

.btn-slot-util.active.ultra-turbo {
  background: linear-gradient(135deg, #ef4444, #f97316, #eab308) !important;
  border-color: #fde047 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.7), 0 0 28px rgba(249, 115, 22, 0.5) !important;
  animation: ultraTurboPulse 0.7s infinite alternate ease-in-out !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

@keyframes ultraTurboPulse {
  0% {
    transform: scale(0.98);
    filter: brightness(1);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  }

  100% {
    transform: scale(1.03);
    filter: brightness(1.25);
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.9), 0 0 35px rgba(234, 179, 8, 0.6);
  }
}

/* Auto-Spin Configuration Drawer (Ultra-Compact & Accessible) */
.slots-auto-drawer {
  background: rgba(15, 23, 42, 0.97) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  margin-top: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  animation: drawerSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.slots-auto-drawer.hidden {
  display: none !important;
}

@keyframes drawerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.slots-auto-drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.slots-auto-header-left {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.slots-auto-drawer-title {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.btn-close-drawer {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  padding: 0 !important;
}

.btn-close-drawer:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.slots-auto-count-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border: 1px solid #fbbf24 !important;
  color: #0f172a !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  padding: 1px 7px !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4) !important;
  letter-spacing: 0.3px !important;
}

.slots-auto-presets {
  display: flex !important;
  gap: 5px !important;
  width: 100% !important;
}

.btn-auto-preset {
  flex: 1 !important;
  padding: 4px 2px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
  color: #cbd5e1 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  text-align: center !important;
  user-select: none !important;
}

.btn-auto-preset:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #fff !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
}

.btn-auto-preset:focus-visible,
.btn-close-drawer:focus-visible,
.btn-start-auto-action:focus-visible,
.slots-auto-range-slider:focus-visible {
  outline: 2px solid #fde047 !important;
  outline-offset: 1.5px !important;
}

.btn-auto-preset.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #fde047 !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45) !important;
}

.btn-auto-preset.infinite {
  font-size: 0.85rem !important;
  line-height: 1 !important;
}

.slots-auto-slider-wrap {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 2px 0 !important;
}

.slots-auto-range-slider {
  width: 100% !important;
  height: 5px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: linear-gradient(90deg, #334155, #475569) !important;
  border-radius: 4px !important;
  outline: none !important;
  cursor: pointer !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.slots-auto-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, #fde047, #d97706) !important;
  cursor: pointer !important;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  border: 1.5px solid #ffffff !important;
  transition: transform 0.1s !important;
}

.slots-auto-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15) !important;
}

.btn-start-auto-action {
  width: 100% !important;
  padding: 6px 10px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1px solid #6ee7b7 !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-start-auto-action:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
}

.btn-start-auto-action:active {
  transform: scale(0.98) !important;
}


/* Free Spins Active Mode Aura */
.slots-free-spins-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  background: linear-gradient(90deg, #b45309, #d97706, #b45309) !important;
  border: 1.5px solid #fef08a !important;
  border-radius: 20px !important;
  padding: 4px 14px !important;
  margin-top: 6px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), inset 0 0 8px rgba(255, 255, 255, 0.4) !important;
  animation: freeSpinsGlow 0.9s infinite alternate ease-in-out !important;
}

.slots-free-spins-badge.hidden {
  display: none !important;
}

.free-spins-text {
  font-size: clamp(0.7rem, 2.6vw, 0.78rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: 0.04em !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9) !important;
  text-align: center !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  max-width: 100% !important;
}

@keyframes freeSpinsGlow {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  }

  100% {
    transform: scale(1.03);
    box-shadow: 0 0 26px rgba(251, 191, 36, 1), 0 0 40px rgba(245, 158, 11, 0.7);
  }
}

.slots-machine-stage.free-spins-active {
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.85), inset 0 0 20px rgba(251, 191, 36, 0.6) !important;
  border-color: #fbbf24 !important;
}

/* Tension Spin Slowdown FX on Reel 3 */
.slot-reel.tension-spin {
  animation: tensionPulse 0.3s infinite alternate !important;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%) !important;
  box-shadow: inset 0 0 18px rgba(251, 191, 36, 0.8) !important;
}

.slot-reel.tension-spin .reel-strip {
  animation: reelStripTension 0.18s linear infinite !important;
  filter: blur(1.2px) !important;
}

@keyframes reelStripTension {
  0% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(20px);
  }
}

@keyframes tensionPulse {
  0% {
    border-color: rgba(251, 191, 36, 0.4);
  }

  100% {
    border-color: rgba(239, 68, 68, 0.9);
  }
}

.slot-payline-beam.tension-active {
  background: linear-gradient(90deg, #ef4444 0%, #fbbf24 50%, #ef4444 100%) !important;
  height: 4px !important;
  box-shadow: 0 0 18px #fbbf24, 0 0 30px #ef4444 !important;
  animation: paylineTensionFlash 0.2s infinite alternate !important;
}

@keyframes paylineTensionFlash {
  0% {
    filter: brightness(1);
  }

  100% {
    filter: brightness(1.8);
  }
}

/* Falling Coin Particles */
.slot-coin-particle {
  position: absolute !important;
  font-size: 1.4rem !important;
  pointer-events: none !important;
  z-index: 20 !important;
  animation: coinFall linear forwards !important;
}

@keyframes coinFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.6);
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    transform: translateY(180px) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* Paytable Modal Styling (Ultra Responsive Mobile) */
.slots-paytable-modal {
  max-width: 440px !important;
  width: min(440px, calc(100vw - 20px)) !important;
  max-height: 82vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  padding: 14px 16px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(251, 191, 36, 0.2) !important;
}

.paytable-scroll-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 4px 2px !important;
  max-height: calc(82vh - 70px) !important;
  box-sizing: border-box !important;
}

.paytable-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.paytable-section-title {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25) !important;
  padding-bottom: 4px !important;
}

.paytable-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.paytable-row.jackpot-row {
  border-color: rgba(251, 191, 36, 0.6) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(30, 41, 59, 0.9)) !important;
}

.paytable-row.bonus-row {
  border-color: rgba(168, 85, 247, 0.6) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(30, 41, 59, 0.9)) !important;
}

.paytable-icons {
  font-size: 1.35rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.paytable-desc {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.paytable-desc strong {
  font-size: 0.8rem !important;
  color: #f8fafc !important;
  line-height: 1.2 !important;
}

.paytable-desc small {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  line-height: 1.2 !important;
}

.paytable-grid-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .paytable-grid-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.paytable-mini-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 8px 4px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.mini-card-icon {
  font-size: 1.1rem !important;
  line-height: 1 !important;
}

.mini-card-name {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
}

.mini-card-mult {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  color: #34d399 !important;
}

/* ==========================================================================
   🎲 Tab 2: Lucky Dice (Velvet Craps Table Aesthetics)
   ========================================================================== */
.dice-game-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 4px 2px !important;
}

.stepper-symbol {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  user-select: none !important;
  pointer-events: none !important;
}

.dice-arena-frame {
  width: 100% !important;
  max-width: 100% !important;
  padding: 16px !important;
  background: radial-gradient(circle at center, #064e3b 0%, #022c22 70%, #01140e 100%) !important;
  border: 2px solid #10b981 !important;
  border-radius: 18px !important;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.2) !important;
  box-sizing: border-box !important;
}

.dice-box-wrapper {
  display: flex !important;
  gap: 24px !important;
  justify-content: center !important;
  align-items: center !important;
  perspective: 600px !important;
}

.dice-box-wrapper.arena-shake {
  animation: casinoArenaShake 0.4s ease-in-out infinite alternate !important;
}

@keyframes casinoArenaShake {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.02);
  }

  100% {
    transform: translateY(3px) scale(0.99);
  }
}

.casino-die {
  font-family: 'Cinzel', 'Outfit', serif, sans-serif !important;
  font-size: 3.2rem !important;
  font-weight: 900 !important;
  width: 86px !important;
  height: 86px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
  color: #dc2626 !important;
  border-radius: 18px !important;
  border: 3px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -3px 6px rgba(0, 0, 0, 0.12) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
  user-select: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  transform-style: preserve-3d !important;
}

/* 🎲 Equipped Dice Cosmetic Skins for Casino (16 Sets) */

/* 1. Default Ivory White 🎲 */
.skin-dice_default .casino-die,
.skin-default .casino-die,
.casino-die.skin-dice_default,
.casino-die.skin-default {
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 3px solid #cbd5e1 !important;
  color: #dc2626 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -3px 6px rgba(0, 0, 0, 0.12) !important;
}

/* 2. Ruby Crystal 💎 */
.skin-dice_ruby .casino-die,
.skin-ruby .casino-die,
.skin-dice_red .casino-die,
.skin-red .casino-die,
.casino-die.skin-dice_ruby,
.casino-die.skin-ruby,
.casino-die.skin-dice_red,
.casino-die.skin-red {
  background: linear-gradient(145deg, #ef4444 0%, #991b1b 100%) !important;
  border: 2.5px solid #fca5a5 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #f87171 !important;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.65), inset 0 2px 4px rgba(254, 202, 202, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 3. Oceanic Sapphire 🔷 */
.skin-dice_sapphire .casino-die,
.skin-sapphire .casino-die,
.skin-dice_blue .casino-die,
.skin-blue .casino-die,
.casino-die.skin-dice_sapphire,
.casino-die.skin-sapphire,
.casino-die.skin-dice_blue,
.casino-die.skin-blue {
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%) !important;
  border: 2.5px solid #7dd3fc !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #38bdf8 !important;
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.7), inset 0 2px 4px rgba(186, 230, 253, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 4. Forest Emerald 🟢 */
.skin-dice_emerald .casino-die,
.skin-emerald .casino-die,
.skin-dice_green .casino-die,
.skin-green .casino-die,
.casino-die.skin-dice_emerald,
.casino-die.skin-emerald,
.casino-die.skin-dice_green,
.casino-die.skin-green {
  background: linear-gradient(145deg, #10b981 0%, #047857 50%, #064e3b 100%) !important;
  border: 2.5px solid #6ee7b7 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #34d399 !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.7), inset 0 2px 4px rgba(167, 243, 208, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 5. Solar Amber 🧡 */
.skin-dice_amber .casino-die,
.skin-amber .casino-die,
.skin-dice_orange .casino-die,
.skin-orange .casino-die,
.casino-die.skin-dice_amber,
.casino-die.skin-amber,
.casino-die.skin-dice_orange,
.casino-die.skin-orange {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #7c2d12 100%) !important;
  border: 2.5px solid #fdba74 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #fb923c !important;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.7), inset 0 2px 4px rgba(254, 215, 170, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 6. Mystic Amethyst 💜 */
.skin-dice_amethyst .casino-die,
.skin-amethyst .casino-die,
.skin-dice_purple .casino-die,
.skin-purple .casino-die,
.casino-die.skin-dice_amethyst,
.casino-die.skin-amethyst,
.casino-die.skin-dice_purple,
.casino-die.skin-purple {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 50%, #4c1d95 100%) !important;
  border: 2.5px solid #c4b5fd !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #a78bfa !important;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.7), inset 0 2px 4px rgba(221, 214, 254, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 7. Radiant Topaz 💛 */
.skin-dice_topaz .casino-die,
.skin-topaz .casino-die,
.skin-dice_yellow .casino-die,
.skin-yellow .casino-die,
.casino-die.skin-dice_topaz,
.casino-die.skin-topaz,
.casino-die.skin-dice_yellow,
.casino-die.skin-yellow {
  background: linear-gradient(145deg, #eab308 0%, #ca8a04 50%, #713f12 100%) !important;
  border: 2.5px solid #fef08a !important;
  color: #451a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 28px rgba(234, 179, 8, 0.7), inset 0 2px 4px rgba(254, 240, 138, 0.8), inset 0 -3px 6px rgba(0, 0, 0, 0.3) !important;
}

/* 8. Sakura Blossom Pink 🩷 */
.skin-dice_sakura .casino-die,
.skin-sakura .casino-die,
.skin-dice_pink .casino-die,
.skin-pink .casino-die,
.casino-die.skin-dice_sakura,
.casino-die.skin-sakura,
.casino-die.skin-dice_pink,
.casino-die.skin-pink {
  background: linear-gradient(145deg, #ec4899 0%, #be185d 50%, #831843 100%) !important;
  border: 2.5px solid #fbcfe8 !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px #f472b6 !important;
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.7), inset 0 2px 4px rgba(251, 207, 232, 0.7), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 9. Tactical Obsidian 🖤 */
.skin-dice_obsidian .casino-die,
.skin-obsidian .casino-die,
.skin-dice_black .casino-die,
.skin-black .casino-die,
.casino-die.skin-dice_obsidian,
.casino-die.skin-obsidian,
.casino-die.skin-dice_black,
.casino-die.skin-black {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border: 2.5px solid #64748b !important;
  color: #ef4444 !important;
  text-shadow: 0 0 10px #dc2626, 0 0 16px #ef4444 !important;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.5), inset 0 2px 4px rgba(148, 163, 184, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.6) !important;
}

/* 10. Arctic Glaciar Crystal 🧊 */
.skin-dice_cyan .casino-die,
.skin-cyan .casino-die,
.skin-dice_ice .casino-die,
.skin-ice .casino-die,
.casino-die.skin-dice_cyan,
.casino-die.skin-cyan,
.casino-die.skin-dice_ice,
.casino-die.skin-ice {
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 2.5px solid #bae6fd !important;
  color: #ffffff !important;
  text-shadow: 0 0 10px #38bdf8, 0 0 16px #0284c7 !important;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.8), inset 0 2px 4px rgba(224, 242, 254, 0.8), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 11. Prismatic Diamond 💎 */
.skin-dice_diamond .casino-die,
.skin-diamond .casino-die,
.casino-die.skin-dice_diamond,
.casino-die.skin-diamond {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 30%, #fdf4ff 60%, #e2e8f0 100%) !important;
  border: 2.8px solid #ffffff !important;
  color: #0f172a !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 10px 32px rgba(255, 255, 255, 0.95), inset 0 2px 6px rgba(255, 255, 255, 1), inset 0 -3px 6px rgba(0, 0, 0, 0.2) !important;
  animation: diamondSparklePulse 2s infinite alternate ease-in-out !important;
}

/* 12. Pure 24K Gold ⬡ */
.skin-dice_gold .casino-die,
.skin-gold .casino-die,
.casino-die.skin-dice_gold,
.casino-die.skin-gold {
  background: linear-gradient(145deg, #fbbf24 0%, #d97706 50%, #b45309 100%) !important;
  border: 2.5px solid #fef08a !important;
  color: #451a03 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.85), inset 0 2px 4px rgba(254, 240, 138, 0.9), inset 0 -3px 6px rgba(0, 0, 0, 0.3) !important;
  animation: goldSparkleGlow 2s infinite alternate ease-in-out !important;
}

/* 13. Chromatic Rainbow RGB 🌈 */
.skin-dice_rainbow .casino-die,
.skin-rainbow .casino-die,
.casino-die.skin-dice_rainbow,
.casino-die.skin-rainbow {
  background: linear-gradient(135deg, #ef4444, #f59e0b, #10b981, #06b6d4, #8b5cf6, #ec4899, #ef4444) !important;
  background-size: 300% 300% !important;
  border: 2.5px solid #ffffff !important;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.95), 0 0 14px #ffffff !important;
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -3px 6px rgba(0, 0, 0, 0.3) !important;
  animation: rainbowDiceShift 3.5s ease infinite !important;
}

/* 14. Inferno Fire 🔥 */
.skin-dice_fire .casino-die,
.skin-fire .casino-die,
.casino-die.skin-dice_fire,
.casino-die.skin-fire {
  background: linear-gradient(145deg, #f97316 0%, #c2410c 100%) !important;
  border: 2.5px solid #fed7aa !important;
  color: #fff7ed !important;
  text-shadow: 0 0 8px #f59e0b, 0 0 16px #ea580c !important;
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.85), inset 0 2px 4px rgba(253, 230, 138, 0.8), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
  animation: diceFirePulse 1.8s infinite alternate ease-in-out !important;
}

/* 15. Cyberpunk Neon ⚡ */
.skin-dice_neon .casino-die,
.skin-neon .casino-die,
.casino-die.skin-dice_neon,
.casino-die.skin-neon {
  background: linear-gradient(145deg, #06b6d4 0%, #4f46e5 100%) !important;
  border: 2.5px solid #67e8f9 !important;
  color: #ffffff !important;
  text-shadow: 0 0 10px #22d3ee, 0 0 20px #06b6d4 !important;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.85), inset 0 2px 4px rgba(165, 243, 252, 0.8), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 16. Cosmic Galaxy 🌌 */
.skin-dice_cosmic .casino-die,
.skin-cosmic .casino-die,
.casino-die.skin-dice_cosmic,
.casino-die.skin-cosmic {
  background: linear-gradient(145deg, #a855f7 0%, #3b0764 100%) !important;
  border: 2.5px solid #e9d5ff !important;
  color: #faf5ff !important;
  text-shadow: 0 0 10px #c084fc, 0 0 20px #9333ea !important;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.85), inset 0 2px 4px rgba(233, 213, 255, 0.8), inset 0 -3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Enhanced 3D Physics Rolling Animations */
.casino-die.rolling,
.casino-die.rolling-1 {
  animation: casinoDieTumble1 0.22s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  filter: blur(0.3px) !important;
}

.casino-die.rolling-2 {
  animation: casinoDieTumble2 0.25s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  filter: blur(0.3px) !important;
}

@keyframes casinoDieTumble1 {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.94);
  }

  25% {
    transform: translateY(-16px) rotate(90deg) scale(1.12);
  }

  50% {
    transform: translateY(6px) rotate(180deg) scale(0.92);
  }

  75% {
    transform: translateY(-12px) rotate(270deg) scale(1.08);
  }

  100% {
    transform: translateY(0) rotate(360deg) scale(0.94);
  }
}

@keyframes casinoDieTumble2 {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.94);
  }

  25% {
    transform: translateY(-14px) rotate(-90deg) scale(1.10);
  }

  50% {
    transform: translateY(8px) rotate(-180deg) scale(0.90);
  }

  75% {
    transform: translateY(-18px) rotate(-270deg) scale(1.14);
  }

  100% {
    transform: translateY(0) rotate(-360deg) scale(0.94);
  }
}

.casino-die.landed {
  animation: casinoDieImpact 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes casinoDieImpact {
  0% {
    transform: scale(1.28) translateY(-14px);
  }

  45% {
    transform: scale(0.86) translateY(5px);
  }

  75% {
    transform: scale(1.08) translateY(-2px);
  }

  100% {
    transform: scale(1) translateY(0);
  }
}

.casino-die.winner {
  animation: casinoDieWinPulse 1.2s infinite alternate ease-in-out !important;
}

@keyframes casinoDieWinPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  100% {
    transform: scale(1.1) translateY(-3px);
    filter: brightness(1.25) drop-shadow(0 0 16px #fbbf24);
  }
}

.casino-die.loser {
  opacity: 0.88 !important;
}

/* Prediction Cards */
.dice-prediction-selector {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

.prediction-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 12px 8px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  outline: none !important;
  user-select: none !important;
}

.prediction-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
}

.prediction-btn:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  transform: translateY(-2px) !important;
}

.prediction-btn .pred-icon {
  font-size: 1.3rem !important;
  margin-bottom: 2px !important;
}

.prediction-btn .pred-title {
  font-size: 0.88rem !important;
  font-weight: 900 !important;
}

.prediction-btn .pred-subtitle {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  margin-top: 1px !important;
}

.prediction-btn .pred-mult {
  font-size: 0.78rem !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  margin-top: 4px !important;
  background: rgba(251, 191, 36, 0.15) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.prediction-btn.pred-exact.active {
  background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5), 0 0 12px rgba(251, 191, 36, 0.4) !important;
  transform: translateY(-2px) !important;
}

.prediction-btn.pred-under.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5) !important;
  transform: translateY(-2px) !important;
}

.prediction-btn.pred-over.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5) !important;
  transform: translateY(-2px) !important;
}

.pred-badge-hot {
  position: absolute !important;
  top: -8px !important;
  right: -4px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8) !important;
}

/* ==========================================================================
   🏆 Tab 3: Top Magnates Ranking
   ========================================================================== */
.casino-ranking-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

.casino-ranking-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
}

.ranking-header-icon {
  font-size: 1.8rem !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6)) !important;
}

.ranking-header-text {
  display: flex !important;
  flex-direction: column !important;
}

.ranking-header-title {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.05em !important;
}

.ranking-header-subtitle {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
}

.casino-ranking-list {
  max-height: 250px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding-right: 4px !important;
}

.casino-rank-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 14px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  font-size: 0.88rem !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.casino-rank-item:hover {
  border-color: rgba(251, 191, 36, 0.4) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  transform: translateX(2px) !important;
}

.casino-rank-pos {
  font-weight: 900 !important;
  width: 28px !important;
  color: #fbbf24 !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
}

.casino-rank-user {
  flex: 1 !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin-left: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 170px !important;
}

.casino-rank-coins {
  font-weight: 900 !important;
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.15) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  flex-shrink: 0 !important;
}

.casino-rank-loading {
  text-align: center !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  padding: 20px !important;
}

/* ==========================================================================
   Casino Responsive Breakpoints
   ========================================================================== */
@media (max-width: 580px) {
  .slots-arcade-frame {
    padding: 12px 10px !important;
    border-width: 3px !important;
    border-radius: 20px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .slots-machine-stage {
    padding: 0 4px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .slots-reels-window {
    height: 180px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .slot-lever-container {
    right: 2px !important;
    width: 22px !important;
    height: 110px !important;
  }

  .reel-cell .slot-sym-token {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .reel-cell.center-cell .slot-sym-token {
    width: 62px !important;
    height: 62px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .casino-die {
    width: 68px !important;
    height: 68px !important;
    font-size: 2.6rem !important;
  }

  .casino-hero-subtitle,
  .banco-kmkz-hero-subtitle,
  .monopoly-hero-subtitle {
    display: none !important;
  }

  .casino-hero-title,
  .banco-kmkz-hero-title,
  .monopoly-hero-title {
    font-size: 1.05rem !important;
  }

  .btn-casino-hero,
  .btn-banco-kmkz-hero,
  .btn-monopoly-hero {
    min-height: 58px !important;
    padding: 12px 14px !important;
  }

  .casino-hero-icon,
  .banco-kmkz-hero-icon,
  .monopoly-hero-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.9rem !important;
  }

  .casino-hero-badge,
  .banco-kmkz-hero-badge,
  .monopoly-hero-badge {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    height: 22px !important;
  }

  .dice-prediction-selector {
    gap: 6px !important;
  }

  .prediction-btn {
    padding: 10px 4px !important;
  }

  .prediction-btn .pred-title {
    font-size: 0.8rem !important;
  }

  .prediction-btn .pred-subtitle {
    font-size: 0.7rem !important;
  }
}

@media (max-width: 420px) {
  .casino-panel {
    padding: 10px 8px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .slots-arcade-frame {
    padding: 10px 6px !important;
    border-width: 2px !important;
    border-radius: 16px !important;
  }

  .slots-machine-stage {
    padding: 0 2px !important;
  }

  .slots-reels-window {
    height: 156px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .reel-cell {
    height: 52px !important;
  }

  .slot-lever-container {
    right: 2px !important;
    width: 16px !important;
    height: 90px !important;
  }

  .reel-cell .slot-sym-token {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .reel-cell.center-cell .slot-sym-token {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .casino-die {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.95rem !important;
  }

  .bet-chips {
    justify-content: center !important;
    width: 100% !important;
  }

  .casino-bet-controls {
    justify-content: center !important;
  }

  .casino-payout-card {
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .casino-result-badge {
    font-size: 0.74rem !important;
    padding: 5px 8px !important;
    min-height: 34px !important;
    line-height: 1.3 !important;
  }

  .slot-result-bonus-line {
    font-size: 0.7rem !important;
  }

  .slot-cms-luck-pill {
    flex-wrap: wrap !important;
    justify-content: center !important;
    border-radius: 14px !important;
    padding: 4px 8px !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .slot-cms-luck-inner {
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
    flex-wrap: wrap !important;
  }

  .slot-cms-luck-link {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   ENHANCED ACCESSIBLE & RESPONSIVE SOCIAL FRIENDS LIST
   ========================================================================== */

#social-friends-list-container,
.social-friends-list-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  max-height: min(520px, calc(100vh - 280px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 4px 6px 12px 2px !important;
  -webkit-overflow-scrolling: touch !important;
  -webkit-transform: translateZ(0) !important;
  transform: translateZ(0) !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  contain: content !important;
  will-change: scroll-position !important;
}

#social-friends-list-container::-webkit-scrollbar,
.social-friends-list-container::-webkit-scrollbar {
  width: 6px !important;
}

#social-friends-list-container::-webkit-scrollbar-track,
.social-friends-list-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 4px !important;
}

#social-friends-list-container::-webkit-scrollbar-thumb,
.social-friends-list-container::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35) !important;
  border-radius: 4px !important;
}

#social-friends-list-container::-webkit-scrollbar-thumb:hover,
.social-friends-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6) !important;
}

/* Individual Social Card Item */
.social-item-card,
.social-friend-card,
.social-player-card,
.social-room-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 12px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
  min-height: 48px !important;
  -webkit-transform: translateZ(0) !important;
  transform: translateZ(0) !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  contain: layout style !important;
}

.social-item-card:hover,
.social-friend-card:hover,
.social-player-card:hover,
.social-room-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.15) !important;
}

.social-item-card.is-online,
.social-friend-card.is-online {
  border-color: rgba(52, 211, 153, 0.35) !important;
}

.social-item-card.is-in-game,
.social-room-card {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.15) !important;
}

/* Left Section: Avatar + Info */
.social-card-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.social-avatar-wrapper {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 44px !important;
  height: 44px !important;
}

.social-avatar-circle {
  width: 44px !important;
  height: 44px !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.35rem !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  user-select: none !important;
  overflow: visible !important;
}

.social-avatar-circle svg,
.social-avatar-circle img,
.pending-request-avatar svg,
.pending-request-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.lobby-player-avatar-circle svg,
.lobby-player-avatar-circle img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

.social-status-dot {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  border: 2px solid #0f172a !important;
}

.social-status-dot.online {
  background: #34d399 !important;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8) !important;
}

.social-status-dot.offline {
  background: #64748b !important;
}

.social-status-dot.ingame {
  background: #f59e0b !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8) !important;
}

.social-card-details {
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.social-card-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.social-card-name {
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 170px !important;
}

.social-card-elo-badge {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.15) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  flex-shrink: 0 !important;
}

.social-card-status-text {
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Minimalist Room Meta Badges for Waiting Rooms (KMKZ Center) */
.social-room-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  margin-top: 3px !important;
  min-width: 0 !important;
}

.room-meta-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  letter-spacing: 0.2px !important;
  box-sizing: border-box !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.room-meta-chip.chip-players-open {
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

.room-meta-chip.chip-players-warning {
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.room-meta-chip.chip-players-full {
  background: rgba(239, 68, 68, 0.14) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}

.room-meta-chip.chip-mode {
  background: rgba(168, 85, 247, 0.14) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #c084fc !important;
}

.room-meta-chip.chip-map {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

.room-meta-chip.chip-points {
  background: rgba(234, 179, 8, 0.12) !important;
  border: 1px solid rgba(234, 179, 8, 0.35) !important;
  color: #facc15 !important;
}

.room-meta-chip.chip-timer {
  background: rgba(148, 163, 184, 0.12) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #cbd5e1 !important;
}

.room-meta-chip.chip-bots {
  background: rgba(99, 102, 241, 0.14) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
}

.social-room-card.room-card-open:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.22), 0 0 12px rgba(245, 158, 11, 0.15) !important;
}

.social-room-card.room-card-full {
  opacity: 0.8 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Right Section: Action Buttons */
.social-card-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

/* Accessible Action Buttons */
.btn-social-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  min-height: 38px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  border: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  touch-action: manipulation !important;
  user-select: none !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.btn-social-action:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6) !important;
}

.btn-social-action.primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
}

.btn-social-action.primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.5) !important;
}

.btn-social-action.primary:active {
  transform: translateY(0) !important;
}

.btn-social-action.blue {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.35) !important;
}

.btn-social-action.blue:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.5) !important;
}

.btn-social-action.blue:active {
  transform: translateY(0) !important;
}

.btn-social-action.amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #000000 !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35) !important;
}

.btn-social-action.amber:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(245, 158, 11, 0.5) !important;
}

.btn-social-action.amber:active {
  transform: translateY(0) !important;
}

.btn-social-action.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35) !important;
}

.btn-social-action.purple:hover {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.5) !important;
}

.btn-social-action.secondary {
  background: rgba(168, 85, 247, 0.18) !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  color: #c084fc !important;
}

.btn-social-action.secondary:hover {
  background: rgba(168, 85, 247, 0.3) !important;
  color: #f3e8ff !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
}

.btn-social-action.danger {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #fca5a5 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.35) !important;
}

.btn-social-action.danger:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #fee2e2 !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-1px) !important;
}

.btn-social-action.icon-only {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
}

.social-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

.social-status-pill.friend {
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.15) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

.social-status-pill.pending {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

/* Pending Requests Section */
.pending-request-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.pending-request-text {
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  color: #ffffff !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Responsive Media Queries */
@media (max-width: 580px) {

  #social-friends-list-container,
  .social-friends-list-container {
    gap: 6px !important;
    padding: 2px 2px 8px 2px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    max-height: min(540px, calc(100vh - 250px)) !important;
  }

  .social-empty-state {
    padding: 10px 12px !important;
    gap: 10px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .social-empty-icon,
  .social-empty-icon.ui-svg-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    flex: 0 0 32px !important;
    font-size: 1.05rem !important;
    border-radius: 9px !important;
  }

  .social-empty-icon svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }

  .social-empty-text {
    font-size: 0.77rem !important;
    line-height: 1.35 !important;
  }

  .social-item-card,
  .social-friend-card,
  .social-player-card,
  .social-room-card {
    padding: 7px 10px !important;
    gap: 8px !important;
    border-radius: 12px !important;
    min-height: 44px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .social-card-left {
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .social-avatar-wrapper {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  .social-avatar-circle {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .social-status-dot {
    width: 10px !important;
    height: 10px !important;
    border-width: 1.5px !important;
  }

  .social-card-details {
    gap: 1px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .social-card-name-row {
    gap: 4px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .social-card-name {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    max-width: 115px !important;
    font-size: 0.80rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .social-card-elo-badge {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }

  .devops-legend-badge,
  .prestige-tier-badge-mini {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
    flex-shrink: 0 !important;
  }

  .social-card-status-text {
    font-size: 0.70rem !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .social-room-meta-row {
    gap: 3px !important;
    margin-top: 2px !important;
  }

  .room-meta-chip {
    font-size: 0.7rem !important;
    padding: 1.5px 5px !important;
    border-radius: 5px !important;
    gap: 3px !important;
  }

  .social-card-actions {
    gap: 4px !important;
    border-top: none !important;
    padding-top: 0 !important;
    width: auto !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  .btn-social-action {
    padding: 5px 8px !important;
    font-size: 0.70rem !important;
    min-height: 30px !important;
    border-radius: 8px !important;
    gap: 3px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .btn-social-action.icon-only {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .social-status-pill {
    padding: 3px 7px !important;
    font-size: 0.7rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  .pending-request-item {
    flex-wrap: wrap !important;
    padding: 8px 10px !important;
    border-radius: 11px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Spectate Room Card 2-Tier Stack on Mobile */
  .social-room-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .social-room-card .social-card-left {
    width: 100% !important;
    min-width: 0 !important;
  }

  .social-room-card .social-card-actions {
    width: 100% !important;
    justify-content: stretch !important;
    padding-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .social-room-card .btn-spectate-room-direct {
    width: 100% !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    min-height: 32px !important;
  }

  .spectate-players-summary {
    gap: 4px !important;
    margin-top: 4px !important;
    flex-wrap: wrap !important;
  }

  /* Reconnect Banner on Mobile */
  #social-active-game-banner {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
  }

  #social-active-game-banner>div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  #social-active-game-banner .ui-svg-icon {
    font-size: 1.4rem !important;
  }

  #social-active-game-banner button {
    flex: 1 1 auto !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 0.80rem !important;
  }
}

@media (max-width: 440px) {

  .social-empty-state {
    padding: 8px 10px !important;
    gap: 8px !important;
    min-height: 42px !important;
    border-radius: 10px !important;
  }

  .social-empty-icon,
  .social-empty-icon.ui-svg-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    flex: 0 0 28px !important;
    font-size: 0.95rem !important;
    border-radius: 7px !important;
  }

  .social-empty-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
  }

  .social-empty-text {
    font-size: 0.73rem !important;
    line-height: 1.3 !important;
  }

  .social-item-card,
  .social-friend-card,
  .social-player-card,
  .social-room-card {
    padding: 5px 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    min-height: 40px !important;
  }

  .social-card-left {
    gap: 6px !important;
  }

  .social-avatar-wrapper {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
  }

  .social-avatar-circle {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.95rem !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .social-status-dot {
    width: 8px !important;
    height: 8px !important;
    border-width: 1.5px !important;
  }

  .social-card-name {
    max-width: 90px !important;
    font-size: 0.76rem !important;
  }

  .social-card-elo-badge {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
  }

  .social-card-status-text {
    font-size: 0.7rem !important;
  }

  .social-card-actions {
    gap: 3px !important;
  }

  .btn-social-action {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
    min-height: 28px !important;
    border-radius: 7px !important;
    gap: 2px !important;
  }

  .btn-social-action.icon-only {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .social-status-pill {
    padding: 3px 5px !important;
    font-size: 0.7rem !important;
    border-radius: 5px !important;
  }
}

@media (max-width: 375px) {
  .social-card-name {
    max-width: 75px !important;
    font-size: 0.72rem !important;
  }

  .btn-social-action {
    padding: 4px 5px !important;
    font-size: 0.7rem !important;
  }

  .social-empty-text {
    font-size: 0.70rem !important;
  }
}

.social-filter-pills {
  display: flex !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 4px !important;
  padding: 4px 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
}

.social-filter-pills::-webkit-scrollbar {
  display: none !important;
}

.social-pill {
  padding: 6px 10px !important;
  font-size: 0.76rem !important;
  min-width: unset !important;
  flex: 1 0 auto !important;
  text-align: center !important;
  white-space: nowrap !important;
  border-radius: 8px !important;
}

@media (max-width: 480px) {
  .social-search-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .social-search-input-wrap {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 38px !important;
    padding: 0 8px 0 32px !important;
    box-sizing: border-box !important;
  }

  .social-search-icon {
    left: 10px !important;
    font-size: 0.88rem !important;
  }

  .social-search-input-wrap input,
  #social-input-add-friend {
    font-size: 0.82rem !important;
  }

  .btn-social-add-submit {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .btn-social-pending-toggle {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 481px) {
  .social-search-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .social-search-input-wrap {
    height: 38px !important;
    padding: 0 8px 0 32px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .social-search-icon {
    left: 10px !important;
    font-size: 0.88rem !important;
  }

  .social-search-input-wrap input,
  #social-input-add-friend {
    font-size: 0.82rem !important;
  }

  .btn-social-add-submit {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    flex: 0 0 38px !important;
  }

  .btn-social-pending-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    flex: 0 0 38px !important;
  }
}


/* ==========================================================================
   🔀 CHAOS BOARD GAME MODE STYLES & ANIMATIONS
   ========================================================================== */

/* Floating Countdown Pill on Board HUD */
.chaos-spin-pill {
  position: absolute !important;
  top: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 120 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 16px !important;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.96), rgba(15, 23, 42, 0.98)) !important;
  border: 1.8px solid #a855f7 !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 22px rgba(168, 85, 247, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(12px) !important;
  cursor: default !important;
  overflow: hidden !important;
  user-select: none !important;
  pointer-events: auto !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.chaos-spin-pill.hidden {
  display: none !important;
}

.chaos-spin-pill-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.25), rgba(236, 72, 153, 0.35));
  pointer-events: none;
  z-index: 1;
  transition: width 0.4s ease;
}

.chaos-spin-pill-glow {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.4);
  pointer-events: none;
  z-index: 2;
}

.chaos-spin-icon {
  font-size: 1.15rem;
  z-index: 3;
  animation: chaosIconPulse 2.2s infinite ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes chaosIconPulse {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.6));
  }

  50% {
    transform: scale(1.18) rotate(180deg);
    filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.9));
  }
}

.chaos-spin-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  z-index: 3;
}

.chaos-spin-title {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #c084fc;
  text-transform: uppercase;
}

.chaos-spin-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  font-family: inherit;
}

/* Warning State (2 rolls left) */
.chaos-spin-pill.chaos-spin-warning {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  animation: chaosWarningPulse 1.2s infinite ease-in-out alternate;
}

.chaos-spin-pill.chaos-spin-warning .chaos-spin-title {
  color: #fbbf24;
}

.chaos-spin-pill.chaos-spin-warning .chaos-spin-count {
  color: #fef08a;
}

@keyframes chaosWarningPulse {
  0% {
    transform: translateX(-50%) scale(1);
  }

  100% {
    transform: translateX(-50%) scale(1.05);
  }
}

/* Critical State (1 roll left) */
.chaos-spin-pill.chaos-spin-critical {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.98), rgba(127, 29, 29, 0.98));
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.7), inset 0 0 12px rgba(248, 113, 113, 0.5);
  animation: chaosCriticalThrob 0.65s infinite ease-in-out alternate;
}

.chaos-spin-pill.chaos-spin-critical .chaos-spin-title {
  color: #fca5a5;
}

.chaos-spin-pill.chaos-spin-critical .chaos-spin-count {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}

@keyframes chaosCriticalThrob {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  }

  100% {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.95);
  }
}

/* Floating Notification Banner for Chaos Spin (Unobtrusive & Non-blocking) */
.chaos-spin-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chaosBannerSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes chaosBannerSlideDown {
  0% {
    opacity: 0;
    transform: translate(-50%, -20px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.chaos-spin-banner-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-radius: 9999px;
  border: 1.8px solid #c084fc;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.98));
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.chaos-spin-portal-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #a855f7, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.85);
  animation: chaosPortalVortex 1.6s linear infinite;
  flex-shrink: 0;
}

.chaos-spin-portal-icon {
  font-size: 1.25rem;
  display: inline-block;
  animation: chaosIconSpin 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes chaosPortalVortex {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.12);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.9);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes chaosIconSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.chaos-spin-banner-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.chaos-spin-banner-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #f0abfc, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.chaos-spin-banner-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.chaos-sub-badge {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* Board Shake & Spin Animation on Canvas */
canvas.chaos-board-spinning {
  animation: chaosCanvasRumble 0.5s ease-in-out infinite alternate !important;
  filter: hue-rotate(90deg) brightness(1.2) !important;
  transition: filter 0.3s ease !important;
}

@keyframes chaosCanvasRumble {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  25% {
    transform: translate(-3px, 3px) scale(1.015) rotate(0.4deg);
  }

  50% {
    transform: translate(3px, -2px) scale(0.99) rotate(-0.4deg);
  }

  75% {
    transform: translate(-2px, -3px) scale(1.01) rotate(0.2deg);
  }

  100% {
    transform: translate(2px, 2px) scale(1) rotate(0deg);
  }
}

/* ==========================================================================
   PLAYER CHIP CARDS — New Single-Row Design (all player counts)
   ========================================================================== */

/* Bar: force single-row scroll, equal-width chips */
#players-list.players-chip-bar,
.players-top-bar.players-chip-bar {
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  gap: 5px !important;
  padding: 3px 6px !important;
  align-items: stretch !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

/* Chip card base — Ultra-Compact HUD */
#game-screen .hex-player-pod.player-chip,
.hex-player-pod.player-chip {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-width: 122px !important;
  max-width: 175px !important;
  flex: 1 1 122px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.94) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

/* Optimizacion de ancho para 4+ jugadores */
#players-list.has-many-players .hex-player-pod.player-chip,
.hex-player-pod.player-chip.many-players {
  min-width: 118px !important;
  flex: 1 1 118px !important;
}

.hex-player-pod.player-chip:hover,
.hex-player-pod.player-chip:focus {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.6) !important;
}

.hex-player-pod.player-chip.active-turn {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5), 0 2px 8px rgba(0, 0, 0, 0.55) !important;
}

.hex-player-pod.player-chip.is-myself {
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.12), 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.hex-player-pod.player-chip.active-turn.is-myself {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55), inset 0 0 10px rgba(56, 189, 248, 0.2), 0 3px 10px rgba(0, 0, 0, 0.65) !important;
}

/* Left color accent bar */
.chip-color-bar {
  width: 3.5px !important;
  flex-shrink: 0 !important;
  border-radius: 8px 0 0 8px !important;
  opacity: 0.95 !important;
}

/* Right content area */
.chip-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 2.5px 5px !important;
  gap: 2px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  width: calc(100% - 3.5px) !important;
}

.chip-name-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
  line-height: 1 !important;
}

.chip-name {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  min-width: 0 !important;
  line-height: 1 !important;
}

.chip-turn-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: #fbbf24 !important;
  box-shadow: 0 0 5px #fbbf24 !important;
  flex-shrink: 0 !important;
  animation: turnDotPulse 1.2s ease-in-out infinite alternate !important;
}

@keyframes turnDotPulse {
  from {
    opacity: 0.6;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1.15);
  }
}

.chip-stat.vp {
  background: rgba(251, 191, 36, 0.22) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fbbf24 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 1px 3.5px !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.chip-stat.vp b {
  color: #fbbf24 !important;
  font-weight: 900 !important;
}

.chip-stats-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2.5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 18px !important;
  align-items: stretch !important;
}

.chip-mini-stat {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0 2.5px !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2.5px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

.chip-mini-stat svg,
.chip-mini-stat .chip-svg {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  max-width: 11px !important;
  min-height: 11px !important;
  max-height: 11px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.chip-mini-stat b {
  font-weight: 800 !important;
  color: #fff !important;
  font-size: 0.68rem !important;
  letter-spacing: -0.25px !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* Optimización extra para 4+ jugadores */
#players-list.has-many-players .chip-stats-row,
.hex-player-pod.player-chip.many-players .chip-stats-row {
  gap: 2px !important;
}

#players-list.has-many-players .chip-mini-stat,
.hex-player-pod.player-chip.many-players .chip-mini-stat {
  padding: 0 1.5px !important;
  gap: 2px !important;
}

#players-list.has-many-players .chip-mini-stat svg,
.hex-player-pod.player-chip.many-players .chip-mini-stat svg {
  width: 10.5px !important;
  height: 10.5px !important;
  min-width: 10.5px !important;
  max-width: 10.5px !important;
}

#players-list.has-many-players .chip-mini-stat b,
.hex-player-pod.player-chip.many-players .chip-mini-stat b {
  font-size: 0.66rem !important;
  letter-spacing: -0.3px !important;
}

.chip-mini-stat.gold-owner {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 4px rgba(251, 191, 36, 0.3) !important;
}

.chip-mini-stat.gold-owner b {
  color: #fbbf24 !important;
}

.chip-mini-stat.hand.over {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
  animation: chipOverLimitPulse 1s ease-in-out infinite alternate !important;
}

@keyframes chipOverLimitPulse {
  from {
    box-shadow: none;
  }

  to {
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
  }
}


/* ==========================================================================
   PLAYER DETAIL DRAWER — Bottom Sheet on Tap
   ========================================================================== */

.player-detail-drawer {
  position: fixed !important;
  left: 50% !important;
  bottom: 0 !important;
  transform: translateX(-50%) translateY(100%) !important;
  width: min(480px, 100vw) !important;
  z-index: 2500 !important;
  background: linear-gradient(180deg, rgba(13, 20, 38, 0.99) 0%, rgba(10, 14, 26, 0.99) 100%) !important;
  border-radius: 20px 20px 0 0 !important;
  padding: 0 0 max(env(safe-area-inset-bottom, 0px), 12px) !important;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.8), 0 -2px 8px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1) !important;
  pointer-events: auto !important;
}

.player-detail-drawer.drawer-open {
  transform: translateX(-50%) translateY(0) !important;
}

.player-detail-drawer.drawer-exit {
  transform: translateX(-50%) translateY(100%) !important;
  transition: transform 0.22s ease-in !important;
}

.drawer-handle-bar {
  width: 36px !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 2px !important;
  margin: 10px auto 0 !important;
}

.drawer-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 16px 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.drawer-color-swatch {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 8px currentColor !important;
}

.drawer-name-block {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.drawer-player-name {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
}

.drawer-player-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}

/* 5-cell grid for key stats */
.drawer-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 6px !important;
  padding: 12px 14px 8px !important;
}

.drawer-stat-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  padding: 8px 4px !important;
  min-width: 0 !important;
}

.drawer-stat-cell.gold {
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

.drawer-stat-cell.danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  animation: drawerDangerPulse 1s ease-in-out infinite alternate !important;
}

@keyframes drawerDangerPulse {
  from {
    box-shadow: none;
  }

  to {
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.3);
  }
}

.drawer-stat-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
}

.drawer-stat-val {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1 !important;
}

.drawer-stat-label {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Stock row: roads/settlements/cities remaining */
.drawer-stock-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  padding: 8px 14px 4px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  margin-top: 0 !important;
}

.drawer-stock-item {
  font-size: 0.78rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.drawer-stock-item b {
  color: #fff !important;
  font-size: 0.88rem !important;
  font-weight: 900 !important;
}

.drawer-stock-item small {
  font-size: 0.7rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   👤 Modal Universal: Tarjeta Flotante de Inspección de Jugador (Player Inspect Card)
   ========================================================================== */
.player-inspect-card-wrap {
  --player-accent: #38bdf8;
  width: 95vw !important;
  max-width: 365px !important;
  max-height: calc(100vh - 16px) !important;
  margin: auto !important;
  background: linear-gradient(168deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 29, 0.99) 100%) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1.5px solid color-mix(in srgb, var(--player-accent, #38bdf8) 75%, rgba(255, 255, 255, 0.8)) !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 60px -8px rgba(0, 0, 0, 0.9), 0 0 35px -5px color-mix(in srgb, var(--player-accent, #38bdf8) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  position: relative !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  padding: 10px 14px 12px !important;
  animation: inspectCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) both !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  will-change: transform, opacity;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  touch-action: pan-y !important;
}

.player-inspect-card-wrap::-webkit-scrollbar {
  display: none !important;
}

.player-inspect-card-wrap.inspect-card-animating {
  animation: inspectCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes inspectCardPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(14px);
  }

  60% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Ambient glow banner */
.inspect-banner-glow {
  position: absolute !important;
  top: -40px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 260px !important;
  height: 110px !important;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--player-accent, #38bdf8) 35%, transparent) 0%, transparent 72%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  filter: blur(24px) !important;
}

/* Top Navigation Bar */
.inspect-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  position: relative !important;
  z-index: 10 !important;
  margin-bottom: 1px !important;
}

.inspect-top-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.inspect-status-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.btn-close-inspect {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
  padding: 0 !important;
}

.btn-close-inspect:hover,
.btn-close-inspect:active {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}

.btn-unfriend-inspect {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
}

.btn-unfriend-inspect:hover,
.btn-unfriend-inspect:active {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-unfriend-inspect.hidden {
  display: none !important;
}

.inspect-status-badge {
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  padding: 1.5px 7px !important;
  border-radius: 8px !important;
  letter-spacing: 0.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.inspect-status-badge::before {
  content: '' !important;
  display: inline-block !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
}

.inspect-status-badge.online {
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  color: #4ade80 !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2) !important;
}

.inspect-status-badge.online::before {
  background: #22c55e !important;
  box-shadow: 0 0 6px #22c55e !important;
  animation: inspectPulseDot 1.8s infinite !important;
}

@keyframes inspectPulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.25);
  }
}

.inspect-status-badge.offline {
  background: rgba(148, 163, 184, 0.12) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
}

.inspect-status-badge.offline::before {
  background: #64748b !important;
}

.inspect-last-seen-text {
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
}

/* Hero Section: Identity on Left, Avatar on Right */
.inspect-hero-section {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  position: relative !important;
  z-index: 5 !important;
  padding: 0 2px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.inspect-avatar-column {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.inspect-avatar-box {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.inspect-stars-corona {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  z-index: 6 !important;
}

.inspect-orbit-star {
  position: absolute !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.88rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 4px #fbbf24) drop-shadow(0 0 10px rgba(245, 158, 11, 0.8)) !important;
  transform: translate(-50%, -50%) scale(1) !important;
  animation: orbitStarPulse 2s ease-in-out infinite alternate !important;
  user-select: none !important;
  pointer-events: none !important;
}

.inspect-orbit-star:nth-child(even) {
  animation-delay: 0.35s !important;
}

.inspect-orbit-star:nth-child(3n) {
  animation-delay: 0.7s !important;
}

@keyframes orbitStarPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.92) rotate(-6deg);
  }

  100% {
    transform: translate(-50%, -50%) scale(1.15) rotate(8deg);
  }
}

.inspect-avatar-circle,
.inspect-avatar-box .inspect-avatar-circle,
#inspect-avatar-circle {
  width: auto !important;
  min-width: 52px !important;
  height: 56px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.85rem !important;
  user-select: none !important;
  position: relative !important;
  z-index: 2 !important;
  overflow: visible !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.inspect-avatar-circle.has-prestige-stars,
.inspect-avatar-circle[class*="prestige-aura-"],
#inspect-avatar-circle[class*="prestige-aura-"] {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  animation: none !important;
}

.inspect-avatar-circle .kmkz-avatar-svg,
.inspect-avatar-circle .kmkz-sigil-icon,
#inspect-avatar-circle .kmkz-avatar-svg,
#inspect-avatar-circle .kmkz-sigil-icon {
  width: 50px !important;
  height: 50px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: visible !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65)) !important;
  transition: transform 0.25s ease !important;
}

.inspect-avatar-circle.is-hexagonal,
#inspect-avatar-circle.is-hexagonal {
  width: 58px !important;
  height: 64px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.inspect-avatar-circle.is-hexagonal .kmkz-profile-hex-svg,
#inspect-avatar-circle.is-hexagonal .kmkz-profile-hex-svg {
  width: 58px !important;
  height: 64px !important;
  overflow: visible !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Evolutive Prestige Auras for Avatars (Hero Card, Inspect, Social List) */
@keyframes auraPulseBronze {
  0% {
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.4), inset 0 0 5px rgba(205, 127, 50, 0.2);
  }

  100% {
    box-shadow: 0 0 18px rgba(205, 127, 50, 0.75), inset 0 0 9px rgba(205, 127, 50, 0.35);
  }
}

@keyframes auraPulseSilver {
  0% {
    box-shadow: 0 0 10px rgba(226, 232, 240, 0.45), inset 0 0 5px rgba(226, 232, 240, 0.25);
  }

  100% {
    box-shadow: 0 0 20px rgba(226, 232, 240, 0.8), inset 0 0 10px rgba(226, 232, 240, 0.45);
  }
}

@keyframes auraPulseGold {
  0% {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.5), inset 0 0 6px rgba(251, 191, 36, 0.3);
  }

  100% {
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.85), inset 0 0 12px rgba(251, 191, 36, 0.5);
  }
}

@keyframes auraPulsePlatinum {
  0% {
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.55), inset 0 0 7px rgba(45, 212, 191, 0.3);
  }

  100% {
    box-shadow: 0 0 26px rgba(45, 212, 191, 0.9), inset 0 0 14px rgba(45, 212, 191, 0.55);
  }
}

@keyframes auraPulseDiamond {
  0% {
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.6), inset 0 0 8px rgba(56, 189, 248, 0.35);
  }

  100% {
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.95), inset 0 0 15px rgba(56, 189, 248, 0.6);
  }
}

@keyframes auraPulseMaster {
  0% {
    box-shadow: 0 0 18px rgba(192, 132, 252, 0.65), inset 0 0 9px rgba(192, 132, 252, 0.4);
  }

  100% {
    box-shadow: 0 0 32px rgba(192, 132, 252, 1), inset 0 0 16px rgba(192, 132, 252, 0.65);
  }
}

@keyframes auraPulseImmortal {
  0% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.7), inset 0 0 10px rgba(239, 68, 68, 0.45);
  }

  100% {
    box-shadow: 0 0 36px rgba(239, 68, 68, 1), inset 0 0 18px rgba(239, 68, 68, 0.7);
  }
}

@keyframes auraPulseDeity {
  0% {
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.6), inset 0 0 12px rgba(255, 215, 0, 0.6);
  }

  100% {
    box-shadow: 0 0 42px rgba(255, 215, 0, 1), 0 0 60px rgba(245, 158, 11, 0.85), inset 0 0 22px rgba(255, 215, 0, 0.85);
  }
}

.prestige-aura-bronze {
  border-color: #cd7f32 !important;
  animation: auraPulseBronze 2.4s ease-in-out infinite alternate !important;
}

.prestige-aura-silver {
  border-color: #e2e8f0 !important;
  animation: auraPulseSilver 2.2s ease-in-out infinite alternate !important;
}

.prestige-aura-gold {
  border-color: #fbbf24 !important;
  animation: auraPulseGold 2.0s ease-in-out infinite alternate !important;
}

.prestige-aura-platinum {
  border-color: #2dd4bf !important;
  animation: auraPulsePlatinum 1.8s ease-in-out infinite alternate !important;
}

.prestige-aura-diamond {
  border-color: #38bdf8 !important;
  animation: auraPulseDiamond 1.6s ease-in-out infinite alternate !important;
}

.prestige-aura-master {
  border-color: #c084fc !important;
  animation: auraPulseMaster 1.4s ease-in-out infinite alternate !important;
}

.prestige-aura-immortal {
  border-color: #ef4444 !important;
  animation: auraPulseImmortal 1.2s ease-in-out infinite alternate !important;
}

.prestige-aura-deity {
  border-color: #ffd700 !important;
  animation: auraPulseDeity 1.0s ease-in-out infinite alternate !important;
}

/* Scoped static glow for social list avatars to avoid continuous 60fps GPU compositor repainting on Android */
#social-friends-list-container .social-avatar-circle[class*="prestige-aura-"],
.social-friends-list-container .social-avatar-circle[class*="prestige-aura-"] {
  animation: none !important;
  -webkit-transform: translateZ(0) !important;
  transform: translateZ(0) !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}

#social-friends-list-container .social-avatar-circle.prestige-aura-bronze,
.social-friends-list-container .social-avatar-circle.prestige-aura-bronze {
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.45) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-silver,
.social-friends-list-container .social-avatar-circle.prestige-aura-silver {
  box-shadow: 0 0 10px rgba(226, 232, 240, 0.5) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-gold,
.social-friends-list-container .social-avatar-circle.prestige-aura-gold {
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-platinum,
.social-friends-list-container .social-avatar-circle.prestige-aura-platinum {
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.6) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-diamond,
.social-friends-list-container .social-avatar-circle.prestige-aura-diamond {
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.65) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-master,
.social-friends-list-container .social-avatar-circle.prestige-aura-master {
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.7) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-immortal,
.social-friends-list-container .social-avatar-circle.prestige-aura-immortal {
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.75) !important;
}
#social-friends-list-container .social-avatar-circle.prestige-aura-deity,
.social-friends-list-container .social-avatar-circle.prestige-aura-deity {
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.8) !important;
}

/* Prestige Tier Badge UI Component */
.prestige-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--tier-color, #fbbf24);
  background: color-mix(in srgb, var(--tier-color, #fbbf24) 16%, rgba(15, 23, 42, 0.92));
  border: 1.5px solid var(--tier-border, #b45309);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tier-color, #fbbf24) 28%, transparent);
  user-select: none;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.prestige-tier-badge.compact {
  padding: 1.5px 5px;
  font-size: 0.7rem;
  gap: 3.5px;
}

.prestige-tier-badge:hover {
  box-shadow: 0 0 16px color-mix(in srgb, var(--tier-color, #fbbf24) 65%, transparent);
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.15);
}

.prestige-tier-badge .tier-emblem {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.prestige-tier-badge .tier-lvl-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.70em;
  font-weight: 900;
  letter-spacing: -0.2px;
  opacity: 0.95;
  color: #f8fafc;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.prestige-tier-badge.compact .tier-lvl-pill {
  font-size: 0.7em;
  padding: 0.5px 3.5px;
}

/* Rank Legend trigger buttons */
.btn-ranking-tiers-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-ranking-tiers-legend:hover {
  background: rgba(251, 191, 36, 0.28);
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.btn-inspect-view-ranks {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 0.70rem;
  font-weight: 800;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-inspect-view-ranks:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* Prestige Chamber Modal Tiers Grid */
.prestige-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.prestige-tier-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--t-border, rgba(255, 255, 255, 0.12));
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.prestige-tier-card.is-current {
  background: color-mix(in srgb, var(--t-color, #fbbf24) 15%, rgba(15, 23, 42, 0.9));
  border-color: var(--t-color, #fbbf24);
  box-shadow: 0 0 14px color-mix(in srgb, var(--t-color, #fbbf24) 40%, transparent);
}

.prestige-tier-card.is-locked {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.tier-card-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 0.78rem;
}

.tier-card-levels {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
}

.tier-card-desc {
  font-size: 0.7rem;
  color: #cbd5e1;
  line-height: 1.25;
}

.tier-current-pill {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--t-color, #fbbf24);
  color: #000;
  margin-left: auto;
}

.inspect-identity-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.inspect-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

.inspect-username {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  letter-spacing: -0.2px !important;
  line-height: 1.15 !important;
  word-break: break-word !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

.inspect-tag {
  font-size: 0.68rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 1px 5px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  letter-spacing: 0.3px !important;
  font-weight: 600 !important;
}

.inspect-player-title {
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  color: color-mix(in srgb, var(--player-accent, #38bdf8) 88%, #ffffff) !important;
  letter-spacing: 0.2px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.inspect-badges-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  margin-top: 2px !important;
}

.inspect-elo-pill,
.inspect-level-pill,
.inspect-coins-pill,
.btn-inspect-view-ranks {
  min-height: 20px !important;
  height: 20px !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 0 6px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap !important;
}

.inspect-elo-pill {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

.inspect-level-pill {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.inspect-coins-pill {
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.12) !important;
  border: 1px solid rgba(250, 204, 21, 0.38) !important;
}



/* Level & XP Progress Card (Touchable & Expandable in Player Inspect Modal) */
.inspect-level-card,
#inspect-level-card {
  background: linear-gradient(135deg, rgba(35, 22, 54, 0.68) 0%, rgba(18, 14, 34, 0.85) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: 9px !important;
  padding: 4px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 5 !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition: transform 0.18s ease, border-color 0.18s ease !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.inspect-level-card:hover,
#inspect-level-card:hover {
  background: linear-gradient(135deg, rgba(48, 28, 76, 0.82) 0%, rgba(26, 18, 50, 0.92) 100%) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px) !important;
}

.inspect-level-card:active,
#inspect-level-card:active {
  transform: scale(0.99) !important;
}

.inspect-level-card:focus-visible,
#inspect-level-card:focus-visible {
  outline: 2px solid #c084fc !important;
  outline-offset: 2px !important;
}

.inspect-level-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.inspect-level-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.inspect-level-trophy-icon {
  font-size: 0.8rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.6)) !important;
  flex-shrink: 0 !important;
}

.inspect-level-title {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #c084fc !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.inspect-level-badge-pill {
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  color: #f3e8ff !important;
  background: rgba(168, 85, 247, 0.24) !important;
  border: 1px solid rgba(192, 132, 252, 0.5) !important;
  padding: 1px 5px !important;
  border-radius: 5px !important;
  line-height: 1.1 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
  flex-shrink: 0 !important;
}

.inspect-level-expand-hint {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.inspect-level-pending-pill {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  padding: 1px 5px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.2px !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.7) !important;
  animation: streakClaimReadyPulse 1.6s infinite ease-in-out !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.1 !important;
  flex-shrink: 0 !important;
}

.inspect-level-expand-text {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.2px !important;
  transition: color 0.2s ease !important;
}

.inspect-level-card:hover .inspect-level-expand-text {
  color: #ffffff !important;
}

.inspect-level-arrow {
  font-size: 0.70rem !important;
  font-weight: 900 !important;
  color: #a855f7 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.inspect-level-card:hover .inspect-level-arrow {
  color: #c084fc !important;
  transform: translate(2px, -2px) !important;
}

.inspect-level-bar-track {
  width: 100% !important;
  height: 4px !important;
  border-radius: 4px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.inspect-level-bar-fill {
  height: 100% !important;
  border-radius: 4px !important;
  background: linear-gradient(90deg, #8b5cf6 0%, #c084fc 50%, #e879f9 100%) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6) !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.inspect-level-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  font-size: 0.64rem !important;
}

.inspect-level-xp-text {
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.2px !important;
}

.inspect-level-next-reward {
  font-weight: 700 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 65% !important;
  transition: color 0.2s ease !important;
}

.inspect-level-card:hover .inspect-level-next-reward {
  color: #fef08a !important;
}

/* Honor / Reputation Karma Bar Card */
.inspect-honor-card {
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 9px !important;
  padding: 4px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 5 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.inspect-honor-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

.inspect-honor-title {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.inspect-honor-badge {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 5px !important;
  letter-spacing: 0.2px !important;
}

.inspect-honor-badge.honor-knight {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  color: #4ade80 !important;
}

.inspect-honor-badge.honor-reliable {
  background: rgba(56, 189, 248, 0.18) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
}

.inspect-honor-badge.honor-doubtful {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

.inspect-honor-badge.honor-leaver {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #f87171 !important;
}

.inspect-honor-badge.honor-dev {
  background: rgba(168, 85, 247, 0.18) !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  color: #c084fc !important;
}

.inspect-honor-bar-track {
  width: 100% !important;
  height: 4px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}

.inspect-honor-bar-fill {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #10b981, #22c55e) !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.35) !important;
  transition: width 0.4s ease, background 0.3s ease !important;
}

.inspect-honor-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  line-height: 1.15 !important;
}

/* Stats 2x2 Balanced Cards Grid: Wins, Losses, Games, Winrate */
.inspect-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 5px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 5 !important;
  width: 100% !important;
}

.inspect-stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 1px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 9px !important;
  padding: 4px 8px !important;
  box-sizing: border-box !important;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease !important;
  min-width: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.inspect-stat-item:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px) !important;
}

.inspect-stat-item .stat-top {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  width: 100% !important;
  overflow: hidden !important;
}

.inspect-stat-item .stat-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0 !important;
}

.inspect-stat-item .stat-icon.win {
  color: #4ade80 !important;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.45)) !important;
}

.inspect-stat-item .stat-icon.loss {
  color: #f87171 !important;
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.45)) !important;
}

.inspect-stat-item .stat-icon.games {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45)) !important;
}

.inspect-stat-item .stat-icon.rate {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.45)) !important;
}

.inspect-stat-item .stat-label {
  font-size: 0.63rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1 !important;
}

.inspect-stat-item .stat-value {
  font-size: 1.0rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  line-height: 1.1 !important;
  font-feature-settings: 'tnum' !important;
  letter-spacing: -0.2px !important;
}

.inspect-stat-item .stat-value.win {
  color: #4ade80 !important;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.3) !important;
}

.inspect-stat-item .stat-value.loss {
  color: #f87171 !important;
}

.inspect-stat-item .stat-value.rate {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3) !important;
}

/* Actions Container */
.inspect-actions-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 5 !important;
  margin-top: 1px !important;
}

#btn-inspect-action-friend,
.btn-inspect-primary {
  width: 100% !important;
  min-height: 35px !important;
  height: 35px !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  border: none !important;
  background: linear-gradient(135deg, var(--player-accent, #38bdf8) 0%, color-mix(in srgb, var(--player-accent, #38bdf8) 72%, #000) 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--player-accent, #38bdf8) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

.btn-inspect-primary:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--player-accent, #38bdf8) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-inspect-primary:active {
  transform: translateY(0) scale(0.98) !important;
}

.btn-inspect-primary.is-myself {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.btn-inspect-primary.is-friend {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.btn-inspect-primary.cancel-req {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid #ef4444 !important;
  color: #fca5a5 !important;
  box-shadow: none !important;
}

.btn-inspect-primary.accept-req {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
}

.inspect-secondary-actions {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-inspect-secondary {
  min-height: 31px !important;
  height: 31px !important;
  padding: 3px 8px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 9px !important;
  color: #f1f5f9 !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

.btn-inspect-secondary:hover {
  background: rgba(51, 65, 85, 0.85) !important;
  border-color: var(--player-accent, #38bdf8) !important;
  box-shadow: 0 0 8px color-mix(in srgb, var(--player-accent, #38bdf8) 25%, transparent) !important;
  transform: translateY(-1px) !important;
}

.btn-inspect-secondary:active {
  transform: translateY(0) scale(0.98) !important;
}

.btn-inspect-secondary.btn-inspect-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.btn-inspect-secondary.btn-inspect-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Mobile Responsive Optimization (Portrait & Landscape) */
@media (max-width: 480px) {
  .inspect-level-header {
    flex-wrap: wrap !important;
    row-gap: 4px !important;
  }

  .inspect-level-title-group {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .inspect-level-title {
    font-size: 0.7rem !important;
  }

  .inspect-level-badge-pill {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }

  .inspect-level-expand-hint {
    margin-left: auto !important;
    gap: 4px !important;
  }

  .inspect-level-expand-hint .inspect-level-expand-text {
    display: none !important;
    /* Ocultar texto 'Ampliar' para no saturar la fila en móvil */
  }

  .inspect-level-pending-pill {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }
}

@media (max-width: 350px) {
  .player-inspect-card-wrap {
    width: 96vw !important;
    padding: 10px 10px 12px !important;
    gap: 6px !important;
  }

  .inspect-avatar-circle,
  #inspect-avatar-circle {
    width: auto !important;
    min-width: 44px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .inspect-avatar-circle .kmkz-avatar-svg,
  .inspect-avatar-circle .kmkz-sigil-icon,
  #inspect-avatar-circle .kmkz-avatar-svg,
  #inspect-avatar-circle .kmkz-sigil-icon {
    width: 42px !important;
    height: 42px !important;
  }

  .inspect-avatar-circle.is-hexagonal {
    width: 52px !important;
    height: 58px !important;
  }

  .inspect-avatar-circle.is-hexagonal .kmkz-profile-hex-svg {
    width: 52px !important;
    height: 58px !important;
  }

  .inspect-username {
    font-size: 0.95rem !important;
  }

  .inspect-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3px !important;
  }
}

@media (max-height: 520px) {
  #modal-player-inspect-card {
    padding: 6px 8px !important;
  }

  .player-inspect-card-wrap {
    max-width: 420px !important;
    padding: 8px 12px 10px !important;
    gap: 5px !important;
    border-radius: 14px !important;
  }

  .inspect-avatar-circle,
  #inspect-avatar-circle {
    width: auto !important;
    min-width: 40px !important;
    height: 44px !important;
    font-size: 1.35rem !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .inspect-avatar-circle .kmkz-avatar-svg,
  .inspect-avatar-circle .kmkz-sigil-icon,
  #inspect-avatar-circle .kmkz-avatar-svg,
  #inspect-avatar-circle .kmkz-sigil-icon {
    width: 38px !important;
    height: 38px !important;
  }

  .inspect-avatar-circle.is-hexagonal {
    width: 48px !important;
    height: 54px !important;
  }

  .inspect-avatar-circle.is-hexagonal .kmkz-profile-hex-svg {
    width: 48px !important;
    height: 54px !important;
  }

  .inspect-username {
    font-size: 0.95rem !important;
  }

  .inspect-honor-card {
    padding: 3px 6px !important;
    gap: 2px !important;
  }

  .btn-inspect-primary {
    min-height: 32px !important;
    height: 32px !important;
    font-size: 0.78rem !important;
  }

  .btn-inspect-secondary {
    min-height: 28px !important;
    height: 28px !important;
    font-size: 0.74rem !important;
  }
}

/* Star SVG Badge & Interactive Button */
.star-svg-badge-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  user-select: none !important;
}

.star-svg-badge-wrapper:hover {
  transform: scale(1.14) rotate(4deg) !important;
}

.star-svg-badge-wrapper:active {
  transform: scale(0.94) !important;
}

.star-svg-badge-wrapper.is-vip-star {
  animation: vipStarShine 2.5s ease-in-out infinite alternate !important;
}

@keyframes vipStarShine {
  0% {
    filter: drop-shadow(0 0 4px #f59e0b) drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
    transform: scale(1);
  }

  100% {
    filter: drop-shadow(0 0 8px #fef08a) drop-shadow(0 0 16px rgba(245, 158, 11, 0.95));
    transform: scale(1.06);
  }
}

.header-stars-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 6px !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.header-stars-badge:hover {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5) !important;
  transform: translateY(-1px) !important;
}

.header-stars-badge:active {
  transform: translateY(0) scale(0.96) !important;
}

/* ==========================================================================
/* ==========================================================================
   ✨ KMKZ LUXURY CYBER-GLASS: PENDING FRIEND REQUESTS MODAL (div[18]/div)
   ========================================================================== */

@keyframes pendingModalEnter {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(14px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulseGlowCyan {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
  }

  50% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.65);
  }
}

.pending-requests-modal-card {
  max-width: 490px !important;
  width: 100% !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 22px 24px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  background: linear-gradient(165deg, rgba(13, 20, 36, 0.97) 0%, rgba(9, 14, 26, 0.99) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.85), 0 0 45px rgba(56, 189, 248, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
  animation: pendingModalEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Ambient Cyber-Aura at top of modal */
.pending-requests-modal-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 10% !important;
  right: 10% !important;
  height: 120px !important;
  background: radial-gradient(ellipse at 50% -20%, rgba(56, 189, 248, 0.28) 0%, rgba(14, 165, 233, 0.08) 50%, transparent 80%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Laser highlight edge */
.pending-requests-modal-card::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 15% !important;
  right: 15% !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #38bdf8 50%, transparent) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.pending-modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 2 !important;
}

.pending-modal-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.pending-modal-icon-emblem {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.06)) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
  color: #38bdf8 !important;
}

.pending-modal-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.pending-modal-title {
  color: #ffffff !important;
  font-size: 1.12rem !important;
  margin: 0 !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  background: linear-gradient(90deg, #ffffff 0%, #f1f5f9 65%, #38bdf8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pending-modal-subtitle {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  margin: 0 !important;
  letter-spacing: 0.2px !important;
}

.pending-modal-header .btn-close-modal,
.pending-close-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 1.1rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.pending-modal-header .btn-close-modal:hover,
.pending-close-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #f87171 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.pending-modal-tabs {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 16px !important;
  background: rgba(7, 12, 22, 0.75) !important;
  padding: 4px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  position: relative !important;
  z-index: 2 !important;
}

.pending-tab-btn {
  flex: 1 !important;
  padding: 10px 12px !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  letter-spacing: 0.3px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

.pending-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important;
}

.pending-tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.1)) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.pending-tab-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
  line-height: 1.2 !important;
}

.pending-tab-badge.badge-sent {
  background: linear-gradient(135deg, #d97706, #fbbf24) !important;
  color: #0f172a !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45) !important;
}

.pending-requests-list-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: clamp(260px, 56vh, 480px) !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
  -webkit-overflow-scrolling: touch !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 2 !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent !important;
}

.pending-requests-list-container::-webkit-scrollbar {
  width: 5px !important;
}

.pending-requests-list-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 10px !important;
}

.pending-requests-list-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0284c7, #38bdf8) !important;
  border-radius: 10px !important;
}

.pending-modal-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 14px !important;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 3.5px solid #38bdf8 !important;
  border-radius: 16px !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

#pending-sent-list-container .pending-modal-item {
  border-left-color: #fbbf24 !important;
}

.pending-modal-item:hover {
  background: linear-gradient(135deg, rgba(24, 34, 56, 0.92) 0%, rgba(17, 26, 46, 0.98) 100%) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  border-left-color: #38bdf8 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15) !important;
}

#pending-sent-list-container .pending-modal-item:hover {
  border-color: rgba(251, 191, 36, 0.45) !important;
  border-left-color: #fbbf24 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.15) !important;
}

.pending-modal-user {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
}

.pending-modal-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.3rem !important;
  color: #fff !important;
  font-weight: 900 !important;
  border: 2px solid rgba(255, 255, 255, 0.24) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}

.pending-modal-user:hover .pending-modal-avatar {
  transform: scale(1.08) !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.pending-modal-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.pending-modal-name {
  font-weight: 800 !important;
  color: #f8fafc !important;
  font-size: 0.95rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  letter-spacing: 0.2px !important;
}

.pending-modal-sub {
  font-size: 0.72rem !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  width: fit-content !important;
}

.pending-modal-sub.sent {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.22) !important;
}

.pending-modal-actions {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-shrink: 0 !important;
}

.btn-accept-friend-action {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  color: #ffffff !important;
  padding: 8px 15px !important;
  font-weight: 800 !important;
  font-size: 0.83rem !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  min-height: 38px !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
  letter-spacing: 0.3px !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-accept-friend-action:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  filter: brightness(1.08) !important;
}

.btn-accept-friend-action:active {
  transform: scale(0.97) !important;
}

.btn-reject-friend-action {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.btn-reject-friend-action:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5) !important;
}

.btn-reject-friend-action:active {
  transform: scale(0.95) !important;
}

.btn-cancel-sent-action {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
  padding: 8px 14px !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  min-height: 38px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.btn-cancel-sent-action:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.btn-cancel-sent-action:active {
  transform: scale(0.96) !important;
}

.pending-empty-state {
  text-align: center !important;
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  padding: 38px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  background: rgba(10, 16, 30, 0.45) !important;
  border-radius: 18px !important;
  border: 1px dashed rgba(255, 255, 255, 0.1) !important;
  margin: 10px 0 !important;
}

.pending-empty-icon-wrap {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.22) !important;
  color: #38bdf8 !important;
}

.pending-empty-title {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.pending-empty-desc {
  font-size: 0.78rem !important;
  color: #64748b !important;
  max-width: 290px !important;
  line-height: 1.45 !important;
}

/* --- Social tab inline pending requests card --- */
.pending-requests-card {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.3) !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.pending-request-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  background: rgba(2, 6, 23, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.pending-request-user {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  cursor: pointer !important;
}

.pending-request-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  color: #fff !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.pending-request-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.pending-request-name {
  font-weight: 800 !important;
  color: #ffffff !important;
  font-size: 0.92rem !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pending-request-sub {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Mobile Responsiveness for Friend Requests */
@media (max-width: 480px) {
  .pending-requests-modal-card {
    padding: 14px 12px !important;
    border-radius: 16px !important;
  }

  .pending-modal-title {
    font-size: 0.98rem !important;
  }

  .pending-modal-item {
    padding: 9px 10px !important;
    gap: 8px !important;
  }

  .pending-modal-avatar {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    font-size: 1.1rem !important;
  }

  .pending-modal-name {
    font-size: 0.86rem !important;
  }

  .pending-modal-sub {
    font-size: 0.7rem !important;
  }

  .btn-accept-friend-action {
    padding: 7px 10px !important;
    font-size: 0.76rem !important;
    min-height: 34px !important;
  }

  .btn-reject-friend-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .btn-cancel-sent-action {
    padding: 7px 10px !important;
    font-size: 0.76rem !important;
    min-height: 34px !important;
  }

  .pending-request-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .pending-request-item .social-card-actions {
    display: flex !important;
    width: 100% !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .pending-request-item .social-card-actions .btn-social-action.primary {
    flex: 1 !important;
    justify-content: center !important;
  }
}

@media (max-width: 360px) {
  .pending-modal-actions {
    gap: 4px !important;
  }

  .btn-accept-friend-action span,
  .btn-cancel-sent-action span {
    font-size: 0.72rem !important;
  }

  .btn-accept-friend-action {
    padding: 6px 8px !important;
  }
}

/* Modals High-Priority Visibility & Touch Layout */
#modal-pending-requests {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  touch-action: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#modal-player-inspect-card {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100% !important;
  min-height: 100% !important;
  z-index: 999999 !important;
  padding: 12px 10px !important;
  box-sizing: border-box !important;
  touch-action: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

#modal-pending-requests.hidden,
#modal-player-inspect-card.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modal-pending-requests:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-player-inspect-card:not(.hidden) {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-shop-item-preview:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#modal-shop-item-preview.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#dm-chat-overlay {
  z-index: 10005 !important;
}

#dm-chat-overlay:not(.hidden) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#dm-chat-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#dm-chat-overlay .overlay-content {
  width: 100% !important;
  max-width: min(calc(100vw - 24px), 460px) !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   ✨ TIENDA KMKZ: DARK LUXURY & CYBER-HEX SYSTEM
   ========================================================================== */

.shop-luxury-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.shop-luxury-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.12), transparent);
  animation: holoShimmer 4s infinite linear;
  pointer-events: none;
}

@keyframes holoShimmer {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 200%;
  }
}

.shop-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-brand-icon-hex {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  border: 1px solid #fde68a;
}

.shop-main-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.shop-subtitle {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.shop-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
  white-space: nowrap;
}

.shop-balance-pill .kmkz-coin-hex,
.shop-balance-pill .shop-coin-spin {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background-image: none !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8)) !important;
}

.shop-balance-pill .kmkz-coin-svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
}

.shop-coin-val {
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: #fbbf24;
}

/* Categories Tabs Grid & Sticky Header Bar (Accessible, Evident & Minimalist) */
.shop-category-wrapper {
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-tabs-cyber-grid,
.shop-tabs-pill-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 4px 4px 10px !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  touch-action: pan-x pan-y !important;
}

.shop-tabs-cyber-grid::-webkit-scrollbar,
.shop-tabs-pill-row::-webkit-scrollbar {
  display: none !important;
}

.shop-tab-cyber-btn {
  flex: 0 0 auto !important;
  min-width: auto !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 8px 16px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  font-family: 'Outfit', sans-serif !important;
  text-align: center !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.tab-cyber-icon,
.tab-cyber-icon-svg {
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.tab-cyber-icon svg,
.tab-cyber-icon-svg svg {
  width: 18px;
  height: 18px;
  display: block;
}

.shop-tab-cyber-btn:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
  transform: translateY(-1px) !important;
}

.shop-tab-cyber-btn:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
  border-color: #fbbf24 !important;
}

.shop-tab-cyber-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.65) !important;
  color: #fef08a !important;
  font-weight: 800 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.25) !important;
}

.tab-cyber-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.25px;
  white-space: nowrap;
}

#page-shop .hex-section-header {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
  min-height: 48px !important;
  gap: 10px !important;
}

.shop-header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 100%;
}

.btn-shop-confirm-toggle {
  flex: 0 0 auto !important;
  min-width: auto !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 0.80rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap !important;
}

.btn-shop-confirm-toggle .shop-confirm-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.btn-shop-confirm-toggle .shop-confirm-icon-svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-shop-confirm-toggle .shop-confirm-label-box {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.25px;
}

.btn-shop-confirm-toggle .shop-confirm-text-full {
  display: inline;
}

.btn-shop-confirm-toggle .shop-confirm-text-short {
  display: none;
}

.btn-shop-confirm-toggle .shop-confirm-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
}

.btn-shop-confirm-toggle .shop-confirm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.btn-shop-confirm-toggle.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1.5px solid #10b981 !important;
  color: #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

.btn-shop-confirm-toggle.active .shop-confirm-status-chip {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-shop-confirm-toggle.active .shop-confirm-status-dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.btn-shop-confirm-toggle.inactive {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  color: #f87171 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
}

.btn-shop-confirm-toggle.inactive .shop-confirm-status-chip {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-shop-confirm-toggle.inactive .shop-confirm-status-dot {
  background: #ef4444;
  box-shadow: 0 0 5px #ef4444;
}

.btn-shop-confirm-toggle.inactive .shop-confirm-icon-check {
  display: none;
}

.btn-shop-confirm-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.btn-shop-confirm-toggle:active {
  transform: translateY(0);
}

.btn-shop-confirm-toggle:focus-visible {
  outline: 2px solid #34d399 !important;
  outline-offset: 2px !important;
}

.btn-shop-confirm-toggle.inactive:focus-visible {
  outline: 2px solid #ef4444 !important;
  outline-offset: 2px !important;
}

/* Responsive adjustments across mobile break-points */
@media (max-width: 640px) {
  #page-shop .hex-section-header {
    gap: 8px !important;
  }

  .btn-shop-confirm-toggle {
    padding: 0 10px !important;
    gap: 6px !important;
  }

  .btn-shop-confirm-toggle .shop-confirm-text-full {
    display: none !important;
  }

  .btn-shop-confirm-toggle .shop-confirm-text-short {
    display: inline !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 440px) {
  #page-shop .hex-section-header {
    gap: 6px !important;
  }

  #page-shop .hex-section-header .hex-icon-tile {
    width: 38px !important;
    height: 38px !important;
  }

  .btn-shop-confirm-toggle {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    border-radius: 8px !important;
  }

  .btn-shop-confirm-toggle .shop-confirm-status-chip {
    padding: 2px 4px !important;
    font-size: 0.62rem !important;
  }
}

@media (max-width: 360px) {
  .btn-shop-confirm-toggle .shop-confirm-text-short {
    display: none !important;
  }

  .btn-shop-confirm-toggle {
    padding: 0 7px !important;
    gap: 4px !important;
  }
}

.btn-shop-test-map {
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.85)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.btn-shop-test-map:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3) !important;
}

/* Mobile: Cyber-Pill Chips — Every category displays its custom icon and full label clearly without text clipping */
@media (max-width: 768px) {

  .shop-tabs-cyber-grid,
  .shop-tabs-pill-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 8px !important;
    padding: 6px 8px 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    scroll-snap-type: x proximity !important;
  }

  .shop-tabs-cyber-grid::-webkit-scrollbar,
  .shop-tabs-pill-row::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn,
  .shop-tabs-pill-row .shop-tab-cyber-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 40px !important;
    height: 40px !important;
    min-width: fit-content !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
    scroll-snap-align: center !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn:hover:not(.active),
  .shop-tabs-pill-row .shop-tab-cyber-btn:hover:not(.active) {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #f1f5f9 !important;
  }

  /* All categories: full text label ALWAYS visible and readable without borders touching */
  .shop-tabs-cyber-grid .shop-tab-cyber-btn .tab-cyber-label,
  .shop-tabs-pill-row .shop-tab-cyber-btn .tab-cyber-label {
    display: inline-block !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    color: #cbd5e1 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    letter-spacing: 0.3px !important;
  }

  /* Active category: distinct golden cyber-glow chip */
  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.15) 50%, rgba(15, 23, 42, 0.90) 100%) !important;
    border: 1.5px solid #fbbf24 !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-label,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active .tab-cyber-label {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.80rem !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
  }

  .shop-tabs-cyber-grid .tab-cyber-icon,
  .shop-tabs-cyber-grid .tab-cyber-icon-svg,
  .shop-tabs-pill-row .tab-cyber-icon,
  .shop-tabs-pill-row .tab-cyber-icon-svg {
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .shop-tabs-cyber-grid .tab-cyber-icon svg,
  .shop-tabs-cyber-grid .tab-cyber-icon-svg svg,
  .shop-tabs-pill-row .tab-cyber-icon svg,
  .shop-tabs-pill-row .tab-cyber-icon-svg svg {
    width: 17px !important;
    height: 17px !important;
    display: block !important;
  }

  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-icon svg,
  .shop-tabs-cyber-grid .shop-tab-cyber-btn.active .tab-cyber-icon-svg svg,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active .tab-cyber-icon svg,
  .shop-tabs-pill-row .shop-tab-cyber-btn.active .tab-cyber-icon-svg svg {
    color: #fbbf24 !important;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)) !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   🎨 ULTRA-PREMIUM MINIMALIST CUSTOM COLOR CUSTOMIZER
   ══════════════════════════════════════════════════════════════════════════ */
.custom-color-forge-cyber {
  background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.1) 0%, transparent 65%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 27, 75, 0.94) 50%, rgba(10, 15, 30, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 20px !important;
  padding: 18px 20px !important;
  margin-bottom: 18px !important;
  display: none;
  flex-direction: column !important;
  gap: 14px !important;
  box-shadow: inset 0 1px 1px rgba(254, 240, 138, 0.3),
    0 16px 45px rgba(0, 0, 0, 0.75),
    0 0 30px rgba(251, 191, 36, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-sizing: border-box !important;
  animation: colorForgeSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  touch-action: pan-y !important;
  overscroll-behavior: contain !important;
}

.custom-color-forge-cyber.hidden,
#custom-color-forge-container.hidden {
  display: none !important;
}

@keyframes colorForgeSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.forge-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.forge-title-badge {
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: clamp(0.85rem, 2.8vw, 0.98rem) !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 40%, #fbbf24 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  letter-spacing: 0.8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.forge-badge-icon-svg {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)) !important;
}

.forge-price-tag {
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
  white-space: nowrap !important;
}

.forge-subtitle-desc {
  margin: 0 !important;
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
}

/* Interactive Color Selection Panel */
.forge-interactive-panel {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  background: rgba(2, 6, 23, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 12px 16px !important;
  gap: 14px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.forge-preview-section {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex: 1 1 200px !important;
}

.forge-swatch-display {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: #00ffcc;
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 0 22px #00ffcc, inset 0 0 10px rgba(255, 255, 255, 0.4) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

.forge-swatch-glare {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 45% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 100%) !important;
  pointer-events: none !important;
}

.forge-swatch-details {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 1 !important;
}

.forge-input-label {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.forge-hex-input-group {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.forge-hex-input-field {
  width: 100% !important;
  max-width: 130px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 1px !important;
  outline: none !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.forge-hex-input-field:focus {
  border-color: #fde047 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  color: #ffffff !important;
}

/* Explicit Native Color Picker Trigger */
.forge-picker-control {
  display: flex !important;
  align-items: center !important;
}

.forge-picker-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 9px 15px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(251, 191, 36, 0.2) !important;
  color: #f1f5f9 !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.forge-picker-btn:hover {
  border-color: #fde047 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(251, 191, 36, 0.4) !important;
}

.forge-picker-btn:active {
  transform: translateY(0) scale(0.97) !important;
}

.forge-picker-btn input[type="color"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.forge-picker-icon {
  color: #fbbf24 !important;
  flex-shrink: 0 !important;
}

/* Color Presets */
.forge-presets-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.forge-presets-label {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.forge-palette-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  overflow-x: auto !important;
  padding: 4px 2px 6px 2px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  touch-action: pan-x pan-y !important;
  overscroll-behavior: contain !important;
}

.forge-palette-grid::-webkit-scrollbar {
  display: none !important;
}

.forge-palette-grid .color-preset-btn {
  flex: 1 1 0px !important;
  min-width: 28px !important;
  max-width: 38px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.forge-palette-grid .color-preset-btn:hover {
  transform: scale(1.2) translateY(-2px) !important;
  border-color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 14px currentColor !important;
  z-index: 2 !important;
}

.forge-palette-grid .color-preset-btn:active {
  transform: scale(0.95) !important;
}

/* Action Button - High Accessibility & Modern Gaming Style */
.btn-buy-forge-action {
  width: 100% !important;
  min-height: 50px !important;
  padding: 12px 18px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.96rem !important;
  letter-spacing: 0.4px !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  -webkit-font-smoothing: antialiased !important;
}

.btn-buy-forge-action:hover {
  filter: brightness(1.08) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.btn-buy-forge-action:active {
  transform: scale(0.98) !important;
}

.btn-buy-forge-text {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  color: #ffffff !important;
  letter-spacing: 0.3px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.forge-btn-price-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.25) !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Shop Catalog Items Grid - Modern, Accessible & Fully Responsive Grid */
#shop-items-grid,
.shop-items-grid,
.shop-items-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 6px 0 28px !important;
}

@media (min-width: 1280px) {

  #shop-items-grid,
  .shop-items-grid,
  .shop-items-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)) !important;
    gap: 18px !important;
  }
}

@media (max-width: 960px) and (min-width: 681px) {

  #shop-items-grid,
  .shop-items-grid,
  .shop-items-grid-container {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 680px) {

  #shop-items-grid,
  .shop-items-grid,
  .shop-items-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

@media (max-width: 350px) {

  #shop-items-grid,
  .shop-items-grid,
  .shop-items-grid-container {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* Featured Hero Item Showcase - KMKZ Vitrina Destacada */
.shop-featured-showcase-container,
.shop-featured-showcase {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  margin-bottom: 18px !important;
}

.shop-featured-showcase:hover,
.shop-featured-showcase:focus-within {
  z-index: 45 !important;
}

#shop-featured-card-slot {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
}

.featured-showcase-card {
  position: relative !important;
  z-index: 10 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle at 50% 45%, var(--card-glow, rgba(251, 191, 36, 0.16)), transparent 65%), #070d18 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 20px !important;
  padding: 16px 20px 20px !important;
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.8), 0 0 28px rgba(251, 191, 36, 0.18) !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, z-index 0s !important;
  box-sizing: border-box !important;
}

.featured-showcase-card:hover,
.featured-showcase-card:focus-within {
  z-index: 50 !important;
  transform: translateY(-2px) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 16px 44px -6px rgba(0, 0, 0, 0.85), 0 0 36px rgba(251, 191, 36, 0.3) !important;
}

.featured-showcase-top {
  position: relative !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  pointer-events: auto !important;
}

.featured-badge-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5) !important;
}

.featured-stage {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 185px !important;
  min-height: 185px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 6px 0 10px !important;
}

.featured-stage .shop-item-real-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.75)) !important;
  transform: scale(1.1) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.featured-showcase-card:hover .featured-stage .shop-item-real-canvas {
  transform: translateY(-3px) scale(1.15) !important;
}

/* Navigation Buttons for Featured Showcase (Izquierda / Derecha) */
.btn-featured-nav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(11, 18, 33, 0.88) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 10 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 12px rgba(251, 191, 36, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
}

.btn-featured-nav:hover {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: #fde047 !important;
  color: #ffffff !important;
  transform: translateY(-50%) scale(1.12) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85), 0 0 20px rgba(251, 191, 36, 0.55) !important;
}

.btn-featured-nav:active {
  transform: translateY(-50%) scale(0.94) !important;
}

.btn-featured-prev {
  left: 8px !important;
}

.btn-featured-next {
  right: 8px !important;
}

.featured-counter-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 2px 8px !important;
  letter-spacing: 0.5px !important;
}

@media (max-width: 480px) {
  .btn-featured-nav {
    width: 34px !important;
    height: 34px !important;
  }

  .btn-featured-prev {
    left: 4px !important;
  }

  .btn-featured-next {
    right: 4px !important;
  }
}

.featured-info {
  position: relative !important;
  z-index: 15 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  gap: 4px !important;
  pointer-events: auto !important;
}

.featured-name {
  font-family: 'Outfit', system-ui, sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.featured-rarity {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.featured-status-line {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  margin: 4px 0 8px !important;
}

.featured-actions {
  position: relative !important;
  z-index: 15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 280px !important;
  pointer-events: auto !important;
}

/* Premium Collectible Card - Cyber-Hex Showcase Uniform Design */
.shop-card-hex {
  --card-glow: rgba(56, 189, 248, 0.08);
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  background: radial-gradient(130% 120% at 50% 0%, var(--card-glow, rgba(56, 189, 248, 0.08)) 0%, rgba(14, 21, 38, 0.85) 55%, rgba(8, 13, 25, 0.98) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  padding: 10px 10px 12px !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  width: 100% !important;
  min-height: 235px !important;
  height: 100% !important;
  cursor: pointer !important;
  user-select: none !important;
}

.shop-card-hex:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 24px var(--card-glow) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  z-index: 2 !important;
}

.shop-card-hex:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 3px !important;
}

/* Card Top Bar: Clean Rarity and Floating New Badge */
.shop-card-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 2px 2px !important;
  z-index: 2 !important;
}

.shop-rarity-text {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #94a3b8 !important;
}

.shop-rarity-text.founder {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.45) !important;
}

.shop-rarity-text.legendary {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4) !important;
}

.shop-rarity-text.mythic {
  color: #c084fc !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.35) !important;
}

.shop-rarity-text.epic {
  color: #38bdf8 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

.shop-rarity-text.rare {
  color: #34d399 !important;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3) !important;
}

.shop-rarity-text.common {
  color: #94a3b8 !important;
}

.shop-badge-new {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5) !important;
  display: inline-flex !important;
  align-items: center !important;
  letter-spacing: 0.4px !important;
}

/* Fallback for existing pill elements */
.shop-card-rarity-pill {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: transparent !important;
  border: none !important;
}

/* Color Chip Badge */
.shop-color-pill {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  line-height: 1 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(4px) !important;
}

.shop-card-hex.is-color-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease !important;
}

.shop-card-hex.is-color-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
}

/* Showcase Stage Container: Integrated, organic object spotlight */
.shop-card-showcase-stage {
  position: relative !important;
  width: 100% !important;
  height: 136px !important;
  min-height: 136px !important;
  max-height: 136px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  background: radial-gradient(ellipse at 50% 70%, var(--card-glow, rgba(56, 189, 248, 0.12)) 0%, transparent 72%) !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  transition: transform 0.25s ease, opacity 0.25s ease !important;
}

.shop-item-real-canvas,
.collection-item-real-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)) !important;
  transform: scale(1.04) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.shop-card-hex:hover .shop-item-real-canvas,
.collection-item-card:hover .collection-item-real-canvas {
  transform: translateY(-2px) scale(1.10) !important;
}

.collection-header-real-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* Card Body & Title - Clean Hierarchy: Object -> Title -> Status -> Action */
.shop-card-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  gap: 2px !important;
  margin: 0 0 6px !important;
  flex: 0 0 auto !important;
  justify-content: center !important;
}

.shop-card-name {
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  color: #f8fafc !important;
  line-height: 1.2 !important;
  text-align: center !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 1.3em !important;
  font-family: 'Outfit', system-ui, sans-serif !important;
  transition: color 0.2s ease !important;
  padding: 0 4px !important;
}

.shop-card-hex:hover .shop-card-name {
  color: #fef08a !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3) !important;
}

/* Clean Status Line - Informative, non-box visual hierarchy */
.shop-card-status-line,
.shop-card-status-pill {
  font-weight: 700 !important;
  font-size: 0.74rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: fit-content !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

.status-clean-equipped,
.shop-card-status-pill .status-equipped-tag {
  color: #34d399 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.status-clean-owned,
.shop-card-status-pill .status-owned-tag {
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.status-clean-free,
.shop-card-status-pill .status-free-tag {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.status-clean-price,
.shop-card-status-pill .status-price-tag {
  color: #fef08a !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 800 !important;
}

.shop-card-footer {
  width: 100% !important;
  margin-top: auto !important;
}

/* Rarity specific glowing themes */
.shop-card-hex.rarity-founder {
  --card-glow: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.45) !important;
}

.shop-card-hex.rarity-founder:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 28px rgba(251, 191, 36, 0.35) !important;
}

.shop-card-hex.rarity-legendary {
  --card-glow: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.35) !important;
}

.shop-card-hex.rarity-legendary:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 28px rgba(251, 191, 36, 0.3) !important;
}

.shop-card-hex.rarity-mythic {
  --card-glow: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35) !important;
}

.shop-card-hex.rarity-mythic:hover {
  border-color: #c084fc !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 28px rgba(168, 85, 247, 0.3) !important;
}

.shop-card-hex.rarity-epic {
  --card-glow: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.shop-card-hex.rarity-epic:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 26px rgba(56, 189, 248, 0.25) !important;
}

.shop-card-hex.rarity-rare {
  --card-glow: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28) !important;
}

.shop-card-hex.rarity-rare:hover {
  border-color: #4ade80 !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.85), 0 0 24px rgba(34, 197, 94, 0.25) !important;
}

.shop-card-hex.rarity-common {
  --card-glow: rgba(148, 163, 184, 0.06);
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.shop-card-hex.state-equipped {
  border-color: rgba(16, 185, 129, 0.5) !important;
  --card-glow: rgba(16, 185, 129, 0.12);
}

/* Card Action Buttons (Compact, non-intrusive) */
.btn-shop-action {
  width: 100% !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-sizing: border-box !important;
  letter-spacing: 0.3px !important;
}

.btn-shop-action:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

.btn-shop-action.btn-buy {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: none !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35) !important;
}

.btn-shop-action.btn-buy:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  filter: brightness(1.08) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
}

.btn-shop-action.btn-equip {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #38bdf8 !important;
}

.btn-shop-action.btn-equip:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35) !important;
}

.btn-shop-action.btn-active {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
}

/* Grayed out unlock button when player doesn't have enough coins */
.btn-shop-action.btn-buy.cant-afford,
.btn-shop-action.cant-afford {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #64748b !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}

.btn-shop-action.btn-buy.cant-afford:hover,
.btn-shop-action.cant-afford:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #94a3b8 !important;
  filter: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Mobile & Tablet Responsive Optimizations */
@media (max-width: 680px) {
  .featured-stage {
    height: 150px !important;
    min-height: 150px !important;
  }

  .featured-name {
    font-size: 1rem !important;
  }

  .shop-card-hex {
    padding: 8px 8px 10px !important;
    border-radius: 14px !important;
    min-height: 215px !important;
    gap: 3px !important;
  }

  .shop-card-showcase-stage {
    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
    margin: 0 !important;
  }

  .shop-card-name {
    font-size: 0.78rem !important;
    line-height: 1.18 !important;
    min-height: 1.25em !important;
  }

  .shop-card-status-line {
    font-size: 0.7rem !important;
  }

  .btn-shop-action {
    font-size: 0.72rem !important;
    padding: 6px 6px !important;
    min-height: 30px !important;
  }
}

/* Also for 3D preview modal action button */
.btn-shop-preview-modal-action.cant-afford {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
  color: #64748b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}

.btn-shop-preview-modal-action.cant-afford:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
  color: #94a3b8 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Color forge button unaffordable */
.btn-buy-forge-action.cant-afford {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
  color: #64748b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}

/* Shop 3D Preview Modal Window */
.shop-item-preview-wrap {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, #090e1a, #162032);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(251, 191, 36, 0.2);
  position: relative;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.shop-preview-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  height: 320px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.6) 0%, rgba(2, 6, 23, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 480px) {
  .shop-preview-stage {
    height: 260px;
  }
}

.shop-preview-3d-canvas {
  width: 100%;
  height: 100%;
  max-width: 380px;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7));
}

.shop-preview-rotation-hint {
  position: absolute;
  bottom: 8px;
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 10px;
}

.shop-hex-terrain-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  margin-top: 2px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.btn-hex-terrain-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  user-select: none;
  outline: none;
  touch-action: manipulation;
}

.btn-hex-terrain-pill:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.btn-hex-terrain-pill:active {
  transform: translateY(1px) scale(0.97);
}

.btn-hex-terrain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  min-width: 17px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-hex-terrain-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.btn-hex-terrain-pill:hover .btn-hex-terrain-icon {
  transform: scale(1.18) rotate(-3deg);
}

.btn-hex-terrain-text {
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Hover glow states per resource */
.btn-hex-terrain-pill[data-res="wood"]:hover:not(.active) {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.btn-hex-terrain-pill[data-res="ore"]:hover:not(.active) {
  border-color: rgba(148, 163, 184, 0.65);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.25);
}

.btn-hex-terrain-pill[data-res="wheat"]:hover:not(.active) {
  border-color: rgba(234, 179, 8, 0.65);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.btn-hex-terrain-pill[data-res="brick"]:hover:not(.active) {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.btn-hex-terrain-pill[data-res="sheep"]:hover:not(.active) {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.btn-hex-terrain-pill[data-res="gold"]:hover:not(.active) {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* Active resource themes */
.btn-hex-terrain-pill.active {
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.btn-hex-terrain-pill[data-res="wood"].active {
  background: linear-gradient(135deg, #15803d, #16a34a);
  border-color: #86efac;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hex-terrain-pill[data-res="ore"].active {
  background: linear-gradient(135deg, #475569, #64748b);
  border-color: #cbd5e1;
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hex-terrain-pill[data-res="wheat"].active {
  background: linear-gradient(135deg, #ca8a04, #eab308);
  color: #1e1b4b;
  text-shadow: none;
  border-color: #fef08a;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-hex-terrain-pill[data-res="brick"].active {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  border-color: #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hex-terrain-pill[data-res="sheep"].active {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #a7f3d0;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-hex-terrain-pill[data-res="gold"].active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #1e1b4b;
  text-shadow: none;
  border-color: #fde68a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media (max-width: 480px) {
  .shop-hex-terrain-selector {
    gap: 4px;
    padding: 5px 6px;
    margin-bottom: 6px;
  }

  .btn-hex-terrain-pill {
    padding: 4px 8px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .btn-hex-terrain-icon {
    width: 14px;
    height: 14px;
    min-width: 14px;
  }
}


.shop-preview-rarity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.shop-rarity-badge {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.shop-type-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.shop-preview-title {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.shop-preview-desc {
  margin: 0 0 14px 0;
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.4;
}

.shop-preview-pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.shop-preview-price-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
}

.shop-preview-price-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
}

.btn-shop-preview-action {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-shop-preview-action:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* Shop Category Footer (Evident, Minimalist & Accessible Navigation) */
.shop-category-footer {
  margin-top: 18px;
  margin-bottom: 24px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.btn-shop-footer-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-shop-footer-nav.btn-shop-footer-prev {
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
}

.btn-shop-footer-nav.btn-shop-footer-next {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: none;
  font-weight: 900;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}

.btn-shop-footer-nav:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.btn-shop-footer-nav:active {
  transform: translateY(1px);
}

.btn-shop-footer-nav:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.shop-footer-center-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.shop-footer-current-name {
  font-size: 0.82rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.3px;
}

.shop-footer-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.3);
}

.shop-dot.active {
  width: 18px;
  height: 7px;
  border-radius: 4px;
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
}

@media (max-width: 480px) {
  .shop-category-footer {
    padding: 8px 10px;
    gap: 6px;
  }

  .btn-shop-footer-nav {
    padding: 6px 10px;
    font-size: 0.76rem;
    gap: 4px;
  }

  .shop-footer-current-name {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   ⬡ MONEDA HEXAGONAL OFICIAL KMKZ (LUXURY 3D GOLD MEDALLION)
   ========================================================================== */

.kmkz-coin-hex {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  width: 1.35em !important;
  height: 1.35em !important;
  flex-shrink: 0 !important;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.45)) !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
}

.kmkz-coin-hex:not(:has(.kmkz-coin-svg)):not(:has(svg)):not(:has(img)) {
  background-image: url('/assets/icons/coin.png') !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.kmkz-coin-hex:has(.kmkz-coin-svg),
.kmkz-coin-hex:has(svg) {
  background-image: none !important;
}

.kmkz-coin-hex:hover {
  transform: scale(1.15) !important;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.75)) !important;
}

.kmkz-coin-svg {
  display: inline-block !important;
  width: 100% !important;
  height: 100% !important;
  vertical-align: middle !important;
  overflow: visible !important;
}

.kmkz-coin-spin {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: kmkzCoinFloat 3s ease-in-out infinite alternate !important;
}

@keyframes kmkzCoinFloat {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-2.5px);
  }
}

/* ==========================================================================
   FORJA DE ESTRELLAS DE PRESTIGIO & STAR BADGES (RESPONSIVE & LUXURY)
   ========================================================================== */

.btn-star-forge-trigger {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: radial-gradient(circle at 35% 30%, rgba(251, 191, 36, 0.28), rgba(15, 23, 42, 0.95) 75%), linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), inset 0 0 10px rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
}

.btn-star-forge-trigger:hover {
  transform: scale(1.1) translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.75), 0 0 35px rgba(168, 85, 247, 0.5);
}

.btn-star-forge-trigger:active {
  transform: scale(0.95);
}

.star-forge-btn-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.85));
  animation: starPulse 2.5s ease-in-out infinite alternate;
}

.star-forge-trigger-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid #FEF08A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

/* Modal Forja de Estrellas Responsive */
.star-forge-modal-card {
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  padding: 22px 20px;
  background: linear-gradient(135deg, rgba(26, 20, 56, 0.98) 0%, rgba(15, 23, 42, 0.99) 70%, rgba(76, 29, 149, 0.45) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.92), 0 0 35px rgba(168, 85, 247, 0.3);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.btn-close-star-forge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  z-index: 10;
}

.btn-close-star-forge:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: scale(1.08);
}

.star-forge-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 36px;
  box-sizing: border-box;
}

.star-forge-head-text {
  flex: 1;
  min-width: 0;
}

.star-forge-modal-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.star-forge-icon-glow {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
  animation: starPulse 2.5s ease-in-out infinite alternate;
  flex-shrink: 0;
}

@keyframes starPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
  }

  100% {
    transform: scale(1.08);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.7), 0 0 35px rgba(168, 85, 247, 0.5);
  }
}

.star-forge-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.star-forge-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #FDE68A, #F59E0B, #A855F7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.star-forge-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.star-forge-subtitle {
  font-size: 0.76rem;
  color: #94a3b8;
  display: block;
}

.star-forge-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
}

.star-forge-status-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.star-forge-status-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.star-forge-status-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.star-forge-user-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 27, 75, 0.85);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-radius: 10px;
  padding: 4px 10px;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
  flex-shrink: 0;
}

.star-forge-badge-icon {
  font-size: 1.1rem;
}

.star-forge-badge-val {
  font-weight: 900;
  color: #fff;
  font-size: 1.05rem;
  font-family: 'Outfit', sans-serif;
}

.star-forge-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.star-forge-desc strong {
  color: #fbbf24;
}

.star-forge-progress-wrap {
  width: 100%;
  box-sizing: border-box;
}

.star-forge-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.star-forge-prog-label {
  color: #94a3b8;
}

.star-forge-prog-val {
  color: #fbbf24;
  font-weight: 800;
}

.star-forge-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-sizing: border-box;
}

.star-forge-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #F59E0B, #fbbf24, #A855F7);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.7);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-buy-star-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #7c3aed 100%);
  border: 1.5px solid #fef08a;
  border-radius: 14px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.btn-buy-star-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.7), 0 0 25px rgba(124, 58, 237, 0.5);
  filter: brightness(1.1);
}

.btn-buy-star-action:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-buy-star-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-star-main-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-star-price-tag {
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.3);
}

.player-star-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fbbf24;
  vertical-align: middle;
  margin-left: 4px;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

/* Star Forge Mobile Optimization */
@media (max-width: 480px) {
  .star-forge-modal-card {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .star-forge-icon-glow {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }

  .star-forge-title {
    font-size: 0.95rem;
  }

  .btn-buy-star-action {
    padding: 10px 14px;
    font-size: 0.86rem;
    justify-content: center;
  }
}

/* ==========================================================================
   Language Selector (Cambio de Idioma)
   ========================================================================== */
.language-selector-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .language-selector-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
}

.lang-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.lang-option-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lang-option-card:active {
  transform: translateY(0) scale(0.98);
}

.lang-option-card.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(217, 119, 6, 0.12) 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.25), inset 0 0 12px rgba(251, 191, 36, 0.08);
}

.lang-flag {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.lang-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.lang-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.lang-option-card.active .lang-name {
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.lang-native {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-option-card.active .lang-native {
  color: #cbd5e1;
}

.lang-check {
  display: none;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fbbf24;
  flex-shrink: 0;
  margin-left: auto;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.lang-option-card.active .lang-check {
  display: inline-block;
}

/* ==========================================================================
   👤 PROFILE & ACCOUNT: Minimalist, Accessible & Sleek Design
   ========================================================================== */
.pcard-account-card {
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
}

.pcard-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.pcard-title-icon {
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.pcard-title-row .pcard-title {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.3px !important;
  margin: 0 !important;
}

/* Account ID Row */
.account-id-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.account-id-input-wrap {
  flex: 1 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.account-id-prefix {
  position: absolute !important;
  left: 12px !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  font-size: 0.95rem !important;
  pointer-events: none !important;
}

.account-id-input {
  width: 100% !important;
  padding-left: 28px !important;
  font-family: 'JetBrains Mono', monospace, sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  color: #38bdf8 !important;
  background: rgba(2, 6, 23, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  letter-spacing: 0.5px !important;
  cursor: default !important;
}

.btn-copy-action {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.btn-copy-action:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45) !important;
}

.btn-copy-action:active {
  transform: translateY(1px) !important;
}

/* Account Stats Grid */
.account-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

.account-stat-cell {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  background: rgba(2, 6, 23, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

.account-stat-cell.full-width {
  grid-column: 1 / -1 !important;
}

.account-stat-cell.stars {
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
}

.account-stat-icon {
  font-size: 1.3rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.account-stat-body {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  gap: 1px !important;
}

.account-stat-lbl {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.account-stat-val {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  font-family: 'JetBrains Mono', monospace, sans-serif !important;
}

.account-stat-cell.stars .account-stat-val {
  color: #fbbf24 !important;
}

/* ==========================================================================
     ACCOUNT RECOVERY & SECURITY CARD (Ultra-Modern Glassmorphism & Accessible)
     ========================================================================== */
#pcard-account-recovery,
.pcard-recovery {
  position: relative !important;
  overflow: hidden !important;
  border: 1.5px solid rgba(56, 189, 248, 0.38) !important;
  background: radial-gradient(130% 120% at 50% 0%, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 55%, rgba(2, 6, 23, 0.99) 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-radius: 22px !important;
  padding: clamp(18px, 4vw, 24px) !important;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.75), 0 0 25px rgba(56, 189, 248, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#pcard-account-recovery:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.82), 0 0 32px rgba(56, 189, 248, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

#pcard-account-recovery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.9), rgba(251, 191, 36, 0.9), transparent);
  pointer-events: none;
}

.recovery-header-row {
  margin-bottom: 8px !important;
}

.recovery-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.recovery-titles-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
}

.recovery-card-icon-wrap {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.22) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 14px rgba(56, 189, 248, 0.2) !important;
}

.recovery-card-title {
  margin: 0 !important;
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.3px !important;
  line-height: 1.25 !important;
}

.recovery-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.38) !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  letter-spacing: 0.2px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.recovery-badge-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 8px #10b981 !important;
  animation: recoveryBadgePulse 2s infinite ease-in-out !important;
}

@keyframes recoveryBadgePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.65;
  }
}

.recovery-hint-text {
  font-size: 0.86rem !important;
  color: #cbd5e1 !important;
  line-height: 1.55 !important;
  margin: 6px 0 14px 0 !important;
}

/* 3-Step Visual Micro-Guide for Accessibility & Cognitive Clarity */
.recovery-steps-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(2, 6, 23, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  margin-bottom: 16px !important;
  gap: 8px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

.recovery-step-item {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.recovery-step-item .step-number {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(251, 191, 36, 0.18) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  color: #fde047 !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.recovery-step-item .step-text {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.recovery-step-arrow {
  color: rgba(148, 163, 184, 0.5) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
  user-select: none !important;
}

@media (max-width: 500px) {
  .recovery-steps-row {
    padding: 8px 10px !important;
    gap: 4px !important;
  }

  .recovery-step-item .step-text {
    font-size: 0.7rem !important;
  }
}

.recovery-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
}

.recovery-form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  text-align: left !important;
}

.recovery-label {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.recovery-label-required {
  color: #f59e0b !important;
  font-weight: 900 !important;
}

.recovery-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.recovery-input-wrap .field-icon-prefix {
  position: absolute !important;
  left: 14px !important;
  font-size: 1.1rem !important;
  pointer-events: none !important;
  z-index: 2 !important;
  color: #94a3b8 !important;
  line-height: 1 !important;
}

.recovery-form-group .field-input {
  width: 100% !important;
  min-height: 50px !important;
  padding: 12px 42px 12px 44px !important;
  background: rgba(2, 6, 23, 0.88) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 16px !important;
  /* Prevents auto-zoom on iOS mobile */
  font-weight: 600 !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.recovery-form-group .field-input::placeholder {
  color: #94a3b8 !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.recovery-form-group .field-input:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

.recovery-form-group .field-input:focus,
.recovery-form-group .field-input:focus-visible {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.3), 0 0 20px rgba(56, 189, 248, 0.25) !important;
  background: rgba(15, 23, 42, 0.98) !important;
}

/* Fast Clear Button for Input (High Accessibility) */
.btn-clear-input {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 50% !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  z-index: 4 !important;
  padding: 0 !important;
}

.btn-clear-input:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-50%) scale(1.08) !important;
}

.btn-clear-input:focus-visible {
  outline: 2.5px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

.btn-clear-input.hidden {
  display: none !important;
}

/* Live Accessible Status Alert */
.recovery-feedback-box {
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
  animation: fadeInSlideDown 0.22s ease-out !important;
}

@keyframes fadeInSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recovery-feedback-box.is-error {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fee2e2 !important;
}

.recovery-feedback-box.is-success {
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1.5px solid #10b981 !important;
  color: #d1fae5 !important;
}

.recovery-feedback-box.is-info {
  background: rgba(56, 189, 248, 0.18) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #e0f2fe !important;
}

/* Accessible Responsive Action Buttons (Dedicated Single Recovery Button) */
.recovery-email-actions,
.recovery-auth-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#pcard-account-recovery .recovery-email-actions button,
#btn-recover-reset-pass {
  width: 100% !important;
  min-height: 48px !important;
  padding: clamp(10px, 2.5vw, 14px) clamp(14px, 3.5vw, 20px) !important;
  font-size: clamp(0.85rem, 3vw, 0.98rem) !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: normal !important;
  text-align: center !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border: 1.5px solid rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#btn-recover-reset-pass:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5) !important;
  transform: translateY(-1.5px) !important;
}

#btn-recover-reset-pass:active {
  transform: translateY(0.5px) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

/* In-Card Step Panels & Animations */
.recovery-in-card-step-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  animation: fadeInSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.recovery-in-card-step-panel.hidden {
  display: none !important;
}

/* Steps Tracker Dynamic States */
.recovery-step-item.active .step-number {
  background: #f59e0b !important;
  border-color: #fbbf24 !important;
  color: #020617 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7) !important;
}

.recovery-step-item.active .step-text {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.recovery-step-item.completed .step-number {
  background: #10b981 !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

.recovery-step-item.completed .step-text {
  color: #34d399 !important;
}

/* Target User Pill */
.recovery-user-target-pill {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 10px !important;
  color: #fde047 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

/* 6-Digit Code Input */
.recovery-code-input {
  letter-spacing: 6px !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  text-align: center !important;
  font-family: 'Courier New', Courier, monospace !important;
  color: #fbbf24 !important;
  background: rgba(2, 6, 23, 0.95) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.recovery-code-input:focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 3.5px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.25) !important;
}

/* Password Toggle Visibility Button */
.btn-toggle-pass-visibility {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  padding: 4px !important;
  line-height: 1 !important;
  opacity: 0.75 !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  z-index: 4 !important;
}

.btn-toggle-pass-visibility:hover {
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.1) !important;
}

/* Secondary Actions Row in Step 2 */
.recovery-step2-sub-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 4px !important;
  flex-wrap: wrap !important;
}

.btn-recovery-link-action {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-recovery-link-action:hover {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
}

.btn-submit-new-pass {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
  color: #ffffff !important;
}

.btn-submit-new-pass:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

/* ═══════════════════════════════════════════════════════════════
   KMKZ RECOVERY & PASSWORD RESET MODALS (LUXURY GLASSMORPHIC)
   ═══════════════════════════════════════════════════════════════ */
.recovery-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000030 !important;
  padding: 16px !important;
  background: rgba(2, 6, 23, 0.85) !important;
  backdrop-filter: blur(18px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(190%) !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

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

.recovery-modal-card {
  position: relative !important;
  width: 100% !important;
  max-width: 450px !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: radial-gradient(130% 115% at 50% -10%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.97) 50%, rgba(2, 6, 23, 0.99) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 22px !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  padding: 30px 26px 24px !important;
  color: #f8fafc !important;
  box-sizing: border-box !important;
  animation: recoveryCardPop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.recovery-modal-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 20% !important;
  right: 20% !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, transparent) !important;
  box-shadow: 0 0 12px #f59e0b !important;
  border-radius: 2px !important;
  pointer-events: none !important;
}

@keyframes recoveryCardPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(14px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.recovery-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  padding: 0 !important;
  line-height: 1 !important;
  z-index: 10 !important;
}

.recovery-modal-close:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35) !important;
}

.recovery-modal-header {
  text-align: center !important;
  margin-bottom: 20px !important;
}

.recovery-emblem-wrap {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 12px !important;
}

.recovery-emblem-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle at 35% 35%, rgba(245, 158, 11, 0.3) 0%, rgba(180, 83, 9, 0.12) 75%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  color: #fbbf24 !important;
  transition: transform 0.25s ease !important;
}

.recovery-emblem-icon:hover {
  transform: scale(1.06) rotate(3deg) !important;
}

.recovery-modal-title {
  font-family: inherit !important;
  font-size: 1.38rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.015em !important;
  margin: 0 0 6px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

.recovery-modal-desc {
  font-size: 0.86rem !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  margin: 0 0 14px !important;
  padding: 0 6px !important;
}

/* Steps Tracker */
.recovery-steps-tracker {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 6px auto 0 !important;
  padding: 5px 14px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.recovery-step-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  transition: color 0.25s ease !important;
}

.recovery-step-num {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.09) !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.recovery-step-divider {
  width: 22px !important;
  height: 2px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-radius: 1px !important;
  transition: background 0.25s ease !important;
}

#modal-forgot-password[data-step="1"] .recovery-step-item.step-1 {
  color: #fbbf24 !important;
}

#modal-forgot-password[data-step="1"] .recovery-step-item.step-1 .recovery-step-num {
  background: #f59e0b !important;
  color: #020617 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
}

#modal-forgot-password[data-step="2"] .recovery-step-item.step-1 {
  color: #34d399 !important;
}

#modal-forgot-password[data-step="2"] .recovery-step-item.step-1 .recovery-step-num {
  background: #10b981 !important;
  color: #ffffff !important;
}

#modal-forgot-password[data-step="2"] .recovery-step-divider {
  background: #10b981 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5) !important;
}

#modal-forgot-password[data-step="2"] .recovery-step-item.step-2 {
  color: #fbbf24 !important;
}

#modal-forgot-password[data-step="2"] .recovery-step-item.step-2 .recovery-step-num {
  background: #f59e0b !important;
  color: #020617 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
}

/* Fields & Inputs */
.recovery-input-group {
  margin-bottom: 14px !important;
  text-align: left !important;
}

.recovery-field-label {
  display: block !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #cbd5e1 !important;
  margin-bottom: 6px !important;
}

.recovery-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.recovery-input-wrap:focus-within {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  background: rgba(15, 23, 42, 0.9) !important;
}

.recovery-input-icon {
  position: absolute !important;
  left: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #64748b !important;
  pointer-events: none !important;
  transition: color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
}

.recovery-input-wrap:focus-within .recovery-input-icon {
  color: #fbbf24 !important;
}

.recovery-text-input {
  width: 100% !important;
  height: 44px !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 0 42px 0 42px !important;
  color: #ffffff !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.recovery-text-input::placeholder {
  color: #64748b !important;
  opacity: 0.8 !important;
}

.btn-input-toggle-pass {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  color: #64748b !important;
  padding: 6px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s ease, background-color 0.2s ease !important;
}

.btn-input-toggle-pass:hover {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

/* Notice Banner */
.recovery-notice-banner {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 11px 13px !important;
  border-radius: 12px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  margin-bottom: 15px !important;
}

.recovery-notice-icon {
  color: #fbbf24 !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
  display: flex !important;
  align-items: center !important;
}

.recovery-notice-text {
  font-size: 0.81rem !important;
  color: #fde68a !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

/* OTP Code 6-Digit Box */
.recovery-code-input-wrap {
  display: flex !important;
  justify-content: center !important;
  margin: 4px 0 6px !important;
}

.recovery-code-field {
  width: 100% !important;
  max-width: 270px !important;
  height: 52px !important;
  text-align: center !important;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 10px !important;
  padding-left: 10px !important;
  color: #fbbf24 !important;
  background: rgba(10, 15, 29, 0.92) !important;
  border: 2px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.12) !important;
  outline: none !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}

.recovery-code-field:focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.28), inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  transform: scale(1.02) !important;
  background: rgba(10, 15, 29, 0.98) !important;
}

/* Submit Buttons */
.recovery-submit-btn {
  width: 100% !important;
  min-height: 46px !important;
  border: none !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%) !important;
  color: #ffffff !important;
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px -2px rgba(245, 158, 11, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  margin-top: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.recovery-submit-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%) !important;
  box-shadow: 0 8px 25px -2px rgba(245, 158, 11, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1.5px) !important;
}

.recovery-submit-btn:active {
  transform: translateY(0.5px) !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35) !important;
}

.recovery-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%) !important;
  box-shadow: 0 6px 20px -2px rgba(16, 185, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.recovery-btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 60%, #059669 100%) !important;
  box-shadow: 0 8px 25px -2px rgba(16, 185, 129, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1.5px) !important;
}

/* Secondary Actions */
.recovery-step2-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 14px !important;
  gap: 8px !important;
}

.recovery-action-link {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.81rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 5px 8px !important;
  border-radius: 6px !important;
  transition: color 0.18s ease, background-color 0.18s ease !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.recovery-action-link:hover {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.recovery-action-link.link-secondary {
  color: #38bdf8 !important;
}

.recovery-action-link.link-secondary:hover {
  color: #7dd3fc !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

/* Status Banner */
.recovery-status-banner {
  margin-top: 14px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 0.83rem !important;
  line-height: 1.4 !important;
  text-align: center !important;
  display: none;
}

.recovery-status-banner:not(:empty) {
  display: block !important;
  animation: recoveryBannerSlide 0.25s ease !important;
}

@keyframes recoveryBannerSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recovery-status-banner.status-success {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #6ee7b7 !important;
}

.recovery-status-banner.status-error {
  background: rgba(239, 68, 68, 0.16) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}

.recovery-status-banner.status-info {
  background: rgba(56, 189, 248, 0.16) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #7dd3fc !important;
}

@media (max-width: 480px) {
  .recovery-modal-card {
    padding: 24px 18px 20px !important;
    border-radius: 18px !important;
  }

  .recovery-modal-title {
    font-size: 1.25rem !important;
  }

  .recovery-code-field {
    font-size: 1.45rem !important;
    letter-spacing: 8px !important;
    height: 48px !important;
  }

  .recovery-step2-actions {
    flex-direction: column !important;
    gap: 6px !important;
    align-items: center !important;
  }
}


@media (max-width: 600px) {
  .recovery-email-actions {
    width: 100% !important;
  }

  #btn-recover-reset-pass {
    padding: 12px 14px !important;
    font-size: 0.88rem !important;
  }
}

#btn-account-change-pass {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
}

#btn-account-change-pass:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  border-color: #38bdf8 !important;
  transform: translateY(-1.5px) !important;
}

#btn-account-logout {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2) !important;
}

#btn-account-logout:hover {
  background: rgba(239, 68, 68, 0.38) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
}

#pcard-account-recovery .btn-action-compact:focus-visible {
  outline: 2.5px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

#pcard-account-recovery .btn-action-compact:active {
  transform: scale(0.97) !important;
}

.recovery-security-footer {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin-top: 14px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  font-size: 0.78rem !important;
  color: #cbd5e1 !important;
  line-height: 1.48 !important;
}

.security-lock-icon {
  font-size: 1rem !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
  color: #fbbf24 !important;
}

/* Collection Panel Wrap */
.pcard-collection-wrap {
  padding: 14px 16px !important;
  margin-bottom: 14px !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 18px !important;
}

.collection-preview-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.collection-preview-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.collection-preview-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
}

.collection-preview-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.collection-preview-subtitle {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.collection-preview-name {
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
}

.collection-equipped-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #22c55e !important;
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  letter-spacing: 0.4px !important;
}

.collection-tabs-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.collection-tab-btn {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.collection-tab-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.35)) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25) !important;
}

.collection-tab-btn.btn-collection-test {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4)) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #fef08a !important;
  font-weight: 900 !important;
}

.collection-items-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.collection-loading-hint {
  grid-column: 1 / -1 !important;
  text-align: center !important;
  color: #64748b !important;
  padding: 24px !important;
  font-size: 0.85rem !important;
}

/* ==========================================================================
   🎁 TIME REWARDS & 7-DAY DAILY STREAK MODAL STYLES
   ========================================================================== */
.reward-timer-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(12px) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  cursor: pointer !important;
}

.reward-timer-badge:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  transform: translateY(-1px) !important;
}

.reward-timer-badge .reward-timer-text {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.2px !important;
  transition: color 0.2s ease !important;
}

.reward-timer-badge.is-ready {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2) !important;
}

.reward-timer-badge.is-ready:hover {
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35) !important;
}

.reward-timer-badge.is-ready .reward-timer-text {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.reward-timer-badge .ready-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  display: inline-block;
  box-shadow: 0 0 6px #fbbf24;
  margin-right: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   🎁 ULTRA-PREMIUM TIME REWARDS & DAILY STREAK MODAL (GLASSMORPHISM)
   ══════════════════════════════════════════════════════════════════════════ */
.time-rewards-modal-glass {
  max-width: 460px !important;
  width: min(460px, calc(100vw - 20px)) !important;
  max-height: min(88vh, 88dvh) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 24px !important;
  padding: clamp(16px, 3vw, 22px) !important;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
    linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 27, 75, 0.92) 50%, rgba(6, 10, 24, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: inset 0 1px 1px 0 rgba(254, 240, 138, 0.4),
    0 25px 70px rgba(0, 0, 0, 0.95),
    0 0 45px rgba(251, 191, 36, 0.25) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-sizing: border-box !important;
  animation: none !important;
  transform: none !important;
}

.time-rewards-header {
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.25) !important;
  padding-bottom: 12px !important;
  margin-bottom: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.time-rewards-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.rewards-emblem-badge {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: radial-gradient(circle at 35% 35%, rgba(254, 240, 138, 0.25) 0%, rgba(245, 158, 11, 0.15) 60%, rgba(15, 23, 42, 0.8) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.55rem !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), inset 0 0 10px rgba(251, 191, 36, 0.2) !important;
  flex-shrink: 0 !important;
}

.rewards-title-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.rewards-main-title {
  margin: 0 !important;
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: clamp(1.05rem, 3.5vw, 1.25rem) !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  letter-spacing: 0.01em !important;
}

.rewards-subtitle {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: clamp(0.72rem, 2.4vw, 0.78rem) !important;
  font-weight: 500 !important;
}

.btn-close-rewards {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-close-rewards:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #fff !important;
  transform: scale(1.08) !important;
}

.time-rewards-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.time-reward-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95)) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  padding: clamp(12px, 2.5vw, 16px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
  transition: border-color 0.25s, transform 0.25s !important;
}

.time-reward-card:hover {
  border-color: rgba(251, 191, 36, 0.4) !important;
}

.daily-streak-card {
  border-color: rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.daily-streak-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b) !important;
}

.hourly-chest-card {
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.hourly-chest-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #0284c7) !important;
}

.time-reward-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.reward-section-label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.reward-section-icon {
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
}

.reward-section-label strong {
  color: #f8fafc !important;
  font-size: clamp(0.85rem, 2.8vw, 0.95rem) !important;
  font-weight: 800 !important;
  font-family: 'Outfit', -apple-system, sans-serif !important;
}

.time-reward-desc {
  font-size: clamp(0.74rem, 2.4vw, 0.8rem) !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
  line-height: 1.45 !important;
}

.streak-pill {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  padding: 3px 10px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15)) !important;
  color: #fef08a !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2) !important;
  white-space: nowrap !important;
}

.cooldown-pill {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  white-space: nowrap !important;
}

.cooldown-pill.is-ready {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.2)) !important;
  color: #6ee7b7 !important;
  border: 1.5px solid #10b981 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
  animation: none !important;
  transform: none !important;
}

/* ── Reward Progress Tracks (Streak & Hourly Cooldown) ── */
.reward-progress-track {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 8px 0 !important;
  box-sizing: border-box !important;
}

.reward-progress-info {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: clamp(0.72rem, 2.2vw, 0.78rem) !important;
  gap: 8px !important;
}

.reward-progress-label {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
}

.reward-progress-counts {
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
}

.reward-progress-bar-bg {
  width: 100% !important;
  height: 8px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.reward-progress-bar-fill {
  height: 100% !important;
  border-radius: 6px !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.reward-progress-bar-fill.streak-fill {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 60%, #fef08a 100%) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7) !important;
}

.reward-progress-bar-fill.hourly-fill {
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 60%, #7dd3fc 100%) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6) !important;
}

.daily-streak-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
  margin: 4px 0 2px !important;
  box-sizing: border-box !important;
}

.daily-streak-day {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 2px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  text-align: center !important;
  gap: 3px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  min-width: 0 !important;
}

.daily-streak-day .day-number {
  font-size: clamp(0.56rem, 1.8vw, 0.64rem) !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.daily-streak-day .day-icon {
  font-size: clamp(0.9rem, 3vw, 1.08rem) !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
}

.daily-streak-day .day-reward {
  font-size: clamp(0.58rem, 1.9vw, 0.68rem) !important;
  color: #e2e8f0 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.daily-streak-day.is-active {
  border-color: #fbbf24 !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.4) !important;
  transform: translateY(-2px) !important;
}

.daily-streak-day.is-active .day-reward {
  color: #fef08a !important;
  font-weight: 900 !important;
}

.daily-streak-day.is-ready-pulse {
  animation: none !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4) !important;
}

.daily-streak-day.is-claimed {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.18) !important;
}

.daily-streak-day.is-claimed .day-reward {
  color: #6ee7b7 !important;
}

.daily-streak-day.is-upcoming {
  border: 1.5px dashed rgba(251, 191, 36, 0.55) !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

.daily-streak-day.is-upcoming .day-reward {
  color: #fde68a !important;
}

.daily-streak-day.is-jackpot {
  border-color: #f59e0b !important;
  background: radial-gradient(circle at 50% 20%, rgba(251, 191, 36, 0.35) 0%, rgba(30, 27, 75, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.45) !important;
}

.daily-streak-day.is-jackpot .day-icon {
  animation: none !important;
  filter: drop-shadow(0 0 4px #fbbf24) !important;
}

.btn-claim-reward {
  width: 100% !important;
  padding: 11px 16px !important;
  border-radius: 14px !important;
  font-size: clamp(0.78rem, 2.9vw, 0.88rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(30, 41, 59, 0.7) !important;
  color: #94a3b8 !important;
  text-align: center !important;
  user-select: none !important;
  touch-action: manipulation !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.btn-claim-reward.is-actionable {
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 35%, #d97706 100%) !important;
  color: #030712 !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 4px 14px rgba(245, 158, 11, 0.4) !important;
  animation: none !important;
}

.btn-claim-reward.is-actionable:hover {
  transform: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 18px rgba(245, 158, 11, 0.5) !important;
  filter: brightness(1.05) !important;
}

.btn-claim-reward:disabled,
.btn-claim-reward[disabled] {
  background: rgba(30, 41, 59, 0.5) !important;
  color: #64748b !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  animation: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  filter: none !important;
  opacity: 0.75 !important;
}

.coin-bump-pulse {
  animation: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   📱 MOBILE REWARD BUTTON ACTIVE & GLOW STYLES (Ultra-Efficient & Thermal Friendly)
   ══════════════════════════════════════════════════════════════════════════ */
#btn-mobile-quests.is-ready,
#btn-mobile-reward.is-ready {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(217, 119, 6, 0.75)) !important;
  border: 2px solid #fef08a !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.6) !important;
}

#btn-mobile-quests.is-ready .mobile-stat-icon,
#btn-mobile-reward.is-ready .mobile-stat-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) !important;
}

#mobile-quests-badge-dot.is-ready,
#mobile-reward-badge-dot.is-ready {
  background: #f59e0b !important;
  border-color: #fef08a !important;
  box-shadow: 0 0 8px #f59e0b !important;
  animation: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   ⬡ REWARD COIN PARTICLES & POPPING TEXT (DISABLED FOR MAXIMUM FLUIDITY)
   ══════════════════════════════════════════════════════════════════════════ */
.reward-coin-particle,
.reward-float-win {
  display: none !important;
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   GLOBAL MODAL VIEWPORT & RESPONSIVENESS FIXES
   Prevents modals from overflowing viewport bounds in Casino/Slot & Profile
   ══════════════════════════════════════════════════════════════════════════ */
#modal-match-history,
#modal-time-rewards,
#slots-history-overlay,
#slots-paytable-overlay,
#modal-slot-bonus-stop,
.game-overlay,
.friends-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(8px, 2.5vh, 20px) clamp(8px, 2.5vw, 20px) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#modal-match-history.hidden,
#modal-time-rewards.hidden,
#slots-history-overlay.hidden,
#slots-paytable-overlay.hidden,
#modal-slot-bonus-stop.hidden,
.game-overlay.hidden,
.friends-modal-overlay.hidden {
  display: none !important;
}

/* Modal Inner Cards */
#modal-match-history .friends-modal-card,
.time-rewards-modal-glass,
.slots-paytable-modal,
.slot-bonus-modal-content {
  width: 100% !important;
  max-width: min(540px, calc(100vw - 16px)) !important;
  max-height: min(90vh, 90dvh) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(251, 191, 36, 0.25) !important;
}

/* Modal Scroll Bodies - Ensure no clipping or off-screen scroll */
#match-history-list,
#purchase-history-list,
.history-scroll-list,
.time-rewards-body,
.paytable-scroll-body,
#slots-history-scroll-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  padding-right: 2px !important;
}

/* ==========================================================================
   UNIFIED ACTIVITY HISTORY & KMKZ GAMEPLAY STATS MODAL
   ========================================================================== */
#modal-match-history,
.history-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: clamp(6px, 1.5vh, 16px) clamp(6px, 1.5vw, 16px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#modal-match-history .history-unified-modal-card {
  max-width: min(540px, calc(100vw - 16px)) !important;
  max-height: min(90vh, 90dvh) !important;
  background: linear-gradient(150deg, #0b1329, #111e38 55%, #1e293b) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(251, 191, 36, 0.2) !important;
  padding: 18px 16px !important;
  box-sizing: border-box !important;
  margin: auto !important;
  position: relative !important;
  color: #fff !important;
  overflow: hidden !important;
}

.history-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-bottom: 10px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 8px !important;
}

.history-modal-title {
  font-size: clamp(0.96rem, 3.8vw, 1.18rem) !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.history-modal-title span:last-child {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.history-segmented-tabs {
  display: flex !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 4px !important;
  margin-bottom: 12px !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.history-tab-pill {
  flex: 1 1 50% !important;
  min-width: 0 !important;
  padding: 8px 8px !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  font-size: clamp(0.72rem, 2.6vw, 0.84rem) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #94a3b8 !important;
  background: transparent !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
}

.history-tab-pill:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.history-tab-pill.active {
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35) !important;
}

.history-tab-pill .tab-pill-icon {
  flex-shrink: 0 !important;
  display: inline-flex !important;
}

.history-tab-pill .tab-pill-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

.history-panel-tab {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.history-panel-tab.hidden {
  display: none !important;
}

/* Purchase Items */
.purchase-card-item {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.purchase-card-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55), 0 0 16px rgba(251, 191, 36, 0.12) !important;
}

.purchase-card-item.is-equipped {
  border-color: rgba(34, 197, 94, 0.5) !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(20, 83, 45, 0.22)) !important;
}

.purchase-item-body {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.purchase-item-info {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.purchase-item-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.purchase-item-title {
  color: #ffffff !important;
  font-size: clamp(0.82rem, 2.7vw, 0.92rem) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.2px !important;
  word-break: break-word !important;
}

.purchase-item-rarity-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.purchase-item-meta {
  margin-top: 2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  font-size: 0.70rem !important;
}

.purchase-item-cat {
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

.purchase-item-date {
  color: #64748b !important;
}

.purchase-history-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.purchase-history-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 6px 2px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.purchase-filter-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.purchase-filter-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.25);
}

.purchase-filter-pill.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.35)) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2) !important;
}

.purchase-item-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.purchase-equipped-badge {
  font-size: 0.7rem;
  font-weight: 900;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
  white-space: nowrap;
}

.btn-purchase-equip {
  font-size: 0.74rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-purchase-equip:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fbbf24;
  transform: translateY(-1px);
}

.purchase-item-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* Profile Quick Action Buttons (Hazañas Kmkz & Historial) */
.account-stats-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-account-quick-action {
  flex: 1 1 130px !important;
  min-width: 0 !important;
  padding: 10px 10px !important;
  border-radius: 12px !important;
  font-size: clamp(0.70rem, 2.2vw, 0.78rem) !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

.btn-account-quick-action.action-stats {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

.btn-account-quick-action.action-stats:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  transform: translateY(-1px) !important;
}

.btn-account-quick-action.action-history {
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fbbf24 !important;
}

.btn-account-quick-action.action-history:hover {
  background: rgba(251, 191, 36, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  transform: translateY(-1px) !important;
}

.btn-account-quick-action span:last-child {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 480px) {
  .purchase-card-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 10px !important;
  }

  .purchase-item-actions,
  .purchase-card-item .purchase-item-actions {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 8px !important;
    margin-top: 2px !important;
  }
}

.kmkz-game-stat-card {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.kmkz-game-stat-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.92) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Daily Streak 7-Day Grid Compression for Compact Screens */
.daily-streak-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 3px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.daily-streak-day {
  min-width: 0 !important;
  padding: 4px 1px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

.daily-streak-day .day-number {
  font-size: 0.7rem !important;
}

.daily-streak-day .day-icon {
  font-size: 0.85rem !important;
}

.daily-streak-day .day-reward {
  font-size: 0.7rem !important;
}

/* Mobile & Short Viewport Tweaks (Landscape / Small Mobile) */
@media (max-height: 680px) {

  #modal-match-history .friends-modal-card,
  .time-rewards-modal-glass,
  .slots-paytable-modal,
  .slot-bonus-modal-content {
    max-height: 94vh !important;
    max-height: 94dvh !important;
    padding: 12px 14px !important;
  }

  .time-reward-card {
    padding: 8px 10px !important;
    gap: 5px !important;
  }

  .time-reward-desc {
    font-size: 0.72rem !important;
  }
}

/* ==========================================================================
   ROOM LOBBY: ROOM LEADER / HOST CARD HIGHLIGHTING & STYLING
   ========================================================================== */

.lobby-player-item.is-room-leader,
.lobby-player-item.is-host {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.48) 0%, rgba(245, 158, 11, 0.18) 100%) !important;
  border: 1.8px solid #f59e0b !important;
  border-left: 5px solid #f59e0b !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3), inset 0 0 16px rgba(245, 158, 11, 0.08) !important;
  position: relative !important;
  transform: none !important;
}

.lobby-player-item.is-room-leader:hover,
.lobby-player-item.is-host:hover {
  border-color: #fbbf24 !important;
  border-left-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(245, 158, 11, 0.24) 100%) !important;
  box-shadow: 0 6px 26px rgba(251, 191, 36, 0.4), inset 0 0 20px rgba(251, 191, 36, 0.12) !important;
  transform: translateY(-2px) !important;
}

.player-role-tag.leader-tag {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  padding: 3px 9px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  letter-spacing: 0.3px !important;
  animation: leaderGlowPulse 2.4s infinite alternate ease-in-out !important;
}

@keyframes leaderGlowPulse {
  0% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  }

  100% {
    box-shadow: 0 2px 16px rgba(251, 191, 36, 0.75);
  }
}

.player-role-tag.player-tag {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.12) !important;
  border: 1px solid rgba(52, 211, 153, 0.25) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

.player-role-tag.bot-tag {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

.player-me-pill {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  background: rgba(99, 102, 241, 0.4) !important;
  border: 1px solid rgba(129, 140, 248, 0.6) !important;
  padding: 1px 6px !important;
  border-radius: 5px !important;
  margin-left: 2px !important;
  letter-spacing: 0.5px !important;
}

/* ==========================================================================
   SECTION SCROLL-DOWN HINT & LANGUAGE SELECTOR STYLES
   ========================================================================== */

.section-scroll-down-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 8px;
  padding: 8px 18px;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 20px;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(251, 191, 36, 0.12);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  touch-action: manipulation;
}

.section-scroll-down-hint:hover,
.section-scroll-down-hint:active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-color: #f59e0b;
  transform: translateY(2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.section-scroll-down-hint .scroll-hint-arrow {
  font-size: 0.74rem;
  display: inline-block;
  animation: scrollHintBounce 1.5s infinite ease-in-out;
}

.section-scroll-down-hint .scroll-hint-arrow:last-child {
  animation-delay: 0.25s;
}

@keyframes scrollHintBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateY(3px);
    opacity: 1;
    color: #fde047;
  }
}

.auth-lang-selector .btn-auth-lang.active {
  background: #fbbf24 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5) !important;
}

.auth-lang-selector .btn-auth-lang:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

.language-selection-group .btn-account-lang.active {
  background: rgba(251, 191, 36, 0.18) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.2) !important;
}

.language-selection-group .btn-account-lang:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   HIGH-CONTRAST ACCESSIBLE TYPOGRAPHY FOR ORANGE / AMBER BUTTONS & ELEMENTS
   Garantiza máxima legibilidad de texto blanco sobre fondos naranjas/dorados
   ========================================================================== */
.btn-primary,
.btn-action,
.btn-action-primary,
.btn-card-action-primary,
.btn-active-rejoin,
.bank-valid-glow,
#btn-buy-dev-card,
.btn-buy-star-action,
.btn-social-add-submit,
.btn-understood-elo,
#btn-join-room,
#btn-send-forgot-email,
#btn-submit-recovery-code,
#btn-submit-new-password,
#btn-close-verify-modal,
#btn-confirm-reconnect-popup,
#btn-close-unlock-modal,
#btn-roll-dice,
#btn-pass-turn,
.btn-confirm-trade,
.btn-counter-offer,
.btn-hud-icon.panel-open,
.btn-action-round.active,
.btn-action-round:active {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  font-weight: 900 !important;
  letter-spacing: 0.4px !important;
}

/* Regla universal para cualquier botón o elemento con fondo naranja/ámbar/dorado que tenga texto blanco */
button.btn-primary,
button[class*="orange"],
button[class*="amber"],
button[class*="primary"],
.trade-actions button,
.action-bar-right-controls button {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   📱 DISPLAY, NOTCH & SAFE AREA SETTINGS SWITCHES
   ========================================================================== */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

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

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #cbd5e1;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.switch-toggle input:checked+.slider-toggle {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.switch-toggle input:checked+.slider-toggle:before {
  transform: translateX(20px);
  background: #ffffff;
}

/* ==========================================================================
   📱 DYNAMIC DISPLAY SYSTEM: NOTCH & SAFE-AREA SYSTEM + IMMERSIVE FULLSCREEN
   ========================================================================== */

/* 1. Global Safe-Area CSS Variables */
:root {
  --safe-notch-pad-header: max(16px, env(safe-area-inset-top, 16px));
  --safe-notch-hud-top: max(16px, env(safe-area-inset-top, 16px));
  --safe-notch-dock-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  --safe-notch-tab-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  --safe-notch-side-pad: max(14px, env(safe-area-inset-left, 14px));
}

/* 2. MODO MARGEN NOTCH/CÁMARA ACTIVADO (Protección contra notch, isla dinámica y agujeros) */
body.has-notch-margin {
  --safe-notch-pad-header: max(28px, env(safe-area-inset-top, 28px));
  --safe-notch-hud-top: max(28px, env(safe-area-inset-top, 28px));
  --safe-notch-dock-bottom: max(18px, env(safe-area-inset-bottom, 18px));
  --safe-notch-tab-bottom: max(18px, env(safe-area-inset-bottom, 18px));
  --safe-notch-side-pad: max(20px, env(safe-area-inset-left, 20px));
}

body.has-notch-margin .app-header {
  height: calc(76px + max(18px, env(safe-area-inset-top, 18px))) !important;
  min-height: calc(76px + max(18px, env(safe-area-inset-top, 18px))) !important;
  padding-top: max(26px, env(safe-area-inset-top, 26px)) !important;
  padding-left: max(18px, env(safe-area-inset-left, 18px)) !important;
  padding-right: max(18px, env(safe-area-inset-right, 18px)) !important;
  padding-bottom: 12px !important;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.has-notch-margin #lobby-pages-viewport .lobby-page {
  padding-top: 14px !important;
  padding-bottom: 130px !important;
  padding-left: max(16px, env(safe-area-inset-left, 16px)) !important;
  padding-right: max(16px, env(safe-area-inset-right, 16px)) !important;
}

body.has-notch-margin .game-hud-top {
  padding-top: max(32px, env(safe-area-inset-top, 32px)) !important;
  padding-left: max(18px, env(safe-area-inset-left, 18px)) !important;
  padding-right: max(18px, env(safe-area-inset-right, 18px)) !important;
  transition: padding 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.has-notch-margin .tab-bar-bottom {
  padding-bottom: max(18px, calc(10px + env(safe-area-inset-bottom, 18px))) !important;
  height: calc(74px + max(0px, env(safe-area-inset-bottom, 0px))) !important;
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.25s ease, padding 0.28s ease, height 0.28s ease !important;
}

body.has-notch-margin .action-bar-bottom {
  bottom: 0 !important;
  padding-bottom: max(14px, calc(env(safe-area-inset-bottom, 14px) + 2px)) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  border-radius: 18px 18px 0 0 !important;
  transition: bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding 0.28s ease, left 0.28s ease, right 0.28s ease, width 0.28s ease !important;
}



/* Landscape Notch Clearance: Evita que la cámara perforada o notch horizontal tape iconos o botones */
@media (orientation: landscape) and (max-height: 550px) {
  body.has-notch-margin .game-hud-top {
    padding-left: max(38px, env(safe-area-inset-left, 38px)) !important;
    padding-right: max(38px, env(safe-area-inset-right, 38px)) !important;
    padding-top: max(10px, env(safe-area-inset-top, 10px)) !important;
  }

  body.has-notch-margin .action-bar-bottom {
    padding-left: max(32px, env(safe-area-inset-left, 32px)) !important;
    padding-right: max(32px, env(safe-area-inset-right, 32px)) !important;
  }

  body.has-notch-margin .app-header {
    padding-left: max(36px, env(safe-area-inset-left, 36px)) !important;
    padding-right: max(36px, env(safe-area-inset-right, 36px)) !important;
  }
}

/* 3. MODO BORDE A BORDE / SIN MARGEN (Ajuste al ras, maximalismo de pantalla) */
body.no-notch-margin {
  --safe-notch-pad-header: 4px;
  --safe-notch-hud-top: 4px;
  --safe-notch-dock-bottom: 2px;
  --safe-notch-tab-bottom: 4px;
  --safe-notch-side-pad: 4px;
}

body.no-notch-margin .app-header {
  height: 56px !important;
  min-height: 56px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.no-notch-margin #lobby-pages-viewport .lobby-page {
  padding-top: 6px !important;
  padding-bottom: 80px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

body.no-notch-margin .game-hud-top {
  padding-top: 4px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
  padding-bottom: 2px !important;
  transition: padding 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.no-notch-margin .tab-bar-bottom {
  padding-bottom: 2px !important;
  height: 75px !important;
  border-radius: 12px 12px 0 0 !important;
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.25s ease, padding 0.28s ease, height 0.28s ease !important;
}

body.no-notch-margin .action-bar-bottom {
  bottom: 0px !important;
  padding-bottom: 6px !important;
  padding-top: 6px !important;
  left: 0px !important;
  right: 0px !important;
  width: 100vw !important;
  max-width: 100vw !important;
  border-radius: 16px 16px 0 0 !important;
  transition: bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding 0.28s ease, left 0.28s ease, right 0.28s ease, width 0.28s ease !important;
}



/* 4. MODO INMERSIVO / PANTALLA COMPLETA (.is-immersive-mode) */
html.is-immersive-mode {
  height: 100% !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

body.is-immersive-mode {
  min-height: 100dvh !important;
  height: 100dvh !important;
}

/* En el Lobby: Compacta el header y amplía el espacio útil para tarjetas y paneles */
body.is-immersive-mode:not(.in-game) .app-header {
  height: 50px !important;
  min-height: 50px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.6) !important;
}

body.is-immersive-mode:not(.in-game) .header-logo-img {
  max-height: 30px !important;
}

body.is-immersive-mode:not(.in-game) .logo-text-branding {
  font-size: 1.8rem !important;
}

body.is-immersive-mode:not(.in-game) #lobby-pages-viewport .lobby-page {
  padding-top: 8px !important;
  padding-bottom: 95px !important;
}

/* En Partida Inmersiva */
body.is-immersive-mode.in-game {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  overscroll-behavior: none !important;
}

body.is-immersive-mode #game-screen {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.is-immersive-mode #game-container,
body.is-immersive-mode #board-container {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.is-immersive-mode #game-canvas,
body.is-immersive-mode #kmkz-board-canvas,
body.is-immersive-mode canvas#board {
  width: 100% !important;
  height: 100% !important;
}

body.is-immersive-mode .game-hud-top {
  min-height: 34px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, transparent 100%) !important;
}

body.is-immersive-mode .game-hud-top .btn-hud-icon,
body.is-immersive-mode .game-hud-top .btn-hud-top-nav {
  transform: scale(0.92) !important;
}

body.is-immersive-mode .action-bar-bottom {
  padding-top: 4px !important;
  padding-bottom: 6px !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.85) !important;
}

body.is-immersive-mode .res-card-hud {
  transform: scale(0.96) !important;
}

/* ==========================================================================
   ✨ KMKZ GOLDEN HEXAGON FAVICON SPLASH LOADER (Transversal Shimmer Sweep)
   ========================================================================== */
.kmkz-splash-coin-box {
  width: 150px;
  height: 150px;
  margin: 0 auto 16px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: kmkzCoinPopIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.kmkz-loader-icon-wrapper {
  position: relative;
  width: 136px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kmkz-loader-icon {
  width: 124px;
  height: 124px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.45)) drop-shadow(0 0 45px rgba(217, 119, 6, 0.3));
  animation: kmkzIconBreathing 2.4s ease-in-out infinite alternate;
}

@keyframes kmkzCoinPopIn {
  0% {
    transform: scale(0.65);
    opacity: 0;
  }

  60% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes kmkzIconBreathing {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.45)) drop-shadow(0 0 45px rgba(217, 119, 6, 0.3));
  }

  100% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.7)) drop-shadow(0 0 60px rgba(245, 158, 11, 0.45));
  }
}


/* ==========================================================================
   📜 DAILY MISSIONS / QUESTS SYSTEM (AAA Modern Gaming & Cyberpunk Hex Aesthetic)
   ========================================================================== */

/* ── 1. Modal Glass & Ambient Atmosphere ── */
#modal-daily-missions,
#modal-daily-quests {
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.22s ease !important;
}

#modal-daily-missions.closing,
#modal-daily-quests.closing {
  opacity: 0 !important;
  pointer-events: none !important;
}

.daily-missions-modal-glass,
.daily-quests-modal-content {
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.97) 0%, rgba(8, 12, 24, 0.99) 100%) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 20px !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(56, 189, 248, 0.12),
    0 0 40px rgba(245, 158, 11, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  max-width: 440px !important;
  width: min(94vw, 440px) !important;
  padding: 14px 14px 12px !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  max-height: min(90vh, 90dvh) !important;
  height: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  animation: modalQuestsIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transform-origin: center center !important;
  will-change: transform, opacity !important;
}

.daily-missions-modal-glass.closing,
.daily-quests-modal-content.closing {
  animation: modalQuestsOut 0.18s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none !important;
}

@keyframes modalQuestsIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalQuestsOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
}

.daily-missions-modal-glass::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.16) 0%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  z-index: 0;
}

.daily-missions-modal-glass::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  z-index: 0;
}

/* Scoped Compact Modern Header for Daily Quests Modal */
.daily-missions-modal-glass .time-rewards-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 8px !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.daily-missions-modal-glass .time-rewards-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.daily-missions-modal-glass .rewards-emblem-badge {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3) !important;
}

.daily-missions-modal-glass .rewards-title-group {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
  gap: 1px !important;
}

.daily-missions-modal-glass .rewards-main-title {
  margin: 0 !important;
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.daily-missions-modal-glass .rewards-subtitle {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.daily-missions-modal-glass .btn-close-rewards {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-size: 0.85rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

.daily-missions-modal-glass .btn-close-rewards:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  transform: scale(1.08) !important;
}

/* ── 2. Summary Battlepass Progress Banner ── */
.daily-quests-summary-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.75) 0%, rgba(12, 18, 34, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  box-sizing: border-box;
}

.quests-summary-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.quests-progress-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  color: #f8fafc;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.quests-summary-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(8, 12, 22, 0.9);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  position: relative;
  min-width: 40px;
}

.quests-summary-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #38bdf8 100%);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  position: relative;
}

.quests-summary-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: barShimmer 2.2s infinite linear;
}

@keyframes barShimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.quests-reset-timer-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
  background: rgba(10, 15, 28, 0.7);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.quests-reset-timer-pill strong {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.3px;
}

/* ── 3. Quests Cards List & Tiered Visual Styles ── */
.daily-quests-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 2px;
  max-height: min(46vh, 320px);
  overflow-y: auto;
  padding-right: 3px;
  box-sizing: border-box;
}

/* Custom Slim Scrollbar for missions list */
.daily-quests-body::-webkit-scrollbar {
  width: 3.5px;
}

.daily-quests-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 4px;
}

.daily-quests-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.quest-card {
  border-radius: 13px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  animation: questCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  box-sizing: border-box;
}

.quest-card:nth-child(1) {
  animation-delay: 0.04s;
}

.quest-card:nth-child(2) {
  animation-delay: 0.08s;
}

.quest-card:nth-child(3) {
  animation-delay: 0.12s;
}

.quest-card:nth-child(4) {
  animation-delay: 0.16s;
}

@keyframes questCardPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quest-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* Tier 1: Easy (Mint / Emerald Glow) */
.quest-card.tier-easy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(20, 29, 47, 0.88) 60%, rgba(12, 17, 31, 0.94) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.quest-card.tier-easy:hover {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(16, 185, 129, 0.2);
}

/* Tier 2: Medium (Amber / Gold Solar Glow) */
.quest-card.tier-medium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(20, 29, 47, 0.88) 60%, rgba(12, 17, 31, 0.94) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.quest-card.tier-medium:hover {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(245, 158, 11, 0.2);
}

/* Tier 3: Epic (Cyberpunk Amethyst Glow) */
.quest-card.tier-epic {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(20, 29, 47, 0.88) 60%, rgba(12, 17, 31, 0.94) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.quest-card.tier-epic:hover {
  border-color: rgba(192, 132, 252, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(168, 85, 247, 0.25);
}

/* Completed & Claimed States */
.quest-card.is-completed {
  border-color: #10b981 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25), inset 0 0 10px rgba(16, 185, 129, 0.08) !important;
}

.quest-card.is-claimed {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(20, 28, 44, 0.5) !important;
}

/* Top Section & Pedestals */
.quest-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quest-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.quest-icon-pedestal {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.18s ease;
}

.quest-card:hover .quest-icon-pedestal {
  transform: scale(1.06);
}

.quest-icon-pedestal.easy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.35) 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.quest-icon-pedestal.medium {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.quest-icon-pedestal.epic {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(126, 34, 206, 0.4) 100%);
  border: 1px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.quest-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.quest-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.quest-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.quest-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-diff-badge {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}

.quest-diff-badge.easy {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.quest-diff-badge.medium {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.quest-diff-badge.epic {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.5);
}

/* ── 3. Enhanced Task Progress Section & Bottom Bar ── */
.quest-progress-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 1px 0;
  box-sizing: border-box;
}

.quest-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.68rem;
}

.quest-progress-label {
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.quest-progress-counts {
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  white-space: nowrap;
}

.quest-progress-counts strong {
  color: #ffffff;
  font-weight: 900;
}

.quest-pct-tag {
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 800;
  margin-left: 2px;
}

.quest-progress-track {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.quest-progress-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(8, 12, 22, 0.85);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.quest-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.quest-progress-bar-fill.easy {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.quest-progress-bar-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.quest-progress-bar-fill.epic {
  background: linear-gradient(90deg, #a855f7, #c084fc);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

/* Bottom Action Row */
.quest-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 1px;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.quest-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.quest-reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(20, 29, 47, 0.9) 0%, rgba(10, 15, 28, 0.95) 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fef08a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  line-height: 1.2;
}

.reward-amount {
  font-family: 'Outfit', sans-serif;
  color: #fef08a;
  font-weight: 900;
}

.reward-xp {
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.68rem;
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 4px;
  border-radius: 4px;
}

.btn-reroll-quest {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  touch-action: manipulation;
  min-height: 24px;
}

.btn-reroll-quest:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  transform: scale(1.04);
}

.dice-spin-icon {
  font-size: 0.78rem;
  transition: transform 0.3s ease;
}

.btn-reroll-quest:hover .dice-spin-icon {
  transform: rotate(180deg);
}

.btn-claim-quest {
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.74rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  touch-action: manipulation;
  min-height: 26px;
}

.btn-claim-quest:hover {
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
}

.btn-claim-quest:active {
  transform: scale(0.96);
}

.btn-claim-quest.pulse-glow {
  animation: claimPulse 1.8s infinite ease-in-out;
}

@keyframes claimPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  }

  50% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 30px rgba(16, 185, 129, 0.3);
    transform: translateY(-0.5px);
  }
}

.quest-status-pill.claimed {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.quest-status-pill.claimed .check-icon {
  color: #10b981;
  font-weight: bold;
}

/* ── 4. Legendary Bonus Chest Showcase ── */
.daily-bonus-chest-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #0b1120;
  background-image:
    radial-gradient(circle at 92% 18%, rgba(245, 158, 11, 0.18) 0%, transparent 45%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(30, 27, 75, 0.95) 100%);
  border: 1.2px solid rgba(251, 191, 36, 0.5);
  border-radius: 13px;
  padding: 8px 12px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(254, 240, 138, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 2px;
  box-sizing: border-box;
}

.daily-bonus-chest-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(251, 191, 36, 0.08), transparent);
  transform: rotate(30deg);
  animation: chestCardShine 6s infinite linear;
  pointer-events: none;
}

/* KMKZ Hexagonal Sovereign Brand Seal (Watermark inside chest card) */
.chest-hex-brand-seal {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.chest-hex-brand-seal .hex-seal-svg {
  display: block;
  width: 32px !important;
  height: 36px !important;
}

/* Modal Scene Hexagonal Seal */
.scene-hex-brand-seal {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.75)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  animation: hexSealFloat 3.8s ease-in-out infinite alternate;
}

/* Flyout Hexagonal Seal */
.flyout-hex-brand-seal {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

@keyframes chestCardShine {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }

  100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

.chest-card-left {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.chest-icon-glow {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.7));
  animation: chestBob 2.4s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes chestBob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.04);
  }
}

.chest-info,
.chest-meta {
  min-width: 0;
  flex: 1;
  padding-right: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chest-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.84rem;
  color: #fbbf24;
  letter-spacing: 0.2px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.chest-desc {
  font-size: 0.68rem;
  color: #cbd5e1;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chest-card-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chest-reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fef08a;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-claim-chest {
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.74rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  touch-action: manipulation;
  min-height: 26px;
}

.btn-claim-chest.disabled,
.btn-claim-chest:disabled {
  background: rgba(51, 65, 85, 0.8) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.btn-claim-chest:not(:disabled):hover {
  transform: scale(1.04);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.85);
}

.btn-claim-chest:not(:disabled):active {
  transform: scale(0.96);
}

/* ══════════════════════════════════════════════════════════════════════════
     REWARDS & QUESTS MOBILE RESPONSIVE MEDIA QUERIES
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 580px) {
  .daily-missions-modal-glass,
  .daily-quests-modal-content {
    padding: 12px 10px 10px !important;
    border-radius: 16px !important;
    gap: 6px !important;
    max-height: min(92vh, 92dvh) !important;
  }

  .daily-quests-summary-banner {
    padding: 5px 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    margin-bottom: 2px !important;
  }

  .quests-summary-title {
    font-size: 0.8rem !important;
  }

  .quests-summary-progress {
    font-size: 0.72rem !important;
  }

  .quests-reset-timer-pill {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    border-radius: 6px !important;
  }

  .daily-quests-body {
    gap: 5px !important;
    margin-bottom: 2px !important;
    max-height: min(48vh, 320px) !important;
    padding-right: 2px !important;
  }

  .quest-card {
    padding: 7px 9px !important;
    border-radius: 11px !important;
    gap: 4px !important;
  }

  .quest-card-top {
    gap: 6px !important;
  }

  .quest-title-wrap {
    gap: 6px !important;
  }

  .quest-icon-pedestal {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }

  .quest-icon {
    font-size: 1rem !important;
  }

  .quest-title {
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
  }

  .quest-desc {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
  }

  .quest-diff-badge {
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
    border-radius: 5px !important;
  }

  .quest-progress-section {
    gap: 2px !important;
    margin: 1px 0 !important;
  }

  .quest-progress-header {
    font-size: 0.66rem !important;
  }

  .quest-progress-counts {
    font-size: 0.7rem !important;
  }

  .quest-card-bottom {
    gap: 6px !important;
    margin-top: 2px !important;
  }

  .quest-reward-pill {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
  }

  .btn-claim-quest {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    min-height: 25px !important;
    border-radius: 7px !important;
  }

  .btn-reroll-quest {
    padding: 3px 7px !important;
    font-size: 0.66rem !important;
    min-height: 23px !important;
    border-radius: 7px !important;
  }

  .quest-status-pill.claimed {
    padding: 3px 6px !important;
    font-size: 0.66rem !important;
    border-radius: 5px !important;
  }

  .daily-bonus-chest-card {
    padding: 6px 10px !important;
    border-radius: 11px !important;
    gap: 6px !important;
    margin-top: 2px !important;
  }

  .chest-card-left {
    gap: 6px !important;
  }

  .chest-icon-glow {
    font-size: 1.25rem !important;
  }

  .chest-title {
    font-size: 0.8rem !important;
  }

  .chest-desc {
    font-size: 0.66rem !important;
  }

  .chest-card-right {
    gap: 5px !important;
  }

  .chest-reward-badge {
    font-size: 0.68rem !important;
    padding: 2px 5px !important;
  }

  .btn-claim-chest {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    min-height: 25px !important;
    border-radius: 7px !important;
  }

  /* Time Rewards Modal Mobile Tweaks */
  .time-rewards-modal-glass {
    padding: 14px 12px !important;
    border-radius: 20px !important;
  }

  .time-reward-card {
    padding: 10px 10px !important;
    border-radius: 16px !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .time-reward-desc {
    font-size: 0.72rem !important;
  }

  .daily-streak-grid {
    gap: 2px !important;
  }

  .daily-streak-day {
    padding: 5px 1px !important;
    border-radius: 8px !important;
  }

  .daily-streak-day .day-number {
    font-size: 0.7rem !important;
  }

  .daily-streak-day .day-icon {
    font-size: 0.8rem !important;
  }

  .daily-streak-day .day-reward {
    font-size: 0.7rem !important;
  }

  .btn-claim-reward {
    padding: 9px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 380px) {
  .daily-missions-modal-glass,
  .daily-quests-modal-content {
    padding: 10px 8px 8px !important;
    border-radius: 14px !important;
    gap: 5px !important;
  }

  .time-rewards-modal-glass {
    padding: 12px 8px !important;
  }

  .quest-card {
    padding: 6px 7px !important;
    border-radius: 9px !important;
    gap: 3px !important;
  }

  .quest-icon-pedestal {
    width: 25px !important;
    height: 25px !important;
    border-radius: 6px !important;
  }

  .quest-icon {
    font-size: 0.9rem !important;
  }

  .quest-title {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
  }

  .quest-desc {
    font-size: 0.65rem !important;
  }

  .quest-diff-badge {
    font-size: 0.58rem !important;
    padding: 1px 4px !important;
  }

  .quest-reward-pill {
    font-size: 0.66rem !important;
    padding: 2px 5px !important;
  }

  .btn-claim-quest {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    min-height: 23px !important;
  }

  .btn-reroll-quest {
    padding: 2px 5px !important;
    font-size: 0.64rem !important;
    min-height: 22px !important;
  }

  .quest-status-pill.claimed {
    padding: 2px 5px !important;
    font-size: 0.64rem !important;
  }

  .daily-bonus-chest-card {
    padding: 5px 8px !important;
    border-radius: 9px !important;
  }

  .chest-title {
    font-size: 0.76rem !important;
  }

  .chest-desc {
    font-size: 0.64rem !important;
  }

  .chest-reward-badge {
    font-size: 0.66rem !important;
    padding: 2px 4px !important;
  }

  .btn-claim-chest {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    min-height: 23px !important;
  }

  .daily-streak-day .day-number {
    font-size: 0.7rem !important;
  }

  .daily-streak-day .day-icon {
    font-size: 0.72rem !important;
  }

  .daily-streak-day .day-reward {
    font-size: 0.7rem !important;
  }
}


/* ── 5. Lobby Screen Minimalist Missions Bar ── */
.quests-lobby-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.btn-quests-minimal {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  outline: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  overflow: hidden !important;
}

.btn-quests-minimal:hover {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.2) !important;
  transform: translateY(-1px) !important;
}

.btn-quests-minimal:active {
  transform: scale(0.99) !important;
}

.quests-min-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.quests-min-icon-box {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease !important;
}

.btn-quests-minimal:hover .quests-min-icon-box {
  transform: scale(1.08);
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
}

.quests-min-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.quests-min-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  gap: 1px !important;
}

.quests-min-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  color: #ffffff !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
  line-height: 1.25 !important;
}

.quests-min-sub {
  font-size: 0.73rem !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
  line-height: 1.2 !important;
}

.quests-min-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.quests-min-pill {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #7dd3fc !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  letter-spacing: 0.3px !important;
  font-family: 'Outfit', sans-serif !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.quests-min-arrow {
  color: #64748b !important;
  font-size: 1.3rem !important;
  line-height: 1 !important;
  font-weight: 300 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-quests-minimal:hover .quests-min-arrow {
  color: #38bdf8 !important;
  transform: translateX(2px) !important;
}

@media (max-width: 480px) {
  .btn-quests-minimal {
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .quests-min-icon-box {
    width: 32px !important;
    height: 32px !important;
  }

  .quests-min-icon {
    font-size: 1.1rem !important;
  }

  .quests-min-title {
    font-size: 0.85rem !important;
  }

  .quests-min-sub {
    font-size: 0.7rem !important;
  }

  .quests-min-pill {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }
}

/* ── 5b. Lobby Screen Minimalist Battle Pass Bar ── */
.battlepass-lobby-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.btn-battlepass-minimal {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, rgba(38, 28, 16, 0.8) 0%, rgba(20, 16, 32, 0.9) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 12px rgba(245, 158, 11, 0.15) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  outline: none !important;
  text-decoration: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  overflow: hidden !important;
}

.btn-battlepass-minimal:hover {
  background: linear-gradient(135deg, rgba(48, 34, 18, 0.95) 0%, rgba(26, 20, 42, 0.98) 100%) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.3) !important;
  transform: translateY(-1px) !important;
}

.btn-battlepass-minimal:active {
  transform: scale(0.99) !important;
}

.bp-min-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.bp-min-icon-box {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease !important;
}

.btn-battlepass-minimal:hover .bp-min-icon-box {
  transform: scale(1.08);
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.25);
}

.bp-min-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bp-min-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  gap: 1px !important;
}

.bp-min-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.bp-min-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  color: #ffffff !important;
  letter-spacing: 0.2px !important;
}

.bp-season-pill {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fef08a !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.bp-min-sub {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.bp-min-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.bp-min-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  letter-spacing: 0.3px !important;
  font-family: 'Outfit', sans-serif !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.bp-min-arrow {
  color: #64748b !important;
  font-size: 1.3rem !important;
  line-height: 1 !important;
  font-weight: 300 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-battlepass-minimal:hover .bp-min-arrow {
  color: #fbbf24 !important;
  transform: translateX(2px) !important;
}

@media (max-width: 480px) {
  .btn-battlepass-minimal {
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .bp-min-icon-box {
    width: 32px !important;
    height: 32px !important;
  }

  .bp-min-icon {
    font-size: 1.1rem !important;
  }

  .bp-min-title {
    font-size: 0.85rem !important;
  }

  .bp-min-sub {
    font-size: 0.7rem !important;
  }

  .bp-min-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }
}

/* ── 6. Header Quests Badge ── */
.quests-header-badge {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 4px 10px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.quests-header-badge:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5) !important;
  transform: translateY(-1px) !important;
}

.quests-ready-pill {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  padding: 2px 6px !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9) !important;
  animation: badgeBounce 1.5s infinite ease-in-out !important;
}

@keyframes badgeBounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

/* ==========================================================================
     LOBBY SEO & SEM CARD STYLES
     ========================================================================== */
/* Ocultar tarjeta SEO en la APK nativa, TWA o aplicación instalada */
@media all and (display-mode: standalone),
all and (display-mode: fullscreen),
all and (display-mode: minimal-ui) {

  .lobby-seo-content-card,
  #lobby-seo-content-card {
    display: none !important;
  }
}

body.is-apk .lobby-seo-content-card,
body.is-apk #lobby-seo-content-card,
body.is-twa .lobby-seo-content-card,
body.is-twa #lobby-seo-content-card,
body.is-standalone .lobby-seo-content-card,
body.is-standalone #lobby-seo-content-card,
html.is-apk .lobby-seo-content-card,
html.is-apk #lobby-seo-content-card,
html.is-standalone .lobby-seo-content-card,
html.is-standalone #lobby-seo-content-card {
  display: none !important;
}

.lobby-seo-content-card {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 24px 20px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.92) 55%, rgba(9, 14, 26, 0.98) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(251, 191, 36, 0.25);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(251, 191, 36, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lobby-seo-content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.8), rgba(56, 189, 248, 0.8), transparent);
  pointer-events: none;
}

.seo-card-glow-orb {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

/* Header & Badges */
.seo-card-header {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}

.seo-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.seo-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fbbf24;
  text-transform: uppercase;
}

.seo-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: seoPulseDot 2s infinite ease-in-out;
}

@keyframes seoPulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

.seo-badge-version {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

.seo-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.seo-title-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.seo-title-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 40%, #fbbf24 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 14px rgba(251, 191, 36, 0.2);
}

.seo-card-tagline {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* Grid of Features */
.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .seo-features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.seo-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  box-sizing: border-box;
}

.seo-feature-item:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1.5px);
}

.seo-feat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feat-multiplayer .seo-feat-icon-wrap {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
}

.feat-rooms .seo-feat-icon-wrap {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.3);
}

.feat-dice .seo-feat-icon-wrap {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.3);
}

.feat-ranks .seo-feat-icon-wrap {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.3);
}

.seo-feat-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.seo-feat-body {
  flex: 1;
  min-width: 0;
}

.seo-feat-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 3px 0;
  letter-spacing: 0.2px;
}

.seo-feat-desc {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

/* Modern Action Buttons Footer */
.seo-card-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .seo-card-footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Tactile Modern Action Buttons */
.seo-action-btn,
.seo-quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 52px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.88) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  text-decoration: none !important;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.seo-action-btn:hover,
.seo-quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #ffffff !important;
}

.seo-action-btn:active,
.seo-quick-link:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Action Button Themed Accents */
.btn-seo-rules {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.btn-seo-rules:hover {
  border-color: #fbbf24;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.25);
}

.btn-seo-app {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.btn-seo-app:hover {
  border-color: #22c55e;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.btn-seo-hub {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.btn-seo-hub:hover {
  border-color: #a855f7;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.seo-btn-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.seo-action-btn:hover .seo-btn-icon-wrap {
  transform: scale(1.08);
}

.seo-btn-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.seo-btn-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.seo-btn-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.seo-btn-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-btn-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  flex-shrink: 0;
}

.seo-btn-arrow {
  font-size: 0.95rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.seo-action-btn:hover .seo-btn-arrow {
  color: #ffffff;
  transform: translateX(3px);
}

/* ─── SHOP TEST MAP BUTTON & CONTAINER ──────────────────────────────────────── */
.shop-test-map-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 8px 0 14px 0;
  display: flex;
  justify-content: center;
}

.btn-shop-test-map {
  width: 100%;
  max-width: 520px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  text-align: center;
  box-sizing: border-box;
}

.btn-shop-test-map:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(251, 191, 36, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 0.2);
}

.btn-shop-test-map:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
  border-color: #fbbf24 !important;
}

.btn-shop-test-map:active {
  transform: translateY(1px);
}

.btn-shop-test-map.active-testing,
.btn-shop-test-map.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid #fbbf24;
  color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 10px rgba(245, 158, 11, 0.12);
}

.btn-shop-test-map .shop-test-map-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  color: #fbbf24;
  transition: transform 0.25s ease;
}

.btn-shop-test-map:hover .shop-test-map-icon {
  transform: scale(1.15) rotate(6deg);
}

.btn-shop-test-map.active-testing .shop-test-map-icon,
.btn-shop-test-map.active .shop-test-map-icon {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}

.btn-shop-test-map .shop-test-map-label {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 480px) {
  .btn-shop-test-map {
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 10px;
    gap: 6px;
  }

  .btn-shop-test-map .shop-test-map-icon {
    font-size: 0.95rem;
  }

  .btn-shop-test-map .shop-test-map-label {
    font-size: 0.78rem;
  }
}

.shop-test-map-container {
  width: 100%;
  margin-bottom: 16px;
  animation: testMapFadeSlide 0.25s ease forwards;
}

@keyframes testMapFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── COLLECTION TEST MAP SANDBOX (Responsive, Minimalist & Fullscreen) ───────────── */
#test-canvas-wrapper {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: clamp(320px, 48vh, 460px);
  min-height: 290px;
  background: radial-gradient(circle at 50% 40%, #0c1830 0%, #020617 100%);
  border-radius: 18px;
  border: 1.5px solid rgba(251, 191, 36, 0.4);
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 14px 35px rgba(0, 0, 0, 0.7);
  cursor: grab;
  margin: 0;
  box-sizing: border-box;
  transition: height 0.3s ease, border-radius 0.2s ease, border-color 0.2s ease;
  touch-action: pan-y !important;
  /* CRITICAL: Never block native page vertical scrolling */
}

#collection-test-map-canvas {
  touch-action: pan-y !important;
  /* Native page scroll passes through effortlessly */
}

#test-canvas-wrapper.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  z-index: 99999 !important;
  box-shadow: none !important;
  touch-action: none !important;
  /* In fullscreen: 360 degree pan and pinch zoom */
}

#test-canvas-wrapper.is-fullscreen canvas {
  width: 100vw !important;
  height: 100vh !important;
  touch-action: none !important;
}

body.test-sandbox-fullscreen-active {
  overflow: hidden !important;
}

/* Minimalist Glassmorphic Top Overlay HUD (Accessible 2 Rows Responsive) */
.test-sandbox-header-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  background: rgba(11, 19, 38, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  padding: 5px 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  z-index: 10;
  box-sizing: border-box;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#test-sandbox-hud-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  padding: 0;
}

.test-hud-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

.test-hud-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fbbf24;
  padding: 2.5px 7px;
  border-radius: 7px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  flex: 0 0 auto !important;
  letter-spacing: 0.4px;
  line-height: 1.2;
  user-select: none;
}

.test-hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2.5px 6px;
  border-radius: 7px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  justify-content: center;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.2;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
}

.test-hud-chip:hover,
.test-hud-chip:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fbbf24;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.test-hud-chip:active {
  transform: translateY(0);
}

.test-hud-chip.is-active {
  background: rgba(251, 191, 36, 0.22) !important;
  border-color: #fbbf24 !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4) !important;
}

.test-hud-chip .test-hud-chevron {
  font-size: 0.7rem;
  opacity: 0.75;
  margin-left: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  line-height: 1;
}

.test-hud-chip.is-active .test-hud-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: #fbbf24;
}

.test-hud-chip .test-hud-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.test-hud-chip .test-hud-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-hud-chip .test-hud-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Category subtle accent themes */
.test-hud-chip.hud-chip-color {
  border-color: rgba(239, 68, 68, 0.35);
}

.test-hud-chip.hud-chip-color:hover {
  border-color: #ef4444;
}

.test-hud-chip.hud-chip-building {
  border-color: rgba(245, 158, 11, 0.35);
}

.test-hud-chip.hud-chip-building:hover {
  border-color: #f59e0b;
}

.test-hud-chip.hud-chip-token {
  border-color: rgba(168, 85, 247, 0.35);
}

.test-hud-chip.hud-chip-token:hover {
  border-color: #a855f7;
}

.test-hud-chip.hud-chip-resource {
  border-color: rgba(16, 185, 129, 0.35);
}

.test-hud-chip.hud-chip-resource:hover {
  border-color: #10b981;
}

.test-hud-chip.hud-chip-hex {
  border-color: rgba(56, 189, 248, 0.35);
}

.test-hud-chip.hud-chip-hex:hover {
  border-color: #38bdf8;
}

.test-hud-chip.hud-chip-water {
  border-color: rgba(6, 182, 212, 0.35);
}

.test-hud-chip.hud-chip-water:hover {
  border-color: #06b6d4;
}

.test-hud-chip.hud-chip-island {
  border-color: rgba(234, 179, 8, 0.35);
}

.test-hud-chip.hud-chip-island:hover {
  border-color: #eab308;
}

/* ==========================================================================
   CASCADE DROPDOWN MENU FOR TEST MAP HUD (Quick Cosmetic Switcher)
   ========================================================================== */
.test-hud-cascade-menu {
  position: absolute;
  top: 58px;
  left: 10px;
  right: 10px;
  max-width: 480px;
  margin: 0 auto;
  max-height: calc(100% - 68px);
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(251, 191, 36, 0.2);
  border-radius: 14px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: testHudCascadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes testHudCascadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.test-hud-cascade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
  flex-shrink: 0;
}

.test-hud-cascade-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-hud-cascade-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.test-hud-cascade-count-pill {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef08a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.test-hud-cascade-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 800;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
}

.test-hud-cascade-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

/* Category Quick Tab Switcher inside Cascade */
.test-hud-cascade-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.test-hud-cascade-tabs::-webkit-scrollbar {
  display: none;
}

.test-hud-cascade-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.test-hud-cascade-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.test-hud-cascade-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.15));
  border-color: #fbbf24;
  color: #fbbf24;
  font-weight: 800;
}

/* Search bar */
.test-hud-cascade-search-wrap {
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.test-hud-cascade-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.74rem;
  color: #f1f5f9;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.test-hud-cascade-search-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.test-hud-cascade-search-input::placeholder {
  color: #64748b;
}

/* Scrollable List */
.test-hud-cascade-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.4) transparent;
}

.test-hud-cascade-list::-webkit-scrollbar {
  width: 5px;
}

.test-hud-cascade-list::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.4);
  border-radius: 10px;
}

.test-hud-cascade-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  padding: 6px 6px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Item row */
.test-hud-cascade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  min-height: 38px;
  box-sizing: border-box;
}

.test-hud-cascade-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateX(2px);
}

.test-hud-cascade-item.is-equipped {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.9));
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.test-hud-cascade-item.is-unowned {
  border-style: dashed;
  opacity: 0.88;
}

.test-hud-cascade-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.test-hud-cascade-item-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.test-hud-cascade-item-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
}

.test-hud-cascade-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.test-hud-cascade-item-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.test-hud-cascade-item-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-hud-cascade-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.test-hud-cascade-tag-new {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
}

.test-hud-cascade-tag-equipped {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
}

.test-hud-cascade-select-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.test-hud-cascade-item:hover .test-hud-cascade-select-btn {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #0f172a;
  font-weight: 800;
}

.test-hud-cascade-empty {
  text-align: center;
  padding: 20px 10px;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
}

/* Minimalist guide overlay */
#test-map-guide-hint {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 65px);
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(11, 19, 38, 0.82);
  padding: 3px 8px;
  border-radius: 7px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Accessible Floating Zoom & Pan Controls (Desktop & General) */
.test-map-controls-floating {
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 7px !important;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.test-map-controls-floating .btn-test-control {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
  color: #38bdf8 !important;
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 10px rgba(56, 189, 248, 0.25) !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease !important;
  touch-action: manipulation !important;
  padding: 0 !important;
}

.test-map-controls-floating .btn-test-control:hover {
  background: linear-gradient(145deg, #0284c7, #0369a1) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5) !important;
}

.test-map-controls-floating .btn-test-control:active {
  transform: scale(0.94) !important;
}

#test-zoom-badge {
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  color: #fbbf24 !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  font-size: 0.72rem !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 2px #000 !important;
  margin-bottom: 2px !important;
}

/* Mobile Responsiveness for Test Sandbox */
@media (max-width: 640px) {
  #test-canvas-wrapper {
    height: clamp(310px, 48vh, 400px);
    border-radius: 14px;
  }

  .test-sandbox-header-overlay {
    top: 6px;
    left: 6px;
    right: 6px;
    padding: 3px 6px;
    gap: 3px;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    border-radius: 10px;
  }

  .test-hud-row {
    gap: 3px;
  }

  .test-hud-chip {
    padding: 2px 4px;
    font-size: 0.7rem;
    border-radius: 6px;
  }

  .test-hud-live-pill {
    padding: 2px 5px;
    font-size: 0.7rem;
  }

  #test-map-guide-hint {
    font-size: 0.7rem;
    padding: 2px 6px;
    bottom: 6px;
    left: 6px;
    border-radius: 6px;
  }

  .test-map-controls-floating {
    bottom: 6px !important;
    right: 6px !important;
    gap: 5px !important;
  }

  .test-map-controls-floating .btn-test-control {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
  }

  #test-zoom-badge {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY & WCAG 2.2 COMPLIANCE (EAA 2025) & MOBILE-FIRST OPTIMIZATIONS
   ========================================================================== */

/* 1. Prefers-reduced-motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 2. Skip Link (WCAG 2.4.1 Bypass Blocks) */
.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  padding: 12px 20px;
  background: #2563eb;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 2px #60a5fa;
  z-index: 999999;
  text-decoration: none;
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

/* 3. Keyboard Focus Visible Enhancement (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

/* 4. High Contrast Mode (WCAG 1.4.11 / 1.4.3) */
@media (prefers-contrast: more) {
  :root {
    --text-primary: #ffffff !important;
    --border-glass: rgba(255, 255, 255, 0.4) !important;
  }

  .btn,
  button,
  input,
  select,
  textarea {
    border: 2px solid #ffffff !important;
  }
}

/* 5. Mobile-First Touch Targets & iOS Zoom Prevention (WCAG 2.5.5 / 2.5.8) */
input,
select,
textarea {
  font-size: max(16px, 1rem);
  /* Prevents auto-zoom on iOS Safari */
}

/* Smooth active feedback without gray tap highlight */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 6. Content-Visibility for Hidden Screens (Performance / LCP optimization) */
.screen:not(.active) {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* 7. Safe area padding for bottom bars on modern mobile devices */
.nav-bottom-bar,
.hud-bottom-bar,
.game-action-bar,
.mobile-action-bar {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

/* ═══════════════════════════════════════════════════════════════════════════
   KMKZ TUTORIAL ACADEMY & COMPREHENSIVE RULES STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.tutorial-academy-terminal {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 520px;
  z-index: 100005 !important;
  pointer-events: auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: tutFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tutorial-academy-terminal.has-custom-pos {
  animation: none !important;
  transform: none !important;
}

.tutorial-academy-terminal.is-docked-bottom {
  top: auto !important;
  bottom: 76px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.tutorial-academy-terminal.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  opacity: 0.94;
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.95), 0 0 40px rgba(56, 189, 248, 0.4) !important;
}

@keyframes tutFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -15px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.tut-terminal-card {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 18px 20px;
  color: #f8fafc;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  max-height: 86vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.tut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 14px;
  gap: 10px;
  cursor: grab;
  user-select: none;
}

.tut-header:active {
  cursor: grabbing;
}

.tut-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tut-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  letter-spacing: 0.2px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: none;
}

.tut-drag-handle:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
}

.tut-drag-icon {
  font-size: 0.85rem;
  line-height: 1;
  color: #38bdf8;
}

.tut-btn-dock {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

.tut-btn-dock:hover {
  background: rgba(245, 158, 11, 0.3) !important;
  border-color: #fbbf24 !important;
}

.tut-avatar-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tut-avatar-icon {
  font-size: 1.6rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tut-avatar-info {
  display: flex;
  flex-direction: column;
}

.tut-instructor-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #38bdf8;
  letter-spacing: 0.2px;
}

.tut-instructor-role {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.tut-step-counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tut-step-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}

.tut-dots-row {
  display: flex;
  gap: 5px;
  align-items: center;
}

.tut-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tut-dot.active {
  width: 18px;
  border-radius: 4px;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.tut-dot.completed {
  background: #22c55e;
}

.tut-body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.tut-title {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.tut-protip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 12px;
  color: #fef08a;
  font-size: 0.84rem;
  line-height: 1.45;
}

.tut-protip-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.tut-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.tut-footer-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tut-btn-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tut-btn-link:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.tut-btn-link.tut-skip:hover {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.tut-btn-link.tut-exit:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.tut-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tut-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
  border-color: #38bdf8;
}

.tut-btn-primary.pulse-primary {
  animation: tutBtnPulse 2s infinite;
}

.tut-btn-primary.pulse-gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4);
  animation: tutGoldPulse 2s infinite;
}

@keyframes tutBtnPulse {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  }

  50% {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.7);
  }
}

@keyframes tutGoldPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.4);
  }

  50% {
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.8);
  }
}

/* Tutorial Modes Cards Grid */
.tut-modes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.tut-mode-item {
  background: rgba(30, 41, 59, 0.7);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tut-mode-item:hover,
.tut-mode-item.active {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateX(2px);
}

.tut-mode-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tut-mode-icon {
  font-size: 1.1rem;
}

.tut-mode-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #f1f5f9;
  flex: 1;
}

.tut-mode-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tut-mode-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin-left: 24px;
}

.tut-btn-min {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tut-btn-min:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
}

/* Minimized mode for tutorial card */
.tutorial-academy-terminal.is-minimized {
  max-width: 320px;
  top: 10px;
}

.tutorial-academy-terminal.is-minimized .tut-terminal-card {
  padding: 8px 12px;
  max-height: none;
  overflow: visible;
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.tutorial-academy-terminal.is-minimized .tut-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tutorial-academy-terminal.is-minimized .tut-body,
.tutorial-academy-terminal.is-minimized .tut-footer {
  display: none !important;
}

/* Mobile & Small Screen Responsive Optimizations */
@media (max-width: 768px) {
  .tutorial-academy-terminal {
    top: 8px;
    width: 95%;
    max-width: 440px;
  }

  .tut-terminal-card {
    max-height: 42vh;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .tut-avatar-icon {
    font-size: 1.2rem;
    padding: 4px;
  }

  .tut-instructor-name {
    font-size: 0.85rem;
  }

  .tut-instructor-role {
    font-size: 0.7rem;
  }

  .tut-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .tut-body {
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .tut-protip {
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 0.78rem;
  }

  .tut-footer {
    margin-top: 10px;
    padding-top: 10px;
    gap: 8px;
  }

  .tut-btn-primary {
    padding: 9px 14px;
    font-size: 0.88rem;
  }

  .tut-btn-link {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
}

@media (max-height: 520px) {

  /* Landscape phone mode - dock to left so board is clearly visible */
  .tutorial-academy-terminal {
    top: 6px;
    left: 8px;
    transform: none;
    max-width: 320px;
    width: 42%;
  }

  .tut-terminal-card {
    max-height: 88vh;
    padding: 10px 12px;
  }
}

/* Rules Overlay Tabs System */
.rules-tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .rules-tabs-nav {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px !important;
  }

  .rules-tab-btn {
    padding: 6px 4px !important;
    font-size: 0.72rem !important;
  }
}

.rules-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 8px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1.2;
}

.rules-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.rules-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.rules-tab-panel {
  display: none;
  animation: rulesFadeIn 0.25s ease forwards;
}

.rules-tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes rulesFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Compact Visual Rules System (High Signal, Low Text) ─── */
.rules-quick-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  flex-wrap: wrap;
}

.rules-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 8px;
}

.rules-flow-arrow {
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 900;
}

/* ==========================================================================
   🚀 KMKZ HOW TO PLAY (CÓMO SE JUEGA) - ULTRA VISUAL SLIDE-BY-SLIDE SYSTEM
   High visual impact, animated flow arrows, minimal punchy text
   ========================================================================== */
.htp-overlay {
  z-index: 200000000 !important;
  background: rgba(4, 8, 18, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.htp-modal-window {
  z-index: 200000001 !important;
  max-width: 620px !important;
  width: 95% !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.15) !important;
  backdrop-filter: blur(28px) !important;
  border-radius: 24px !important;
  padding: 16px 20px 18px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Header */
.htp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.htp-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.htp-badge-brand {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-family: 'Cinzel', monospace, sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

.htp-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fbbf24 0%, #fef08a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.htp-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  transform: scale(1.08);
}

/* Step Navigation Pills */
.htp-steps-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.htp-steps-nav::-webkit-scrollbar {
  display: none;
}

.htp-step-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.2px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.htp-step-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.8);
}

.htp-step-pill.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.htp-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.htp-step-pill.active .htp-step-num {
  background: #38bdf8;
  color: #0f172a;
}

/* Viewport and Slides */
.htp-slider-viewport {
  position: relative;
  width: 100%;
  min-height: 290px;
  max-height: 52vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.htp-slider-viewport::-webkit-scrollbar {
  width: 5px;
}

.htp-slider-viewport::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 999px;
}

.htp-slides-track {
  width: 100%;
  position: relative;
}

.htp-slide {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.htp-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.htp-slide-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Arrows and Flow Glyphs */
.htp-flow-arrow {
  color: #38bdf8;
  font-size: 1.1rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
  animation: htpPulseArrow 1.8s infinite ease-in-out;
}

@keyframes htpPulseArrow {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.85;
  }

  50% {
    transform: translateX(3px);
    opacity: 1;
    filter: drop-shadow(0 0 10px #38bdf8);
  }
}

.htp-bidirectional-arrow {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 900;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

/* Slide 0: Trophy Goal */
.htp-trophy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
}

.htp-trophy-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
}

.htp-trophy-pts {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.5px;
  line-height: 1.1;
  font-family: 'Cinzel', monospace, sans-serif;
}

.htp-trophy-sub {
  font-size: 0.82rem;
  color: #fde68a;
  font-weight: 600;
  line-height: 1.3;
}

.htp-vp-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .htp-vp-sources-grid {
    grid-template-columns: 1fr;
  }
}

.htp-vp-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.htp-vp-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.htp-vp-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.htp-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.htp-card-text {
  display: flex;
  flex-direction: column;
}

.htp-card-text strong {
  font-size: 0.84rem;
  color: #ffffff;
}

.htp-card-hint {
  font-size: 0.70rem;
  color: #94a3b8;
}

.htp-pv-tag {
  font-size: 0.80rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 7px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.htp-pv-tag.gold {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* Slide 1: Turn Pipeline */
.htp-pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.htp-pipe-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 9px 14px;
  box-sizing: border-box;
  transition: transform 0.18s, border-color 0.18s;
}

.htp-pipe-step:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: scale(1.01);
}

.htp-pipe-badge {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.45);
}

.htp-pipe-step.end-step .htp-pipe-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.htp-pipe-content {
  flex: 1;
}

.htp-pipe-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-pipe-icon {
  font-size: 1rem;
}

.htp-pipe-header strong {
  font-size: 0.86rem;
  color: #f8fafc;
}

.htp-pipe-desc {
  margin: 2px 0 0 0;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.35;
}

.htp-pipe-arrow-down {
  color: #38bdf8;
  display: flex;
  justify-content: center;
  height: 16px;
  align-items: center;
  filter: drop-shadow(0 0 6px #38bdf8);
}

/* Slide 2: Board Diagram SVG */
.htp-board-diagram-wrapper {
  background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 8px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.htp-svg-hex-diagram {
  max-width: 100%;
  height: 155px;
  width: auto;
  display: block;
}

.htp-diagram-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 540px) {
  .htp-diagram-cards {
    grid-template-columns: 1fr;
  }
}

.htp-diagram-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.htp-diagram-card.border-green {
  border-color: rgba(34, 197, 94, 0.4);
}

.htp-diagram-card.border-orange {
  border-color: rgba(249, 115, 22, 0.4);
}

.htp-diagram-card.border-red {
  border-color: rgba(239, 68, 68, 0.4);
}

.htp-dcard-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #ffffff;
}

.htp-dcard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.htp-dcard-dot.green {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.htp-dcard-dot.orange {
  background: #f97316;
  box-shadow: 0 0 6px #f97316;
}

.htp-dcard-dot.red {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.htp-dcard-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Slide 3: Recipes */
.htp-recipes-container {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.htp-recipe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 9px 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.htp-recipe-target {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.htp-target-icon {
  font-size: 1.2rem;
}

.htp-target-meta {
  display: flex;
  flex-direction: column;
}

.htp-target-meta strong {
  font-size: 0.84rem;
  color: #f8fafc;
}

.htp-target-tag {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
}

.htp-target-tag.gold {
  color: #fbbf24;
}

.htp-target-tag.cyan {
  color: #38bdf8;
}

.htp-target-tag.purple {
  color: #c084fc;
}

.htp-recipe-arrow {
  color: #fbbf24;
  font-size: 1.1rem;
  font-weight: 900;
}

.htp-recipe-tokens {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.htp-token {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid transparent;
}

.htp-token.wood {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.htp-token.brick {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.htp-token.sheep {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
}

.htp-token.wheat {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.45);
  color: #fde047;
}

.htp-token.ore {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
}

.htp-plus {
  color: #64748b;
  font-weight: 900;
  font-size: 0.72rem;
}

/* Slide 4: Trading */
.htp-trades-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.htp-trade-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.htp-trade-card.highlight-glow {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
}

.htp-trade-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #ffffff;
}

.htp-tag-free {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
}

.htp-tag-default {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
}

.htp-trade-flow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.htp-chip-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #f1f5f9;
}

.htp-chip-box.gold {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}

.htp-trade-tip {
  font-size: 0.72rem;
  color: #94a3b8;
}

.htp-trade-ports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.htp-port-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.htp-port-val {
  font-weight: 900;
  color: #38bdf8;
}

.htp-port-val.green {
  color: #86efac;
}

.htp-shortcut-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.74rem;
  color: #7dd3fc;
}

/* Slide 5: The 7 & Robber */
.htp-robber-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.08) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  border-radius: 16px;
  padding: 10px 14px;
}

.htp-seven-dice {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-dice-icon {
  font-size: 1.3rem;
}

.htp-eq {
  color: #fca5a5;
  font-weight: 900;
  font-size: 0.9rem;
}

.htp-seven-badge {
  background: #ef4444;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  font-family: 'Cinzel', monospace, sans-serif;
}

.htp-seven-sub {
  font-size: 0.78rem;
  color: #fca5a5;
  font-weight: 700;
}

.htp-robber-branches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.htp-branch-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
}

.htp-branch-card.branch-red {
  border-left: 4px solid #ef4444;
}

.htp-branch-card.branch-blue {
  border-left: 4px solid #38bdf8;
}

.htp-branch-card.branch-gold {
  border-left: 4px solid #fbbf24;
}

.htp-branch-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-branch-icon {
  font-size: 1.2rem;
}

.htp-branch-info {
  flex: 1;
}

.htp-branch-info strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
}

.htp-branch-info p {
  margin: 2px 0 0 0;
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.3;
}

.htp-knight-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 8px 12px;
  border-radius: 12px;
}

.htp-knight-badge {
  font-size: 1.3rem;
}

.htp-knight-text {
  font-size: 0.74rem;
  color: #c7d2fe;
  line-height: 1.3;
}

/* Slide 6: KMKZ Modes */
.htp-modes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.htp-mode-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s;
}

.htp-mode-card.mode-recycle {
  border-color: rgba(34, 197, 94, 0.4);
}

.htp-mode-card.mode-gold {
  border-color: rgba(251, 191, 36, 0.4);
}

.htp-mode-card.mode-islands {
  border-color: rgba(56, 189, 248, 0.4);
}

.htp-mode-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #ffffff;
}

.htp-mode-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
}

.htp-mode-desc {
  margin: 0;
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Footer Navigation */
.htp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.htp-footer-left {
  display: flex;
  align-items: center;
}

.htp-btn-launch-tutorial {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(147, 51, 234, 0.25) 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.htp-btn-launch-tutorial:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(147, 51, 234, 0.4) 100%);
  border-color: rgba(168, 85, 247, 0.7);
  transform: translateY(-1px);
  color: #ffffff;
}

.htp-dots-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.htp-dot.active {
  background: #38bdf8;
  width: 20px;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.htp-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.htp-btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.htp-btn-nav:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.htp-btn-nav.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.htp-btn-nav.htp-next {
  background: linear-gradient(135deg, #0284c7 0%, #0284c7 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

.htp-btn-nav.htp-next:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.6);
  transform: translateY(-1px);
}

.htp-btn-nav-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

/* Mobile fine-tuning */
@media (max-width: 480px) {
  .htp-modal-window {
    padding: 12px 14px 14px 14px !important;
    max-height: 90vh !important;
    gap: 10px !important;
  }

  .htp-title {
    font-size: 1.05rem;
  }

  .htp-step-name {
    display: none;
  }

  .htp-step-pill {
    padding: 5px 8px;
  }

  .htp-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .htp-footer-left {
    justify-content: center;
  }

  .htp-dots-wrapper {
    justify-content: center;
    order: -1;
  }

  .htp-footer-right {
    justify-content: space-between;
  }

  .htp-btn-nav {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   💎 Tab 4: Colono Crush Embedded Match-3 Mini-Game
   Ultra-optimized, zero-allocation pooling, responsive layout
   ========================================================================== */
.colono-crush-embedded-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 440px !important;
  margin: 4px auto 10px auto !important;
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #0f172a 90%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 20px !important;
  padding: 14px 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  position: relative !important;
}

/* HUD */
.crush-hud {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.crush-hud-item {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 6px 10px !important;
  flex: 1 !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.crush-hud-label {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  margin-bottom: 2px !important;
}

.crush-hud-value {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  font-family: 'Cinzel', monospace, sans-serif !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4) !important;
}

.crush-hud-item.timer-box .timer-val {
  color: #38bdf8 !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

/* Timer Progress Bar */
.crush-timer-bar-wrap {
  width: 100% !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin-bottom: 6px !important;
}

.crush-timer-bar-fill {
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, #10b981 0%, #fbbf24 60%, #ef4444 100%) !important;
  transition: width 0.3s linear !important;
}

/* Combo Badge */
.crush-combo-badge {
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.8) !important;
  opacity: 0 !important;
  transform: scale(0.85) !important;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none !important;
  margin-bottom: 2px !important;
}

.crush-combo-badge.show {
  opacity: 1 !important;
  transform: scale(1.1) !important;
}

/* 8x8 Board Container */
.crush-board-wrapper {
  position: relative !important;
  width: 100% !important;
  max-width: 380px !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
  background: rgba(10, 14, 26, 0.95) !important;
  border: 2px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 16px !important;
  padding: 6px !important;
  box-sizing: border-box !important;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

.crush-grid {
  display: grid !important;
  grid-template-columns: repeat(8, 1fr) !important;
  grid-template-rows: repeat(8, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
}

/* Pooled Tiles */
.m3-tile {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s, box-shadow 0.15s !important;
  font-size: 1.35rem !important;
  position: relative !important;
  will-change: transform !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.m3-tile:hover {
  transform: scale(1.05) !important;
  filter: brightness(1.15) !important;
}

.m3-tile.selected {
  outline: 2.5px solid #fbbf24 !important;
  transform: scale(1.08) !important;
  z-index: 5 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8) !important;
}

.m3-tile.matched {
  transform: scale(1.25) !important;
  opacity: 0 !important;
  transition: transform 0.22s ease-out, opacity 0.22s ease-out !important;
}

/* Resource Theming */
.m3-tile.wood {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(6, 78, 59, 0.6) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.m3-tile.brick {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35) 0%, rgba(127, 29, 29, 0.6) 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.m3-tile.sheep {
  background: radial-gradient(circle, rgba(132, 204, 22, 0.35) 0%, rgba(54, 83, 20, 0.6) 100%) !important;
  border: 1px solid rgba(132, 204, 22, 0.4) !important;
}

.m3-tile.wheat {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(120, 53, 15, 0.6) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.m3-tile.ore {
  background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, rgba(49, 46, 129, 0.6) 100%) !important;
  border: 1px solid rgba(129, 140, 248, 0.4) !important;
}

.m3-tile.special-bomb {
  background: radial-gradient(circle, #f97316 0%, #7c2d12 100%) !important;
  border: 1.5px solid #ffedd5 !important;
  animation: bombPulse 1s infinite alternate !important;
}

.m3-tile.special-lightning {
  background: radial-gradient(circle, #38bdf8 0%, #0369a1 100%) !important;
  border: 1.5px solid #e0f2fe !important;
  animation: lightningPulse 0.8s infinite alternate !important;
}

@keyframes bombPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.4);
  }

  100% {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.9);
  }
}

@keyframes lightningPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
  }

  100% {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.9);
  }
}

/* Floating Pop Score */
.crush-float-score {
  position: absolute !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(251, 191, 36, 0.8) !important;
  pointer-events: none !important;
  z-index: 20 !important;
  animation: floatScore 0.65s ease-out forwards !important;
}

@keyframes floatScore {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -80%) scale(1.15);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -120%) scale(1.25);
  }
}

/* Board Overlays */
.crush-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 30 !important;
  border-radius: 14px !important;
  transition: opacity 0.25s ease !important;
}

.crush-overlay.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.crush-overlay-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 16px !important;
  text-align: center !important;
}

.crush-overlay-content.hidden {
  display: none !important;
}

.crush-overlay-icon {
  font-size: 2.2rem !important;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.5)) !important;
}

.crush-overlay-icon.crush-custom-resources {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-bottom: 4px !important;
}

.crush-res-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  padding: 8px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.crush-overlay-icon.crush-custom-trophy {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 4px !important;
}

.crush-tip-icon {
  display: inline-flex !important;
  vertical-align: middle !important;
  margin-right: 4px !important;
  font-size: 0.95rem !important;
}

.crush-overlay-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #fff, #fde68a, #f59e0b) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.crush-overlay-desc {
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  max-width: 260px !important;
}

.crush-reward-badge {
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  color: #cbd5e1 !important;
}

.crush-btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  padding: 10px 22px !important;
  border-radius: 12px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
  transition: transform 0.15s, box-shadow 0.15s !important;
}

.crush-btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
}

.crush-btn-primary:active {
  transform: scale(0.97) !important;
}

.crush-gameover-stats {
  display: flex !important;
  gap: 10px !important;
  width: 100% !important;
  justify-content: center !important;
  margin: 4px 0 !important;
}

.crush-gameover-stats .stat-pill {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.crush-gameover-stats .stat-pill.highlight {
  border-color: rgba(251, 191, 36, 0.4) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.crush-gameover-stats .stat-pill .stat-lbl {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.crush-gameover-stats .stat-pill .stat-val {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #fff !important;
}

.crush-gameover-stats .stat-pill.highlight .stat-val {
  color: #fbbf24 !important;
}

.crush-footer-tips {
  margin-top: 8px !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

/* Mobile Responsiveness for 8x8 Board */
@media (max-width: 480px) {
  .crush-board-wrapper {
    max-width: 320px !important;
    padding: 4px !important;
  }

  .crush-grid {
    gap: 3px !important;
  }

  .m3-tile {
    font-size: 1.15rem !important;
    border-radius: 6px !important;
  }

  .crush-hud-value {
    font-size: 1rem !important;
  }
}

/* ==========================================================================
   📱 Smart App Banner (Handoff from WhatsApp / External Mobile Browser)
   ========================================================================== */
.kmkz-smart-app-banner {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999999 !important;
  padding: 10px 14px 6px 14px !important;
  padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
  box-sizing: border-box !important;
  background: transparent !important;
  pointer-events: none !important;
  animation: bannerSlideDown 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
}

.kmkz-smart-app-banner.banner-auto-hidden,
.kmkz-smart-app-banner.hidden,
body.is-apk .kmkz-smart-app-banner,
body.is-standalone .kmkz-smart-app-banner,
body.is-app .kmkz-smart-app-banner,
body.in-game .kmkz-smart-app-banner,
body.canvas-mode .kmkz-smart-app-banner,
body.is-immersive-mode .kmkz-smart-app-banner,
html.is-immersive-mode .kmkz-smart-app-banner,
body.screen-game-screen .kmkz-smart-app-banner,
body.screen-room-lobby-screen .kmkz-smart-app-banner {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-120%) scale(0.95) !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

@keyframes bannerSlideDown {
  from {
    transform: translateY(-110%) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.kmkz-smart-app-banner .banner-inner {
  pointer-events: auto !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  gap: 11px !important;
  padding: 7px 11px 7px 8px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(10, 15, 30, 0.88) 0%, rgba(22, 26, 50, 0.92) 55%, rgba(12, 17, 34, 0.94) 100%) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 0 18px rgba(245, 158, 11, 0.1) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.kmkz-smart-app-banner .banner-inner::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 12% !important;
  right: 12% !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(251, 191, 36, 0.65) 50%, transparent 100%) !important;
  pointer-events: none !important;
}

.kmkz-smart-app-banner .banner-icon-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, rgba(26, 36, 60, 0.9) 0%, rgba(10, 15, 28, 0.95) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 158, 11, 0.15) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.kmkz-smart-app-banner .banner-icon {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.kmkz-smart-app-banner:hover .banner-icon {
  transform: scale(1.08) !important;
}

.kmkz-smart-app-banner .banner-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  flex: 1 !important;
  min-width: 0 !important;
  line-height: 1.22 !important;
  gap: 2px !important;
}

.kmkz-smart-app-banner .banner-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.kmkz-smart-app-banner .banner-title {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.4px !important;
  line-height: 1 !important;
}

.kmkz-smart-app-banner .banner-tag {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  padding: 1.5px 6px !important;
  border-radius: 999px !important;
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
  line-height: 1.1 !important;
}

.kmkz-smart-app-banner .banner-sub {
  font-size: 0.71rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: 500 !important;
}

.kmkz-smart-app-banner .banner-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.kmkz-smart-app-banner .banner-cta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0b0f19 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35), 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  white-space: nowrap !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.kmkz-smart-app-banner .banner-cta:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
}

.kmkz-smart-app-banner .banner-cta:active {
  transform: scale(0.95) !important;
}

.kmkz-smart-app-banner .banner-cta-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #0b0f19 !important;
}

.kmkz-smart-app-banner .banner-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.kmkz-smart-app-banner .banner-close:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.06) !important;
}

.kmkz-smart-app-banner .banner-close:active {
  transform: scale(0.92) !important;
}

@media (max-width: 480px) {
  .kmkz-smart-app-banner {
    padding: 6px 10px 4px 10px !important;
    padding-top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
  }

  .kmkz-smart-app-banner .banner-inner {
    gap: 8px !important;
    padding: 6px 9px 6px 7px !important;
    border-radius: 14px !important;
  }

  .kmkz-smart-app-banner .banner-icon-wrap {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .kmkz-smart-app-banner .banner-icon {
    width: 26px !important;
    height: 26px !important;
  }

  .kmkz-smart-app-banner .banner-title {
    font-size: 0.8rem !important;
  }

  .kmkz-smart-app-banner .banner-tag {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }

  .kmkz-smart-app-banner .banner-sub {
    font-size: 0.7rem !important;
    max-width: 140px !important;
  }

  .kmkz-smart-app-banner .banner-cta {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  .kmkz-smart-app-banner .banner-close {
    width: 24px !important;
    height: 24px !important;
  }
}

/* =========================================
   PWA Exclusive Push Notification Modal
   ========================================= */
.pwa-push-icon-glow {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.05) 70%, transparent 100%);
  border-radius: 50%;
}

.pwa-bell-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.5);
  animation: pwaBellPulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pwaBellPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.pwa-push-bell {
  font-size: 2.3rem;
  display: inline-block;
  animation: pwaBellWiggle 3s infinite ease-in-out;
}

@keyframes pwaBellWiggle {

  0%,
  80%,
  100% {
    transform: rotate(0);
  }

  85% {
    transform: rotate(14deg);
  }

  90% {
    transform: rotate(-14deg);
  }

  95% {
    transform: rotate(8deg);
  }
}

#btn-pwa-skip-push:hover {
  color: #94a3b8 !important;
  text-decoration: underline;
}

/* =========================================
   Honor Karma System & Peaceful Exit Modals
   ========================================= */
.player-honor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.player-honor-badge:hover {
  transform: translateY(-1px);
}

/* 1. Dev / Admin */
.player-honor-badge.honor-dev {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.15));
  border: 1px solid #eab308;
  color: #fef08a;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.35);
}

/* 2. Caballero (90% - 100%) */
.player-honor-badge.honor-knight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
  border: 1px solid #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* 3. Confiable (75% - 89%) */
.player-honor-badge.honor-reliable {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(2, 132, 199, 0.15));
  border: 1px solid #0ea5e9;
  color: #7dd3fc;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.25);
}

/* 4. Dudoso (50% - 74%) */
.player-honor-badge.honor-doubtful {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid #f59e0b;
  color: #fde047;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

/* 5. Desertor habitual (< 50%) */
.player-honor-badge.honor-leaver {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.15));
  border: 1px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: pulseHonorLeaver 2s infinite ease-in-out;
}

@keyframes pulseHonorLeaver {

  0%,
  100% {
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  }
}

/* =========================================
   Inactivity Warning & Session Suspension Modals
   ========================================= */
@keyframes bounceInactivity {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.04);
  }
}

@keyframes pulseSuspendedGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25), inset 0 0 10px rgba(56, 189, 248, 0.15);
    transform: translateY(0) scale(1);
  }

  50% {
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.45), inset 0 0 16px rgba(56, 189, 248, 0.28);
    transform: translateY(-3px) scale(1.03);
  }
}

.inactivity-modal-card {
  animation: popInInactivity 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: min(92vw, 380px) !important;
  width: 92vw !important;
  max-height: min(90dvh, 90vh) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  box-sizing: border-box !important;
  padding: clamp(16px, 4vw, 26px) clamp(14px, 4vw, 22px) !important;
  border-radius: clamp(16px, 4vw, 24px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: center !important;
}

.session-suspended-card {
  position: relative !important;
  animation: popInInactivity 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  width: 100% !important;
  max-width: min(calc(100vw - 24px), 430px) !important;
  max-height: min(92dvh, calc(100vh - 20px)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  box-sizing: border-box !important;
  padding: clamp(18px, 4.5vw, 28px) clamp(16px, 4vw, 26px) !important;
  border-radius: clamp(18px, 4vw, 26px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: center !important;
  margin: auto !important;
  background: radial-gradient(130% 90% at 50% 0%, rgba(14, 165, 233, 0.16) 0%, rgba(15, 23, 42, 0.98) 50%, rgba(6, 11, 25, 0.99) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.96), 0 0 50px rgba(14, 165, 233, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
}

.session-suspended-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #fde047, #38bdf8, transparent);
  border-radius: 2px;
  pointer-events: none;
}

.inactivity-modal-card {
  position: relative !important;
  animation: popInInactivity 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  width: 100% !important;
  max-width: min(calc(100vw - 24px), 430px) !important;
  max-height: min(92dvh, calc(100vh - 20px)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  box-sizing: border-box !important;
  padding: clamp(18px, 4.5vw, 28px) clamp(16px, 4vw, 26px) !important;
  border-radius: clamp(18px, 4vw, 26px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: center !important;
  margin: auto !important;
  background: radial-gradient(130% 90% at 50% 0%, rgba(245, 158, 11, 0.16) 0%, rgba(15, 23, 42, 0.98) 50%, rgba(6, 11, 25, 0.99) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.96), 0 0 50px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
}

.inactivity-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, #ef4444, #fbbf24, transparent);
  border-radius: 2px;
  pointer-events: none;
}

/* Custom scrollbars for small viewports */
.inactivity-modal-card::-webkit-scrollbar,
.session-suspended-card::-webkit-scrollbar {
  width: 4px;
}

.inactivity-modal-card::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

.session-suspended-card::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}

/* Status Pills */
.suspended-status-pill,
.inactivity-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto clamp(8px, 1.8vh, 14px) auto !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  box-sizing: border-box !important;
  font-family: 'Cinzel', 'Outfit', sans-serif !important;
  font-size: clamp(0.68rem, 2.2vw, 0.74rem) !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  flex-shrink: 0 !important;
}

.suspended-status-pill {
  background: rgba(14, 165, 233, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2), inset 0 0 8px rgba(56, 189, 248, 0.1) !important;
  color: #7dd3fc !important;
}

.inactivity-status-pill {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2), inset 0 0 8px rgba(245, 158, 11, 0.1) !important;
  color: #fde047 !important;
}

.suspended-status-dot,
.inactivity-status-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.suspended-status-dot {
  background: #38bdf8 !important;
  box-shadow: 0 0 8px #38bdf8 !important;
  animation: radarDotPulse 2s infinite ease-in-out !important;
}

.inactivity-status-dot {
  background: #fbbf24 !important;
  box-shadow: 0 0 8px #fbbf24 !important;
  animation: radarDotPulse 1.8s infinite ease-in-out !important;
}

@keyframes radarDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

/* Hexagonal Emblems */
.suspended-hex-emblem,
.inactivity-hex-emblem {
  position: relative !important;
  width: clamp(68px, 15vw, 86px) !important;
  height: clamp(78px, 17vw, 98px) !important;
  margin: 0 auto clamp(8px, 1.8vh, 14px) auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.suspended-hex-glow {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.08) 60%, transparent 80%);
  filter: blur(14px);
  animation: hexAuraPulse 3s infinite ease-in-out;
  pointer-events: none;
}

.inactivity-hex-glow {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.08) 60%, transparent 80%);
  filter: blur(14px);
  animation: hexAuraPulse 2.4s infinite ease-in-out;
  pointer-events: none;
}

.suspended-hex-svg,
.inactivity-hex-svg {
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.8)) !important;
  overflow: visible !important;
}

@keyframes hexAuraPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* Modal Title */
.inactivity-modal-title {
  margin: 0 0 clamp(4px, 1vh, 8px) 0 !important;
  font-family: 'Cinzel', 'Outfit', sans-serif !important;
  font-size: clamp(1.25rem, 4.2vw, 1.55rem) !important;
  font-weight: 900 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 55%, #94a3b8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7)) !important;
  line-height: 1.2 !important;
  word-break: break-word !important;
}

/* Modal Description */
.inactivity-modal-desc {
  font-size: clamp(0.78rem, 2.7vw, 0.86rem) !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  margin: 0 auto clamp(12px, 2.2vh, 18px) auto !important;
  max-width: 380px !important;
  word-break: break-word !important;
}

/* Reassurance Matrix: 3 Cyber Tiles */
.suspended-assurance-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: clamp(6px, 1.6vw, 10px) !important;
  margin: 0 0 clamp(16px, 2.8vh, 22px) 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.suspended-assurance-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(8px, 1.8vw, 12px) clamp(4px, 1.2vw, 8px) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.65) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: clamp(10px, 2vw, 14px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  text-align: center !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
}

.suspended-assurance-tile:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
}

.assurance-tile-icon {
  width: clamp(24px, 5.5vw, 30px) !important;
  height: clamp(24px, 5.5vw, 30px) !important;
  margin-bottom: 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.assurance-tile-icon svg {
  width: 100% !important;
  height: 100% !important;
}

.assurance-tile-icon.cyan {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5)) !important;
}

.assurance-tile-icon.gold {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5)) !important;
}

.assurance-tile-icon.purple {
  color: #c084fc !important;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.5)) !important;
}

.assurance-tile-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.assurance-tile-label {
  font-size: clamp(0.68rem, 2.2vw, 0.74rem) !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.2px !important;
}

.assurance-tile-sub {
  font-size: clamp(0.58rem, 1.8vw, 0.64rem) !important;
  color: #64748b !important;
  line-height: 1.2 !important;
}

/* Countdown bar & text */
.inactivity-progress-track {
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  height: 6px !important;
  overflow: hidden !important;
  margin-bottom: clamp(8px, 1.5vh, 12px) !important;
  width: 100% !important;
  flex-shrink: 0 !important;
}

.inactivity-progress-fill {
  height: 100% !important;
  width: 100% !important;
  background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
  transition: width 0.2s linear !important;
}

.inactivity-countdown-wrap {
  font-size: clamp(0.74rem, 2.5vw, 0.8rem) !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
  margin-bottom: clamp(12px, 2.2vh, 18px) !important;
}

.inactivity-countdown-num {
  font-size: 1.1em !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

/* Safe account note */
.inactivity-safe-note {
  font-size: clamp(0.72rem, 2.4vw, 0.78rem) !important;
  color: #64748b !important;
  margin: 0 0 clamp(12px, 2.2vh, 20px) 0 !important;
  line-height: 1.4 !important;
}

@keyframes popInInactivity {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* AAA Action Buttons */
.btn-suspended-resume,
.btn-inactivity-confirm {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: clamp(12px, 2.6vw, 15px) clamp(16px, 3.5vw, 24px) !important;
  border-radius: clamp(12px, 2.5vw, 16px) !important;
  cursor: pointer !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  min-height: 48px !important;
  margin-top: clamp(8px, 1.6vh, 14px) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-suspended-resume {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #075985 100%) !important;
  border: 1.5px solid #38bdf8 !important;
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.45), 0 0 20px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-inactivity-confirm {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.45), 0 0 20px rgba(251, 191, 36, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-suspended-resume:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 12px 35px rgba(14, 165, 233, 0.6), 0 0 28px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.btn-inactivity-confirm:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.6), 0 0 28px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.btn-suspended-resume:active,
.btn-inactivity-confirm:active {
  transform: translateY(1px) scale(0.99) !important;
  filter: brightness(0.95) !important;
}

.btn-shimmer-sweep {
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-22deg);
  animation: btnSweepShimmer 3.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes btnSweepShimmer {
  0% {
    left: -120%;
  }
  35%, 100% {
    left: 160%;
  }
}

.btn-content-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 12px);
}

.btn-resume-icon,
.btn-inactivity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 5vw, 26px);
  height: clamp(22px, 5vw, 26px);
  flex-shrink: 0;
}

.btn-resume-icon {
  color: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.btn-inactivity-icon {
  color: #fde047;
  filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.6));
}

.btn-resume-icon svg,
.btn-inactivity-icon svg {
  width: 100%;
  height: 100%;
}

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

.btn-resume-title,
.btn-confirm-title {
  font-family: 'Cinzel', 'Outfit', sans-serif;
  font-size: clamp(0.88rem, 3.2vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.btn-resume-subtitle {
  font-size: clamp(0.64rem, 2vw, 0.72rem);
  font-weight: 500;
  color: #bae6fd;
  line-height: 1.2;
}

.btn-confirm-subtitle {
  font-size: clamp(0.64rem, 2vw, 0.72rem);
  font-weight: 500;
  color: #fef08a;
  line-height: 1.2;
}

/* Small mobile screens (width <= 380px) */
@media (max-width: 380px) {
  .session-suspended-card,
  .inactivity-modal-card {
    padding: 14px 10px !important;
    max-width: calc(100vw - 16px) !important;
    border-radius: 14px !important;
  }

  .suspended-assurance-grid {
    gap: 4px !important;
  }

  .suspended-assurance-tile {
    padding: 6px 3px !important;
  }

  .assurance-tile-label {
    font-size: 0.62rem !important;
  }

  .assurance-tile-sub {
    font-size: 0.54rem !important;
  }

  .btn-suspended-resume,
  .btn-inactivity-confirm {
    padding: 9px 8px !important;
    min-height: 42px !important;
  }

  .btn-resume-title,
  .btn-confirm-title {
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
  }

  .btn-resume-subtitle,
  .btn-confirm-subtitle {
    font-size: 0.6rem !important;
  }
}

/* Landscape / Ultra-compact height adaptation (e.g. mobile rotated horizontally) */
@media (max-height: 580px) {
  #modal-inactivity-warning,
  #modal-session-suspended {
    padding: 8px !important;
  }

  .inactivity-modal-card,
  .session-suspended-card {
    padding: 10px 14px !important;
    max-height: 94dvh !important;
    border-radius: 12px !important;
  }

  .suspended-hex-emblem,
  .inactivity-hex-emblem {
    width: 44px !important;
    height: 50px !important;
    margin: 0 auto 3px auto !important;
  }

  .inactivity-modal-title {
    font-size: 0.95rem !important;
    margin-bottom: 2px !important;
  }

  .inactivity-modal-desc {
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }

  .suspended-assurance-grid {
    margin-bottom: 8px !important;
    gap: 4px !important;
  }

  .suspended-assurance-tile {
    padding: 4px !important;
  }

  .assurance-tile-icon {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 2px !important;
  }

  .inactivity-progress-track {
    height: 4px !important;
    margin-bottom: 4px !important;
  }

  .inactivity-countdown-wrap {
    font-size: 0.7rem !important;
    margin-bottom: 6px !important;
  }

  .inactivity-safe-note {
    font-size: 0.7rem !important;
    margin-bottom: 6px !important;
  }

  .btn-suspended-resume,
  .btn-inactivity-confirm {
    padding: 6px 10px !important;
    min-height: 38px !important;
    margin-top: 4px !important;
  }
}

/* ==========================================================================
   📲 KMKZ Smart App Download Banner (Minimalist Glassmorphism Capsule)
   ========================================================================== */
.kmkz-smart-app-banner {
  position: fixed !important;
  top: env(safe-area-inset-top, 12px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 24px) !important;
  max-width: 440px !important;
  z-index: 9999999 !important;
  pointer-events: auto !important;
  animation: bannerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-26px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.kmkz-smart-app-banner.banner-auto-hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(-30px) scale(0.94) !important;
  pointer-events: none !important;
}

.kmkz-smart-app-banner .banner-inner {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  background: linear-gradient(160deg, rgba(13, 20, 36, 0.95) 0%, rgba(8, 13, 25, 0.97) 100%) !important;
  border: 1px solid rgba(245, 200, 66, 0.28) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 28px rgba(0, 0, 0, 0.68) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  box-sizing: border-box !important;
}

.kmkz-smart-app-banner .banner-icon-wrap {
  position: relative !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(245, 200, 66, 0.34) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  padding: 5px !important;
  flex-shrink: 0 !important;
}

.kmkz-smart-app-banner .banner-icon {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  box-sizing: border-box !important;
}

.kmkz-smart-app-banner .banner-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
  gap: 2px !important;
}

.kmkz-smart-app-banner .banner-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.kmkz-smart-app-banner .banner-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.02em !important;
  line-height: 1.1 !important;
}

.kmkz-smart-app-banner .banner-tag {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 2px 6px !important;
  border-radius: 999px !important;
  background: rgba(245, 200, 66, 0.1) !important;
  color: #e6c45c !important;
  border: 1px solid rgba(245, 200, 66, 0.28) !important;
  line-height: 1 !important;
}

.kmkz-smart-app-banner .banner-sub {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

.kmkz-smart-app-banner .banner-actions {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.kmkz-smart-app-banner .banner-cta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 36px !important;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.24) 0%, rgba(180, 83, 9, 0.38) 100%) !important;
  color: #fefce8 !important;
  border: 1px solid rgba(245, 200, 66, 0.52) !important;
  border-radius: 11px !important;
  padding: 0 13px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.22), 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.kmkz-smart-app-banner .banner-cta:hover {
  transform: translateY(-1px) !important;
  border-color: #f5c842 !important;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.34) 0%, rgba(180, 83, 9, 0.48) 100%) !important;
}

.kmkz-smart-app-banner .banner-cta:active {
  transform: scale(0.96) !important;
}

.kmkz-smart-app-banner .banner-cta-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fef08a !important;
}

/* ==========================================================================
   📲 KMKZ App Installation & Native Handoff Modal
   ========================================================================== */
.kmkz-install-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(5, 8, 18, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 10000002 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  animation: fadeInInstallModal 0.22s ease-out !important;
}

@keyframes fadeInInstallModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.kmkz-install-modal-card {
  position: relative !important;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.98) 0%, rgba(30, 27, 75, 0.98) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 20px !important;
  padding: 26px 20px 20px 20px !important;
  max-width: 440px !important;
  width: 100% !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.18) !important;
  box-sizing: border-box !important;
  text-align: center !important;
  color: #fff !important;
  animation: popInInstallModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}

@keyframes popInInstallModal {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.kmkz-install-modal-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 1.3rem !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.15s, opacity 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s !important;
  line-height: 1 !important;
}

.kmkz-install-modal-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

.kmkz-install-modal-logo {
  width: 64px !important;
  height: 64px !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  background: linear-gradient(145deg, rgba(26, 36, 60, 0.9) 0%, rgba(10, 15, 28, 0.95) 100%) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(245, 158, 11, 0.2) !important;
  margin: 0 auto 14px auto !important;
  display: block !important;
  object-fit: contain !important;
  padding: 4px !important;
  box-sizing: border-box !important;
}

.kmkz-install-modal-title {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  margin: 0 0 6px 0 !important;
  letter-spacing: 0.3px !important;
}

.kmkz-install-modal-desc {
  font-size: 0.84rem !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  margin: 0 0 16px 0 !important;
}

.kmkz-install-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

.kmkz-install-btn {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: transform 0.15s, filter 0.15s !important;
  text-align: left !important;
  cursor: pointer !important;
  border: none !important;
  font-family: inherit !important;
  width: 100% !important;
}

.kmkz-install-btn:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}

.kmkz-install-btn:active {
  transform: scale(0.98) !important;
}

.kmkz-btn-icon {
  font-size: 1.5rem !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
}

.kmkz-btn-text {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.25 !important;
}

.kmkz-btn-text strong {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
}

.kmkz-btn-text small {
  font-size: 0.74rem !important;
  opacity: 0.85 !important;
  margin-top: 2px !important;
}

.kmkz-install-btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}

.kmkz-install-btn-secondary {
  background: rgba(56, 189, 248, 0.16) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

.kmkz-install-btn-outline {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
}

.kmkz-install-note {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  margin-top: 14px !important;
  line-height: 1.4 !important;
  background: rgba(0, 0, 0, 0.25) !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.kmkz-ios-steps {
  background: rgba(0, 0, 0, 0.35) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 12px 14px !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  font-size: 0.82rem !important;
  color: #cbd5e1 !important;
  line-height: 1.4 !important;
}

.kmkz-ios-step {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.kmkz-step-num {
  background: #f59e0b !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 0.75rem !important;
  border-radius: 50% !important;
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KMKZ TUTORIAL INTERACTIVE SPEECH BUBBLE & SPOTLIGHT BEACON SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.tut-bubble-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100010 !important;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   SPOTLIGHT BEACON & TOUCH TARGET HIGHLIGHT
   ───────────────────────────────────────────────────────────── */
.tut-spotlight-beacon {
  position: fixed;
  z-index: 100012;
  pointer-events: auto;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tut-spotlight-beacon.pass-through {
  pointer-events: none;
}

.tut-spotlight-beacon.pass-through .tut-beacon-target {
  pointer-events: none;
}

.tut-spotlight-beacon.pass-through .tut-beacon-badge {
  pointer-events: auto;
}

.tutorial-highlight-pulse {
  animation: tutPlayerPodPulse 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 2;
  outline: 2px solid #38bdf8 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.9), inset 0 0 15px rgba(56, 189, 248, 0.4) !important;
}

@keyframes tutPlayerPodPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 30px rgba(56, 189, 248, 1);
  }
}

.tut-beacon-target {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tut-beacon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.75), inset 0 0 14px rgba(56, 189, 248, 0.4);
  animation: tutBeaconPulse 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.tut-beacon-ring-outer {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.6);
  animation: tutBeaconSpin 8s linear infinite;
}

.tut-beacon-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 20%, #0284c7 90%);
  box-shadow: 0 0 14px #38bdf8, 0 0 26px #38bdf8;
  animation: tutDotThrob 1.2s ease-in-out infinite alternate;
}

.tut-beacon-badge {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1.5px solid #7dd3fc;
  border-radius: 12px;
  padding: 5px 12px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  transform: translateX(calc(-50% + var(--badge-shift-x, 0px))) translateY(0);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 14px rgba(56, 189, 248, 0.5);
  animation: tutBadgeBounce 1.4s ease-in-out infinite;
  pointer-events: auto;
}

.tut-beacon-badge.badge-top {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 8px;
  animation: tutBadgeBounceTop 1.4s ease-in-out infinite;
}

.tut-beacon-icon {
  font-size: 1.05rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes tutBeaconPulse {
  0% {
    transform: scale(0.85);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.85);
  }

  70% {
    transform: scale(1.45);
    opacity: 0.4;
    box-shadow: 0 0 25px 10px rgba(56, 189, 248, 0);
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@keyframes tutBeaconSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes tutDotThrob {
  from {
    transform: scale(0.9);
    filter: brightness(1);
  }

  to {
    transform: scale(1.25);
    filter: brightness(1.3);
  }
}

@keyframes tutBadgeBounce {

  0%,
  100% {
    transform: translateX(calc(-50% + var(--badge-shift-x, 0px))) translateY(0);
  }

  50% {
    transform: translateX(calc(-50% + var(--badge-shift-x, 0px))) translateY(6px);
  }
}

@keyframes tutBadgeBounceTop {

  0%,
  100% {
    transform: translateX(calc(-50% + var(--badge-shift-x, 0px))) translateY(0);
  }

  50% {
    transform: translateX(calc(-50% + var(--badge-shift-x, 0px))) translateY(-6px);
  }
}

/* ─────────────────────────────────────────────────────────────
   ANIMATED HAND POINTER, TOUCH RIPPLE & FLOATING REWARD POPS
   ───────────────────────────────────────────────────────────── */
.tut-hand-pointer {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 100015;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tut-hand-svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  animation: tutHandTapAnimation 1.25s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  transform-origin: top left;
}

.tut-tap-shockwave {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
  animation: tutTapShockwave 1.25s ease-out infinite;
  pointer-events: none;
}

.tut-beacon-ripple {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  animation: tutSonarWave 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes tutHandTapAnimation {
  0%, 100% {
    transform: translate(16px, 16px) scale(1);
    opacity: 0.95;
  }
  35% {
    transform: translate(2px, 2px) scale(0.92);
    opacity: 1;
  }
  50% {
    transform: translate(-1px, -1px) scale(0.85);
    opacity: 1;
  }
  65% {
    transform: translate(8px, 8px) scale(0.96);
    opacity: 0.95;
  }
}

@keyframes tutTapShockwave {
  0%, 40% {
    transform: scale(0.2);
    opacity: 0;
  }
  48% {
    transform: scale(0.5);
    opacity: 0.95;
    border-color: #fbbf24;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
    border-color: #38bdf8;
  }
}

@keyframes tutSonarWave {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Floating Reward Popups on Touch */
.tut-floating-pop {
  position: fixed;
  z-index: 100030;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(8, 14, 28, 0.95);
  border: 1.5px solid #fbbf24;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 5px 13px;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 18px rgba(251, 191, 36, 0.6);
  animation: tutPopFloat 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  letter-spacing: 0.3px;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes tutPopFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) scale(0.65);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.12);
  }
  40% {
    transform: translate(-50%, -85%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -125%) scale(0.96);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160%) scale(0.8);
  }
}

/* ─────────────────────────────────────────────────────────────
   SPEECH BUBBLE CARD ("BOCADILLO CON TEXTO")
   ───────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────
   SPEECH BUBBLE CARD ("BOCADILLO CON TEXTO - KMKZ ACADEMY")
   Optimizado: Compacto, no invasivo, con colas laterales y botón de minimizar
   ───────────────────────────────────────────────────────────── */
.tut-speech-bubble {
  position: fixed;
  z-index: 100020;
  pointer-events: auto;
  width: calc(100vw - 20px);
  max-width: 345px;
  background: rgba(11, 18, 33, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 16px;
  padding: 11px 13px;
  color: #f8fafc;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.16);
  animation: tutBubblePopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: max-width 0.2s ease, padding 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

@keyframes tutBubblePopIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Pointer Arrow / Beak ("Pico del Bocadillo") */
.tut-bubble-tail {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 100021;
}

/* Tail pointing down toward element below the bubble */
.tut-speech-bubble.has-tail-bottom .tut-bubble-tail {
  bottom: -11px;
  left: var(--tail-offset, 50%);
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 11px solid rgba(11, 18, 33, 0.98);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6)) drop-shadow(0 1px 3px rgba(56, 189, 248, 0.4));
}

.tut-speech-bubble.has-tail-bottom .tut-bubble-tail::after {
  content: '';
  position: absolute;
  top: -13px;
  left: -10px;
  width: 20px;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
}

/* Tail pointing up toward element above the bubble */
.tut-speech-bubble.has-tail-top .tut-bubble-tail {
  top: -11px;
  left: var(--tail-offset, 50%);
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 11px solid rgba(11, 18, 33, 0.98);
  filter: drop-shadow(0 -3px 5px rgba(0, 0, 0, 0.6)) drop-shadow(0 -1px 3px rgba(56, 189, 248, 0.4));
}

.tut-speech-bubble.has-tail-top .tut-bubble-tail::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: -10px;
  width: 20px;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
}

/* Tail pointing left toward element to the left (lateral side-dock) */
.tut-speech-bubble.has-tail-left .tut-bubble-tail {
  left: -11px;
  top: var(--tail-offset-y, 50%);
  transform: translateY(-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 11px solid rgba(11, 18, 33, 0.98);
  filter: drop-shadow(-3px 0 5px rgba(0, 0, 0, 0.6)) drop-shadow(-1px 0 3px rgba(56, 189, 248, 0.4));
}

/* Tail pointing right toward element to the right (lateral side-dock) */
.tut-speech-bubble.has-tail-right .tut-bubble-tail {
  right: -11px;
  top: var(--tail-offset-y, 50%);
  transform: translateY(-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 11px solid rgba(11, 18, 33, 0.98);
  filter: drop-shadow(3px 0 5px rgba(0, 0, 0, 0.6)) drop-shadow(1px 0 3px rgba(56, 189, 248, 0.4));
}

/* Bubble Header */
.tut-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 7px;
  margin-bottom: 8px;
  cursor: grab;
  user-select: none;
}

.tut-bubble-header:active {
  cursor: grabbing;
}

.tut-avatar-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tut-avatar-icon {
  font-size: 1.15rem;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 2px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tut-avatar-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.tut-instructor-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.tut-instructor-role {
  font-size: 0.7rem;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tut-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tut-step-badge {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Minimize & Close Buttons */
.tut-btn-minimize {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #94a3b8;
  border-radius: 7px;
  padding: 2px 7px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 3px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.tut-btn-minimize:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
}

.tut-btn-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #94a3b8;
  border-radius: 7px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: bold;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.tut-btn-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Minimized State ("Modo Compacto / Ver Tablero") */
.tut-minimized-hint {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #38bdf8;
  font-weight: 700;
  cursor: pointer;
}

.tut-speech-bubble.is-minimized {
  max-width: 310px;
  padding: 6px 10px;
  border-radius: 12px;
}

.tut-speech-bubble.is-minimized .tut-bubble-body,
.tut-speech-bubble.is-minimized .tut-bubble-footer,
.tut-speech-bubble.is-minimized .tut-instructor-role,
.tut-speech-bubble.is-minimized .tut-bubble-tail {
  display: none !important;
}

.tut-speech-bubble.is-minimized .tut-bubble-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.tut-speech-bubble.is-minimized .tut-minimized-hint {
  display: inline-flex;
}

.tut-min-expand-badge {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

/* Bubble Content */
.tut-bubble-body {
  font-size: 0.82rem;
  line-height: 1.42;
  color: #e2e8f0;
  max-height: 44vh;
  overflow-y: auto;
  padding-right: 2px;
}

.tut-bubble-body::-webkit-scrollbar {
  width: 4px;
}

.tut-bubble-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.tut-bubble-title {
  margin: 0 0 6px 0;
  font-size: 0.96rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tut-bubble-text {
  margin-bottom: 8px;
}

.tut-bubble-text b,
.tut-bubble-text strong {
  color: #ffffff;
  font-weight: 800;
}

.tut-bubble-highlight-action {
  background: rgba(56, 189, 248, 0.12);
  border-left: 3px solid #38bdf8;
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0;
  font-size: 0.8rem;
  color: #e0f2fe;
}

.tut-bubble-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 6px;
  font-size: 0.74rem;
  color: #fde68a;
  line-height: 1.35;
}

.tut-bubble-tip-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Bubble Footer Controls */
.tut-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 8px;
  margin-top: 8px;
}

.tut-footer-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tut-btn-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tut-btn-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tut-btn-action {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  padding: 7px 13px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tut-btn-action:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.55);
}

.tut-btn-action:active {
  transform: translateY(1px);
}

.tut-btn-action.pulse-btn {
  animation: tutActionThrob 2s infinite ease-in-out;
}

@keyframes tutActionThrob {

  0%,
  100% {
    box-shadow: 0 3px 12px rgba(14, 165, 233, 0.35);
    border-color: #38bdf8;
  }

  50% {
    box-shadow: 0 3px 20px rgba(56, 189, 248, 0.75);
    border-color: #7dd3fc;
  }
}

/* Dots Progress */
.tut-dots-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.tut-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tut-dot.completed {
  background: #38bdf8;
}

.tut-dot.active {
  background: #fbbf24;
  width: 12px;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.75);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tut-speech-bubble {
    width: calc(100vw - 16px);
    max-width: 340px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .tut-avatar-icon {
    font-size: 1.05rem;
    padding: 2px 4px;
  }

  .tut-instructor-name {
    font-size: 0.78rem;
  }

  .tut-bubble-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }

  .tut-bubble-body {
    font-size: 0.78rem;
    line-height: 1.38;
    max-height: min(34vh, 180px);
  }

  .tut-bubble-tip {
    padding: 4px 6px;
    font-size: 0.7rem;
    margin-top: 5px;
  }

  .tut-bubble-footer {
    gap: 6px;
    padding-top: 6px;
    margin-top: 6px;
  }

  .tut-footer-nav .tut-btn-nav {
    padding: 4px 6px;
    font-size: 0.7rem;
  }

  .tut-btn-action {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .tut-spotlight-beacon .tut-beacon-target {
    width: 42px;
    height: 42px;
  }

  .tut-beacon-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
}

@media (max-width: 420px) {
  .tut-speech-bubble {
    width: calc(100vw - 12px);
    padding: 8px 10px;
  }

  .tut-bubble-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .tut-footer-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    order: 2;
  }

  .tut-footer-nav .tut-btn-nav {
    flex: 1 1 auto;
    justify-content: center;
    padding: 4px 3px;
    font-size: 0.7rem;
  }

  .tut-btn-action {
    order: 1;
    width: 100%;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.78rem;
  }
}

@media (max-height: 520px) {
  .tut-speech-bubble {
    max-width: 290px;
    padding: 6px 8px;
    border-radius: 12px;
  }

  .tut-bubble-header {
    padding-bottom: 4px;
    margin-bottom: 4px;
  }

  .tut-avatar-icon {
    font-size: 0.95rem;
    padding: 1px 3px;
  }

  .tut-instructor-name {
    font-size: 0.74rem;
  }

  .tut-bubble-body {
    max-height: 40vh;
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .tut-bubble-title {
    font-size: 0.82rem;
    margin-bottom: 3px;
  }

  .tut-bubble-tip {
    display: none;
  }

  .tut-bubble-footer {
    padding-top: 4px;
    margin-top: 4px;
    gap: 4px;
  }

  .tut-btn-action {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .tut-btn-nav {
    padding: 3px 5px;
    font-size: 0.7rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   KMKZ TACTICAL MISSION CONSOLE (ORGANIC INVISIBLE TUTORIAL HUD)
   Hexagonal Sovereign Glass, chamfered framing & non-intrusive flow
   ───────────────────────────────────────────────────────────── */

.tut-invisible-capsule {
  position: fixed;
  top: calc(56px + max(4px, env(safe-area-inset-top)));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 16px);
  max-width: 440px;
  z-index: 100020;
  pointer-events: auto;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92) 0%, rgba(9, 14, 26, 0.96) 100%);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1.5px solid rgba(251, 191, 36, 0.38);
  border-radius: 14px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(245, 158, 11, 0.12),
    inset 0 1px 1px rgba(254, 240, 138, 0.25),
    inset 0 -1px 1px rgba(0, 0, 0, 0.6);
  padding: 6px 10px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  animation: tutCapsuleDrop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, top 0.28s ease, bottom 0.28s ease, padding 0.2s ease, border-color 0.25s ease;
  user-select: none;
  box-sizing: border-box;
  overflow: hidden;
}

.tut-invisible-capsule:hover {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.85),
    0 0 24px rgba(245, 158, 11, 0.2),
    inset 0 1px 1px rgba(254, 240, 138, 0.35);
}

.tut-invisible-capsule.dock-bottom {
  top: auto;
  bottom: calc(76px + max(8px, env(safe-area-inset-bottom)));
  animation: tutCapsuleRise 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tut-mini-btn.tut-btn-flip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
}

.tut-mini-btn.tut-btn-flip:hover {
  background: rgba(56, 189, 248, 0.32) !important;
  color: #ffffff !important;
}

/* Subtle Organic Drop & Rise Animations */
@keyframes tutCapsuleDrop {
  0% {
    opacity: 0;
    transform: translate(-50%, -12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes tutCapsuleRise {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Top Laser Hairline Accent */
.tut-capsule-laser-line {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, #f59e0b 25%, #38bdf8 75%, transparent 100%);
  opacity: 0.85;
  pointer-events: none;
}

/* Gold Chamfer Corner Brackets */
.tut-capsule-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  pointer-events: none;
}

.tut-capsule-corner.c-tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 14px;
}

.tut-capsule-corner.c-tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 14px;
}

/* Minimized Tactical Ribbon Mode */
.tut-invisible-capsule.is-minimized,
.tut-invisible-capsule.minimized {
  max-width: 390px;
  padding: 5px 10px;
  gap: 0;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 12, 22, 0.99) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 14px rgba(245, 158, 11, 0.25);
}

.tut-invisible-capsule.is-minimized .tut-capsule-body,
.tut-invisible-capsule.is-minimized .tut-capsule-bottom,
.tut-invisible-capsule.minimized .tut-capsule-body,
.tut-invisible-capsule.minimized .tut-capsule-bottom {
  display: none !important;
}

.tut-invisible-capsule.is-minimized .tut-toggle-icon,
.tut-invisible-capsule.minimized .tut-toggle-icon {
  transform: rotate(180deg);
}

/* Header Bar */
.tut-capsule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.tut-capsule-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

/* Hexagonal Step Insignia */
.tut-hex-step-badge {
  position: relative;
  width: 24px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tut-hex-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tut-hex-svg .hex-bg {
  fill: rgba(245, 158, 11, 0.22);
}

.tut-hex-svg .hex-border {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 1.6;
}

.tut-hex-num {
  position: relative;
  font-size: 0.74rem;
  font-weight: 900;
  color: #fef08a;
  line-height: 1;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
}

.tut-capsule-headings {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.tut-mission-tag {
  font-size: 0.58rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
}

.tut-capsule-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Navigation Buttons */
.tut-capsule-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.tut-mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.80rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

.tut-mini-btn:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: #fbbf24;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.tut-mini-btn.tut-btn-toggle:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.tut-toggle-icon {
  transition: transform 0.22s ease;
}

.tut-mini-btn.tut-btn-close:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Body Content */
.tut-capsule-body {
  padding: 1px 0;
}

.tut-capsule-desc {
  font-size: 0.78rem;
  line-height: 1.34;
  color: #cbd5e1;
}

.tut-cue-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.tut-cue-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.tut-cue-text {
  flex: 1;
  min-width: 0;
}

.tut-cue-prompt {
  font-size: 0.79rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.32;
}

.tut-cue-prompt b,
.tut-cue-prompt strong {
  color: #fbbf24;
  font-weight: 800;
}

.tut-cue-tip {
  font-size: 0.69rem;
  color: #94a3b8;
  line-height: 1.24;
  margin-top: 2px;
}

/* Tactical Chips */
.tut-capsule-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tut-chip {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1.5px 6.5px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.tut-chip-cyan {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.tut-chip-gold {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.tut-chip-green {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.tut-chip-red {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* Bottom Row: Segmented Mission Meter & Action Button */
.tut-capsule-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.tut-capsule-meter {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  max-width: 130px;
}

.tut-meter-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.tut-meter-seg.completed {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
}

.tut-meter-seg.active {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.9);
}

/* Action Button */
.tut-capsule-action {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 55%, #b45309 100%);
  border: 1px solid rgba(254, 240, 138, 0.55);
  color: #ffffff;
  padding: 4.5px 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.35px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  line-height: 1.2;
}

.tut-capsule-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(245, 158, 11, 0.65);
  filter: brightness(1.1);
}

.tut-capsule-action:active {
  transform: scale(0.97);
}

/* Legacy fallback dots */
.tut-capsule-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tut-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.tut-dot.completed {
  background: #38bdf8;
}
.tut-dot.active {
  background: #fbbf24;
  width: 10px;
  border-radius: 3px;
}

/* Mobile & Tablet Responsive */
@media (max-width: 768px) {
  .tut-invisible-capsule {
    width: calc(100vw - 12px);
    max-width: 350px;
    padding: 5px 8px;
    border-radius: 12px;
    top: calc(52px + max(2px, env(safe-area-inset-top, 2px)));
    gap: 3px;
  }

  .tut-invisible-capsule.dock-bottom {
    bottom: calc(72px + max(6px, env(safe-area-inset-bottom, 6px)));
  }

  .tut-capsule-laser-line,
  .tut-capsule-corner {
    display: none !important;
  }

  .tut-capsule-badge-row {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .tut-capsule-headings {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .tut-capsule-title {
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .tut-mission-tag {
    font-size: 0.52rem;
  }

  .tut-capsule-nav {
    gap: 2px;
    flex-shrink: 0;
  }

  .tut-mini-btn {
    width: 22px;
    height: 22px;
    font-size: 0.70rem;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .tut-cue-prompt {
    font-size: 0.70rem;
    line-height: 1.22;
  }

  .tut-cue-tip {
    font-size: 0.62rem;
    line-height: 1.15;
    margin-top: 1px;
  }

  .tut-capsule-chips {
    margin-top: 1px;
    gap: 3px;
  }

  .tut-chip {
    font-size: 0.55rem;
    padding: 1px 4px;
  }

  .tut-capsule-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .tut-capsule-meter {
    flex-shrink: 0;
    max-width: 60px;
  }

  .tut-meter-seg {
    height: 2.5px;
  }

  .tut-capsule-action {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
    padding: 4px 8px;
    font-size: 0.66rem;
    height: 26px;
    min-height: 26px;
    box-sizing: border-box;
  }

  .tut-cue-icon {
    width: 15px;
    height: 15px;
  }

  .tut-hand-svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .tut-invisible-capsule {
    width: calc(100vw - 8px);
    max-width: 360px;
    padding: 5px 8px;
    gap: 2.5px;
  }

  .tut-invisible-capsule.dock-bottom {
    bottom: calc(68px + max(4px, env(safe-area-inset-bottom, 4px)));
  }

  .tut-capsule-title {
    font-size: 0.72rem;
  }

  .tut-cue-prompt {
    font-size: 0.68rem;
    line-height: 1.20;
  }

  .tut-cue-tip {
    display: none !important;
  }

  .tut-capsule-chips {
    display: none !important;
  }

  .tut-capsule-action {
    padding: 3px 6px;
    font-size: 0.64rem;
    height: 24px;
    min-height: 24px;
  }
}

/* Mobile M (361px to 414px: iPhone 12/13/14, Galaxy, Pixel) */
@media (min-width: 361px) and (max-width: 414px) {
  .tut-invisible-capsule {
    width: calc(100vw - 8px);
    max-width: 330px;
    padding: 4px 6px;
    gap: 2px;
  }

  .tut-capsule-title {
    font-size: 0.69rem;
  }

  .tut-cue-prompt {
    font-size: 0.66rem;
    line-height: 1.18;
  }
}

/* Mobile S (<= 360px: Small Androids, iPhone SE 1st gen) */
@media (max-width: 360px) {
  .tut-invisible-capsule {
    width: calc(100vw - 6px);
    max-width: 295px;
    padding: 3px 5px;
    gap: 1.5px;
    border-radius: 10px;
  }

  .tut-invisible-capsule.dock-bottom {
    bottom: calc(62px + max(2px, env(safe-area-inset-bottom, 2px)));
  }

  .tut-capsule-title {
    font-size: 0.65rem;
  }

  .tut-cue-prompt {
    font-size: 0.62rem;
    line-height: 1.14;
  }

  .tut-hex-step-badge {
    width: 17px;
    height: 19px;
  }

  .tut-hex-num {
    font-size: 0.62rem;
  }

  .tut-mini-btn {
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
  }

  .tut-capsule-action {
    height: 22px;
    min-height: 22px;
    font-size: 0.60rem;
    padding: 2px 4px;
  }

  .tutorial-modules-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   KMKZ TUTORIAL CHEAT SHEET MODAL & RECIPES DRAWER
   ───────────────────────────────────────────────────────────── */
.tut-btn-sheet {
  background: rgba(251, 191, 36, 0.15) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

.tut-btn-sheet:hover {
  background: rgba(251, 191, 36, 0.3) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

.tut-recipe-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 1px 2px;
}

.tut-cheatsheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100030;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: tutFadeIn 0.2s ease-out;
}

.tut-cheatsheet-modal {
  background: linear-gradient(175deg, #0b1329 0%, #060b18 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.18);
  width: 100%;
  max-width: 580px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  color: #f8fafc;
  overflow: hidden;
  animation: tutScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tut-cheatsheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.tut-cheatsheet-title {
  font-size: 1rem;
  font-weight: 900;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tut-cheatsheet-content {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tut-sheet-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 14px;
}

.tut-sheet-sect-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tut-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.tut-sheet-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tut-sheet-card-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
}

.tut-sheet-card-cost {
  font-size: 0.70rem;
  color: #94a3b8;
}

.tut-sheet-card-vp {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fbbf24;
}

.tut-prob-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tut-prob-pips {
  color: #ef4444;
  font-weight: 800;
  letter-spacing: 1px;
}

.tut-prob-pips.normal {
  color: #38bdf8;
}

@keyframes tutFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tutScaleIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ==========================================================================
   KMKZ In-Game Casino Bubble & Compact Mini-Slot Modal
/* Ensure hidden roll button never renders or disrupts layout */
#btn-roll-dice,
button#btn-roll-dice {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  clip: rect(0, 0, 0, 0) !important;
  overflow: hidden !important;
}


/* ==========================================================================
   KMKZ: MODO ESPECTADOR (SPECTATOR MODE HUD & CONTROLS)
   ========================================================================== */
.spectator-hud-banner {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 10px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: calc(100% - 24px);
  max-width: 560px;
  animation: spectatorFadeSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spectatorFadeSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -14px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.spectator-banner-content {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 5px 8px 5px 8px;
  background: rgba(9, 14, 26, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-height: 42px;
  box-sizing: border-box;
}

.spectator-hud-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.spectator-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}

.spec-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: specPulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes specPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.spectator-hud-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.spectator-hud-text strong {
  color: #38bdf8;
  font-weight: 700;
}

.spectator-hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-spec-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  user-select: none;
  border: none;
}

.btn-spec-emotes {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.btn-spec-emotes:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.btn-spec-leave {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-spec-leave:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.btn-spec-action:active {
  transform: scale(0.96);
}

.turn-action-stripe.is-spectator {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(88, 28, 135, 0.85)) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #e9d5ff !important;
}

@media (max-width: 540px) {
  .spectator-hud-banner {
    top: max(6px, env(safe-area-inset-top, 6px));
    width: calc(100% - 16px);
  }

  .spectator-banner-content {
    gap: 6px;
    padding: 3px 5px 3px 5px;
    min-height: 38px;
  }

  .spectator-hud-badge {
    padding: 2px 6px;
    font-size: 0.7rem;
  }

  .spectator-hud-text {
    font-size: 0.72rem;
  }

  .spec-action-label {
    display: none;
  }

  .btn-spec-action {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
  }
}


/* ==========================================================================
   🏝️ SUPREMACY ISLAND QUICK NAV FLOATING HUD
   ========================================================================== */
.supremacy-island-nav {
  position: absolute !important;
  bottom: 22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 125 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  user-select: none !important;
  pointer-events: auto !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.supremacy-island-nav.hidden {
  display: none !important;
}

.btn-island-nav {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.btn-island-nav:hover {
  transform: translateY(-1.5px) !important;
}

.btn-island-nav:active {
  transform: translateY(0.5px) !important;
}

.btn-island-nav.my-island {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.45)) !important;
  border-color: #facc15 !important;
  color: #fef08a !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3) !important;
}

.btn-island-nav.my-island:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.4), rgba(202, 138, 4, 0.6)) !important;
  border-color: #fde047 !important;
  box-shadow: 0 2px 14px rgba(250, 204, 21, 0.55) !important;
}

.btn-island-nav.rival-island {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.4)) !important;
  border-color: #f87171 !important;
  color: #fecaca !important;
}

.btn-island-nav.rival-island:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.55)) !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 2px 14px rgba(239, 68, 68, 0.55) !important;
}

.btn-island-nav.all-islands {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.4)) !important;
  border-color: #60a5fa !important;
  color: #bfdbfe !important;
}

.btn-island-nav.all-islands:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.55)) !important;
  border-color: #93c5fd !important;
  box-shadow: 0 2px 14px rgba(59, 130, 246, 0.55) !important;
}

@media (max-width: 768px) {
  .supremacy-island-nav {
    bottom: 68px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  .btn-island-nav {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
}

/* ==========================================================================
   KMKZ ORGANIC HUD: ACTION & BUILD CONFIRMATION PROMPT (ANCHORED ABOVE BOTTOM DOCK)
   ========================================================================== */

#build-confirm-overlay.game-overlay,
#build-confirm-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000000 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 12px !important;
  padding-bottom: calc(var(--bottom-dock-height, 145px) + 12px) !important;
  pointer-events: auto !important;
  transition: opacity 0.16s ease-out, visibility 0.16s ease-out !important;
}

#build-confirm-overlay.game-overlay.hidden,
#build-confirm-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.build-confirm-card {
  max-width: 330px !important;
  width: min(92vw, 330px) !important;
  text-align: center !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 16, 30, 0.98) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 20px !important;
  padding: 10px 14px 10px 14px !important;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  pointer-events: auto !important;
  animation: buildConfirmPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes buildConfirmPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.build-confirm-glow-halo {
  position: absolute !important;
  top: -30px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 140px !important;
  height: 60px !important;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.05) 50%, transparent 80%) !important;
  pointer-events: none !important;
}

.build-confirm-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 10% !important;
  right: 10% !important;
  height: 40px !important;
  background: radial-gradient(ellipse at 50% -20%, rgba(251, 191, 36, 0.25) 0%, transparent 75%) !important;
  pointer-events: none !important;
}

.build-confirm-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 2 !important;
}

.build-confirm-emblem-wrap {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.25) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1.2px solid rgba(251, 191, 36, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  color: #fbbf24 !important;
  position: relative !important;
  z-index: 2 !important;
}

.build-confirm-emblem-wrap svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}

.build-confirm-title {
  color: #ffffff !important;
  font-size: 0.98rem !important;
  margin: 0 !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 60%, #fbbf24 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  position: relative !important;
  z-index: 2 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5) !important;
  line-height: 1.2 !important;
}

.build-confirm-desc {
  margin: 0 !important;
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
}

.build-cost-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 9999px !important;
  padding: 3px 10px !important;
  font-size: 0.78rem !important;
  color: #e2e8f0 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  line-height: 1.2 !important;
}

.build-cost-label {
  font-weight: 700 !important;
  color: #fbbf24 !important;
  margin-right: 1px !important;
  font-size: 0.76rem !important;
}

.build-cost-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
  font-size: 0.78rem !important;
}

.build-cost-chip strong {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.build-cost-chip .res-svg-token {
  width: 14px !important;
  height: 14px !important;
  vertical-align: middle !important;
}

.build-confirm-actions {
  display: flex !important;
  gap: 8px !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  margin-top: 2px !important;
}

.build-btn-cancel {
  flex: 1 !important;
  padding: 7px 12px !important;
  border-radius: 9999px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease !important;
  line-height: 1.2 !important;
}

.build-btn-cancel:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px) !important;
}

.build-btn-cancel:active {
  transform: scale(0.96) !important;
}

.build-btn-confirm {
  flex: 1.2 !important;
  padding: 7px 16px !important;
  border-radius: 9999px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease !important;
  line-height: 1.2 !important;
}

.build-btn-confirm:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.45) !important;
}

.build-btn-confirm:active {
  transform: scale(0.96) !important;
}

/* ==========================================================================
   MODAL APP LEGAL, PRIVACIDAD & CUMPLIMIENTO (WCAG 2.1 AA / RESPONSIVE)
   ========================================================================== */

#modal-app-legal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000020 !important;
  background: rgba(3, 7, 18, 0.88) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
}

#modal-app-legal.hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.legal-modal-container {
  position: relative !important;
  width: min(660px, 94vw) !important;
  max-height: min(88vh, 760px) !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(20, 27, 45, 0.98) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.28) !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 45px rgba(251, 191, 36, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: legalModalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

@keyframes legalModalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header */
.legal-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.75) !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}

.legal-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.legal-header-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(217, 119, 6, 0.12)) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.22) !important;
  flex-shrink: 0 !important;
}

.legal-title-text-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.legal-modal-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: -0.015em !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.legal-modal-subtitle {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.legal-modal-header .btn-modal-close {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  font-size: 1.15rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.legal-modal-header .btn-modal-close:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  transform: scale(1.05) !important;
}

.legal-modal-header .btn-modal-close:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

/* Badges Bar */
.legal-badges-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 10px !important;
  padding: 12px 24px !important;
  background: rgba(10, 15, 30, 0.6) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  align-items: center !important;
}

.legal-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 11px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

.legal-badge-pill.emerald {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
  color: #34d399 !important;
}

.legal-badge-pill.cyan {
  background: rgba(6, 182, 212, 0.14) !important;
  border-color: rgba(6, 182, 212, 0.38) !important;
  color: #38bdf8 !important;
}

.legal-badge-pill.gold {
  background: rgba(251, 191, 36, 0.14) !important;
  border-color: rgba(251, 191, 36, 0.38) !important;
  color: #fbbf24 !important;
}

.legal-badge-pill.purple {
  background: rgba(168, 85, 247, 0.14) !important;
  border-color: rgba(168, 85, 247, 0.38) !important;
  color: #c084fc !important;
}

.legal-badge-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: currentColor !important;
  box-shadow: 0 0 6px currentColor !important;
  flex-shrink: 0 !important;
}

/* Modal Body */
.legal-modal-body {
  padding: 20px 24px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(251, 191, 36, 0.35) rgba(15, 23, 42, 0.4) !important;
}

.legal-modal-body::-webkit-scrollbar {
  width: 6px !important;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4) !important;
  border-radius: 8px !important;
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35) !important;
  border-radius: 8px !important;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.6) !important;
}

.legal-modal-body:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: -2px !important;
  border-radius: 12px !important;
}

/* Legal Cards */
.legal-section-card {
  background: rgba(30, 41, 59, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.legal-section-card:hover {
  background: rgba(30, 41, 59, 0.68) !important;
  border-color: rgba(251, 191, 36, 0.28) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}

.legal-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

.legal-card-header .ui-svg-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.legal-card-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.legal-card-desc {
  font-size: 0.84rem !important;
  line-height: 1.55 !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
}

/* External Hub */
.legal-external-hub {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.65) 0%, rgba(30, 41, 59, 0.5) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.22) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-top: 4px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
}

.legal-hub-title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.legal-external-link-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 10px !important;
}

.btn-legal-external {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  text-decoration: none !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  min-height: 44px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.btn-legal-external:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fbbf24 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important;
}

.btn-legal-external:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.btn-legal-text {
  flex: 1 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-legal-arrow {
  color: #94a3b8 !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-legal-external:hover .btn-legal-arrow {
  color: #fbbf24 !important;
  transform: translate(2px, -2px) !important;
}

/* Footer */
.legal-modal-footer {
  padding: 16px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  box-sizing: border-box !important;
}

.btn-legal-accept {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  min-width: 170px !important;
  padding: 10px 24px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  border-radius: 14px !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0b1120 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-legal-accept:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.55) !important;
}

.btn-legal-accept:active {
  transform: scale(0.97) !important;
}

.btn-legal-accept:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
}

/* Legal Acceptance Status Notice & Quick Links Responsive Persistence */
.legal-status-accepted-notice {
  margin: 10px 24px 4px 24px !important;
  padding: 10px 16px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  border-radius: 12px !important;
  color: #6ee7b7 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

#btn-app-legal.is-accepted,
.app-only-quick-links.has-accepted-legal #btn-app-legal {
  display: none !important;
  pointer-events: none !important;
}

.app-only-quick-links.has-accepted-legal #btn-tutorial {
  width: 100% !important;
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

#modal-app-legal.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (320px - 540px)
   ========================================================================== */

@media (max-width: 540px) {
  #modal-app-legal {
    padding: 8px !important;
  }

  .legal-modal-container {
    width: 98vw !important;
    max-height: 94vh !important;
    border-radius: 18px !important;
  }

  .legal-modal-header {
    padding: 14px 16px !important;
  }

  .legal-header-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .legal-modal-title {
    font-size: 1.05rem !important;
  }

  .legal-modal-subtitle {
    font-size: 0.74rem !important;
  }

  .legal-badges-bar {
    padding: 10px 16px !important;
    gap: 6px !important;
  }

  .legal-badge-pill {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }

  .legal-modal-body {
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .legal-section-card {
    padding: 12px 14px !important;
  }

  .legal-card-title {
    font-size: 0.88rem !important;
  }

  .legal-card-desc {
    font-size: 0.79rem !important;
  }

  .legal-external-link-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .btn-legal-external {
    min-height: 48px !important;
  }

  .legal-modal-footer {
    padding: 12px 16px !important;
  }

  .btn-legal-accept {
    width: 100% !important;
    min-height: 48px !important;
  }
}

/* ── Luxury Cyber Expand Player Card Button in Profile Popover ── */
.popover-expand-card-btn,
#btn-popover-expand-card,
.hero-section #btn-popover-expand-card {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(10, 15, 30, 0.99) 100%) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.60) !important;
  border-top: 1.5px solid rgba(216, 180, 254, 0.90) !important;
  border-right: 1.5px solid rgba(56, 189, 248, 0.75) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.75), 0 0 14px rgba(168, 85, 247, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(56, 189, 248, 0.20) !important;
  color: #c7d2fe !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  user-select: none !important;
  touch-action: manipulation !important;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease !important;
}

/* Cyber Neon Top Accent Line */
.popover-expand-card-btn::before,
#btn-popover-expand-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 15% !important;
  right: 15% !important;
  height: 1.5px !important;
  background: linear-gradient(90deg, transparent, #c084fc, #38bdf8, transparent) !important;
  box-shadow: 0 0 6px #c084fc !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Shimmer Light Reflection Sweep on Hover */
.popover-expand-card-btn::after,
#btn-popover-expand-card::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%) !important;
  transform: translateX(-120%) !important;
  transition: transform 0.55s ease !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

.popover-expand-glow {
  position: absolute !important;
  inset: -2px !important;
  border-radius: 13px !important;
  background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.35), rgba(56, 189, 248, 0.18), transparent 70%) !important;
  opacity: 0.6 !important;
  filter: blur(4px) !important;
  pointer-events: none !important;
  animation: expandBtnPulse 3s ease-in-out infinite !important;
  z-index: 1 !important;
}

@keyframes expandBtnPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.04);
  }
}

.popover-expand-content {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  position: relative !important;
  z-index: 4 !important;
}

.popover-expand-card-btn:hover,
#btn-popover-expand-card:hover,
.hero-section #btn-popover-expand-card:hover {
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.95) 0%, rgba(24, 32, 60, 0.98) 55%, rgba(15, 23, 42, 0.99) 100%) !important;
  border-color: #c084fc !important;
  border-right-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.85), 0 0 22px rgba(168, 85, 247, 0.65), 0 0 12px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-2px) scale(1.08) !important;
}

.popover-expand-card-btn:hover::after,
#btn-popover-expand-card:hover::after {
  transform: translateX(120%) !important;
}

.popover-expand-card-btn:active,
#btn-popover-expand-card:active,
.hero-section #btn-popover-expand-card:active {
  transform: translateY(0) scale(0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

.popover-expand-card-btn:focus-visible,
#btn-popover-expand-card:focus-visible {
  outline: 2px solid #a855f7 !important;
  outline-offset: 2px !important;
}

.popover-expand-card-btn .popover-expand-icon,
#btn-popover-expand-card .popover-expand-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5)) !important;
  transition: transform 0.22s ease !important;
}

.popover-expand-card-btn:hover .popover-expand-icon,
#btn-popover-expand-card:hover .popover-expand-icon {
  transform: scale(1.08) !important;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.85)) !important;
}

.popover-expand-card-btn .popover-expand-arrow,
#btn-popover-expand-card .popover-expand-arrow {
  color: #38bdf8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.7)) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
}

.popover-expand-card-btn:hover .popover-expand-arrow,
#btn-popover-expand-card:hover .popover-expand-arrow {
  color: #7dd3fc !important;
  transform: translate(1.5px, -1.5px) scale(1.15) !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 1)) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   KMKZ UNIFIED PROGRESS DASHBOARD (Misiones, Pase de Temporada, Nivel & Racha)
   ═══════════════════════════════════════════════════════════════════ */
.unified-progress-dashboard {
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(165deg, rgba(16, 23, 44, 0.95) 0%, rgba(10, 15, 30, 0.98) 55%, rgba(6, 9, 20, 0.99) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  padding: 16px 20px 16px !important;
  box-shadow:
    0 16px 40px -6px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(99, 102, 241, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  margin-top: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 10 !important;
  pointer-events: auto !important;
  overflow: hidden !important;
}

/* Subtle holographic top specular highlight bar */
.unified-progress-dashboard::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 5% !important;
  right: 5% !important;
  height: 1.5px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(251, 191, 36, 0.7) 25%, rgba(168, 85, 247, 0.75) 50%, rgba(56, 189, 248, 0.7) 75%, transparent 100%) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Subtle corner ambient glow */
.unified-progress-dashboard::after {
  content: '' !important;
  position: absolute !important;
  top: -30px !important;
  right: -30px !important;
  width: 140px !important;
  height: 140px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(168, 85, 247, 0.05) 40%, transparent 70%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border-radius: 50% !important;
  filter: blur(20px) !important;
}

/* ── Top Header Bar (Level & XP Track) ── */
.upd-header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding-bottom: 7px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  position: relative !important;
  z-index: 1 !important;
}

.upd-level-info {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.upd-level-badge,
button.upd-level-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #0c0a09 !important;
  padding: 4px 9px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  box-shadow:
    0 2px 10px rgba(245, 158, 11, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, filter 0.18s ease !important;
  outline: none !important;
  line-height: 1.2 !important;
}

.upd-level-badge:hover {
  transform: translateY(-1px) scale(1.02) !important;
  filter: brightness(1.1) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

.upd-level-badge:active {
  transform: scale(0.96) !important;
}

.upd-level-icon {
  font-size: 0.82rem !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
}

.upd-level-num {
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.upd-xp-track-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 2.5px !important;
  flex: 1 !important;
  min-width: 0 !important;
  cursor: default !important;
  pointer-events: auto !important;
  user-select: none !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: opacity 0.15s ease !important;
}

.upd-xp-track-box:hover {
  opacity: 1 !important;
}

.upd-xp-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.upd-xp-title {
  color: #fbbf24 !important;
  letter-spacing: 0.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.upd-xp-val {
  color: #cbd5e1 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.upd-xp-bar-bg {
  width: 100% !important;
  height: 6px !important;
  background: rgba(5, 8, 18, 0.85) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8) !important;
  position: relative !important;
}

.upd-xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 55%, #06b6d4 100%) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5), 0 0 3px rgba(245, 158, 11, 0.4) !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.upd-xp-bar-fill::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%) !important;
  animation: updXpSheen 3.2s infinite ease-in-out !important;
}

@keyframes updXpSheen {
  0% {
    transform: translateX(-100%);
  }

  50%,
  100% {
    transform: translateX(200%);
  }
}

.upd-header-rewards {
  flex-shrink: 0 !important;
}

.upd-chest-ready-pill,
button.upd-chest-ready-pill {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  font-family: 'Outfit', sans-serif !important;
  color: #fef08a !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.1) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  padding: 4px 9px !important;
  border-radius: 10px !important;
  letter-spacing: 0.4px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow:
    0 0 10px rgba(245, 158, 11, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  white-space: nowrap !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease, background 0.18s ease, box-shadow 0.18s ease !important;
  line-height: 1.2 !important;
}

.upd-chest-ready-pill:hover {
  transform: translateY(-1px) !important;
  background: rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
}

.upd-chest-ready-pill:active {
  transform: scale(0.95) !important;
}

.upd-chest-ready-pill.has-claimable {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0c0a09 !important;
  border-color: #fef08a !important;
  box-shadow:
    0 0 16px rgba(245, 158, 11, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  animation: updPillPulse 1.3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes updPillPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  100% {
    transform: scale(1.04);
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  }
}

/* ── 3 Tabs Navigation Dock ── */
.upd-tabs-nav {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
  background: rgba(8, 12, 22, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  padding: 3px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45) !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

.upd-tab-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  padding: 5px 4px !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  font-family: 'Outfit', sans-serif !important;
  min-height: 42px !important;
  max-height: 42px !important;
  box-sizing: border-box !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  position: relative !important;
}

.upd-tab-btn>* {
  pointer-events: none !important;
}

.upd-tab-head {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  max-width: 100% !important;
}

.upd-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}

.upd-tab-btn:active {
  transform: scale(0.97) !important;
}

/* Individual tab active themes */
#upd-tab-quests.active {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.22) 0%, rgba(18, 25, 43, 0.95) 100%) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #fef08a !important;
  box-shadow:
    0 0 14px rgba(245, 158, 11, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#upd-tab-battlepass.active {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.24) 0%, rgba(18, 25, 43, 0.95) 100%) !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
  color: #f5d0fe !important;
  box-shadow:
    0 0 14px rgba(168, 85, 247, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#upd-tab-streak.active {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.22) 0%, rgba(249, 115, 22, 0.18) 50%, rgba(18, 25, 43, 0.95) 100%) !important;
  border-color: rgba(249, 115, 22, 0.55) !important;
  color: #ffedd5 !important;
  box-shadow:
    0 0 14px rgba(239, 68, 68, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* Luminous indicator accent underline on active tab */
.upd-tab-btn.active::after {
  content: '' !important;
  position: absolute !important;
  bottom: 2px !important;
  left: 20% !important;
  right: 20% !important;
  height: 2px !important;
  border-radius: 2px !important;
}

#upd-tab-quests.active::after {
  background: #f59e0b !important;
  box-shadow: 0 0 6px #f59e0b !important;
}

#upd-tab-battlepass.active::after {
  background: #a855f7 !important;
  box-shadow: 0 0 6px #a855f7 !important;
}

#upd-tab-streak.active::after {
  background: #f97316 !important;
  box-shadow: 0 0 6px #f97316 !important;
}

.upd-tab-icon {
  font-size: 0.92rem !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)) !important;
  line-height: 1 !important;
}

.upd-tab-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: 0.3px !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.upd-tab-text-short {
  display: none !important;
}

.upd-tab-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.12) !important;
  letter-spacing: 0.2px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.upd-tab-badge.bp-badge {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #d8b4fe !important;
  border-color: rgba(168, 85, 247, 0.38) !important;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.18) !important;
}

.upd-tab-badge.streak-badge {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.18) !important;
}

/* ── Tab Panels Container (FIXED UNIFIED HEIGHT: PREVENTS JUMPING) ── */
.upd-panels-container {
  width: 100% !important;
  position: relative !important;
  min-height: 56px !important;
  height: 56px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.upd-panel {
  display: none !important;
  width: 100% !important;
  height: 100% !important;
}

.upd-panel.active {
  display: block !important;
  animation: updPanelFade 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes updPanelFade {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Unified Action Cards inside Panels (ALL 3 PANELS SHARE EXACT HEIGHT) ── */
.upd-card-action,
#btn-lobby-open-quests.upd-card-action,
#btn-battlepass.upd-card-action,
#btn-lobby-open-match-streak.upd-card-action {
  width: 100% !important;
  height: 100% !important;
  min-height: 56px !important;
  max-height: 56px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 0 12px !important;
  background: linear-gradient(145deg, rgba(18, 25, 45, 0.88) 0%, rgba(12, 17, 32, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  color: #f8fafc !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  user-select: none !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
}

.upd-card-action>* {
  pointer-events: none !important;
}

.upd-card-action:hover {
  background: linear-gradient(145deg, rgba(26, 36, 62, 0.95) 0%, rgba(15, 21, 40, 0.98) 100%) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.55),
    0 0 16px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}

.upd-card-action:active {
  transform: scale(0.985) !important;
}

.upd-card-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.upd-card-icon-hex {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.2s ease !important;
}

.upd-card-action:hover .upd-card-icon-hex {
  transform: scale(1.06) rotate(1deg) !important;
}

.upd-card-icon-hex.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.18) 100%) !important;
  border: 1.5px solid #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.upd-card-icon-hex.purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(126, 34, 206, 0.18) 100%) !important;
  border: 1.5px solid #a855f7 !important;
  color: #d8b4fe !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
}

.upd-card-icon-hex.fire {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(245, 158, 11, 0.25) 100%) !important;
  border: 1.5px solid #f97316 !important;
  color: #ffedd5 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3) !important;
}

.streak-fire-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7)) !important;
}

.upd-card-texts {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  text-align: left !important;
  min-width: 0 !important;
  flex: 1 !important;
  justify-content: center !important;
}

.upd-card-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.3px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.upd-card-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.streak-reward-pill-inline {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fef08a !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

.upd-card-sub {
  font-size: 0.70rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

.upd-card-sub-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.upd-streak-mini-track {
  width: 44px !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.upd-streak-mini-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
  border-radius: 4px !important;
  transition: width 0.35s ease !important;
}

.upd-streak-mini-fill.blaze-claim {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #fbbf24) !important;
}

.upd-streak-mini-fill.completed {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.upd-card-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.upd-btn-action-label {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.72rem !important;
  color: #0c0a09 !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  box-shadow:
    0 2px 8px rgba(245, 158, 11, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
  letter-spacing: 0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease !important;
}

.upd-btn-text-short {
  display: none !important;
}

.upd-card-action:hover .upd-btn-action-label {
  transform: translateX(2px) !important;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.6) !important;
}

.upd-btn-action-label.bp {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7e22ce 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 2px 8px rgba(168, 85, 247, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.upd-card-action:hover .upd-btn-action-label.bp {
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.6) !important;
}

.upd-btn-action-label.streak {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 50%, #dc2626 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 2px 8px rgba(234, 88, 12, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.upd-card-action:hover .upd-btn-action-label.streak {
  box-shadow: 0 3px 12px rgba(234, 88, 12, 0.65) !important;
}

/* Streak state modifiers on action card */
#btn-lobby-open-match-streak.upd-card-action.can-claim {
  border-color: rgba(251, 191, 36, 0.8) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

#btn-lobby-open-match-streak.upd-card-action.almost-there {
  border-color: rgba(245, 158, 11, 0.5) !important;
}

#btn-lobby-open-match-streak.upd-card-action.is-completed {
  border-color: rgba(16, 185, 129, 0.4) !important;
}

#btn-lobby-open-match-streak.upd-card-action.can-claim .upd-btn-action-label.streak {
  display: none !important;
}

/* ── Mobile Responsive Overrides (max-width: 480px) ── */
@media (max-width: 480px) {
  .unified-progress-dashboard {
    padding: 13px 13px 14px !important;
    gap: 10px !important;
    border-radius: 16px !important;
    margin-top: 4px !important;
  }

  .upd-header-bar {
    gap: 6px !important;
    padding-bottom: 5px !important;
  }

  .upd-level-badge,
  button.upd-level-badge {
    padding: 3px 7px !important;
    font-size: 0.7rem !important;
    border-radius: 8px !important;
  }

  .upd-level-icon {
    font-size: 0.74rem !important;
  }

  .upd-xp-title {
    font-size: 0.7rem !important;
  }

  .upd-xp-val {
    font-size: 0.7rem !important;
  }

  .upd-xp-bar-bg {
    height: 8px !important;
  }

  .upd-chest-ready-pill,
  button.upd-chest-ready-pill {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    border-radius: 8px !important;
  }

  .upd-tabs-nav {
    gap: 3px !important;
    padding: 2.5px !important;
    border-radius: 10px !important;
  }

  .upd-tab-btn {
    padding: 3px 2px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    border-radius: 7px !important;
    gap: 1.5px !important;
  }

  .upd-tab-icon {
    font-size: 0.82rem !important;
  }

  .upd-tab-label {
    font-size: 0.7rem !important;
  }

  .upd-tab-text-full {
    display: none !important;
  }

  .upd-tab-text-short {
    display: inline !important;
  }

  .upd-tab-badge {
    font-size: 0.7rem !important;
    padding: 0.5px 4px !important;
    border-radius: 5px !important;
  }

  .upd-panels-container {
    min-height: 50px !important;
    height: 50px !important;
  }

  .upd-card-action,
  #btn-lobby-open-quests.upd-card-action,
  #btn-battlepass.upd-card-action,
  #btn-lobby-open-match-streak.upd-card-action {
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    gap: 8px !important;
  }

  .upd-card-left {
    gap: 7px !important;
  }

  .upd-card-icon-hex {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .upd-card-icon-hex svg {
    width: 16px !important;
    height: 16px !important;
  }

  .streak-fire-icon {
    font-size: 1.1rem !important;
  }

  .upd-card-title {
    font-size: 0.80rem !important;
  }

  .upd-card-sub {
    font-size: 0.7rem !important;
    max-width: 170px !important;
  }

  .streak-reward-pill-inline {
    font-size: 0.7rem !important;
    padding: 0.5px 4px !important;
  }

  .upd-streak-mini-track {
    width: 36px !important;
    height: 3.5px !important;
  }

  .upd-btn-action-label {
    font-size: 0.7rem !important;
    padding: 4px 7px !important;
    border-radius: 7px !important;
  }

  .upd-btn-text-full {
    display: none !important;
  }

  .upd-btn-text-short {
    display: inline !important;
  }

  .streak-claim-ready-tag {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    border-radius: 7px !important;
  }
}

@media (max-width: 360px) {
  .unified-progress-dashboard {
    padding: 10px 10px 12px !important;
    gap: 8px !important;
  }

  .upd-tab-icon {
    font-size: 0.76rem !important;
  }

  .upd-tab-label {
    font-size: 0.7rem !important;
  }

  .upd-card-sub {
    max-width: 130px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KMKZ 2-MATCH DAILY STREAK - LOBBY BUTTON & MODAL
   ═══════════════════════════════════════════════════════════════════ */

/* ── Lobby Wrapper ── */
.match-streak-lobby-wrapper {
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 2px !important;
}

/* ── Main Lobby Button (.btn-match-streak-minimal) ── */
.btn-match-streak-minimal {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 12px 14px 10px !important;
  background: linear-gradient(135deg, rgba(32, 22, 16, 0.95) 0%, rgba(22, 16, 32, 0.97) 50%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.38) !important;
  border-radius: 18px !important;
  cursor: pointer !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(245, 158, 11, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.26s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  outline: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  overflow: hidden !important;
  text-decoration: none !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Background Warm Flame Shimmer */
.btn-match-streak-minimal .streak-min-bg-glow {
  position: absolute !important;
  top: -50% !important;
  left: -20% !important;
  width: 140% !important;
  height: 200% !important;
  pointer-events: none !important;
  background: radial-gradient(circle 140px at 16% 35%, rgba(245, 158, 11, 0.22) 0%, rgba(239, 68, 68, 0.1) 40%, transparent 70%) !important;
  opacity: 0.85 !important;
  transition: opacity 0.3s ease !important;
  z-index: 0 !important;
}

/* Periodic Ambient Card Light Sweep */
.btn-match-streak-minimal .streak-card-shimmer {
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 60% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%) !important;
  transform: skewX(-22deg) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: streakCardSheen 5s infinite ease-in-out !important;
}

@keyframes streakCardSheen {

  0%,
  70% {
    left: -100%;
    opacity: 0;
  }

  85% {
    opacity: 1;
  }

  100% {
    left: 200%;
    opacity: 0;
  }
}

/* Hover State */
.btn-match-streak-minimal:hover {
  background: linear-gradient(135deg, rgba(42, 28, 18, 0.98) 0%, rgba(28, 20, 38, 0.98) 50%, rgba(15, 23, 42, 1) 100%) !important;
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(245, 158, 11, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px) !important;
}

.btn-match-streak-minimal:hover .streak-min-bg-glow {
  opacity: 1 !important;
}

/* Active State */
.btn-match-streak-minimal:active {
  transform: translateY(0) scale(0.99) !important;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(245, 158, 11, 0.18) !important;
}

/* Focus Visible */
.btn-match-streak-minimal:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

/* State: Almost There (1/2 Matches Played - High Anticipation!) */
.btn-match-streak-minimal.almost-there {
  border-color: rgba(245, 158, 11, 0.8) !important;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(245, 158, 11, 0.38),
    inset 0 0 14px rgba(245, 158, 11, 0.12) !important;
  animation: streakAlmostPulse 2.8s infinite ease-in-out !important;
}

@keyframes streakAlmostPulse {

  0%,
  100% {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(245, 158, 11, 0.25);
  }

  50% {
    border-color: rgba(251, 191, 36, 1);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 32px rgba(245, 158, 11, 0.5), 0 0 12px rgba(239, 68, 68, 0.3);
  }
}

/* State: Can Claim (Ready to Collect) - Full Blaze Flame Effect */
.btn-match-streak-minimal.can-claim {
  border-color: rgba(251, 191, 36, 0.95) !important;
  animation: streakLobbyBtnBlaze 2.2s infinite ease-in-out !important;
}

@keyframes streakLobbyBtnBlaze {

  0%,
  100% {
    box-shadow:
      0 6px 22px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(245, 158, 11, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(245, 158, 11, 0.7);
  }

  50% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.6),
      0 0 36px rgba(245, 158, 11, 0.65),
      0 0 18px rgba(239, 68, 68, 0.45),
      inset 0 0 18px rgba(245, 158, 11, 0.22);
    border-color: rgba(251, 191, 36, 1);
  }
}

/* State: Completed Today */
.btn-match-streak-minimal.is-completed {
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(16, 185, 129, 0.14) !important;
}

/* ── Top Header Row ── */
.streak-min-header-row {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.streak-min-left {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* Flame Icon Box with Pulse Ring */
.streak-min-icon-box {
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28) 0%, rgba(245, 158, 11, 0.35) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.55) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-match-streak-minimal:hover .streak-min-icon-box {
  transform: scale(1.08) !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(245, 158, 11, 0.5) 100%) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.55) !important;
}

.streak-icon-pulse-ring {
  position: absolute !important;
  inset: -4px !important;
  border-radius: 18px !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.btn-match-streak-minimal.almost-there .streak-icon-pulse-ring,
.btn-match-streak-minimal.can-claim .streak-icon-pulse-ring {
  animation: streakRingPulse 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

@keyframes streakRingPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.streak-fire-icon {
  font-size: 1.45rem !important;
  line-height: 1 !important;
  display: inline-block !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85)) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-match-streak-minimal:hover .streak-fire-icon {
  transform: rotate(-8deg) scale(1.1) !important;
}

.btn-match-streak-minimal.almost-there .streak-fire-icon,
.btn-match-streak-minimal.can-claim .streak-fire-icon {
  animation: streakFireFlicker 1.8s infinite ease-in-out !important;
}

@keyframes streakFireFlicker {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
  }

  50% {
    transform: scale(1.2) rotate(-8deg);
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 1)) drop-shadow(0 0 20px rgba(239, 68, 68, 0.7));
  }
}

/* Info Column */
.streak-min-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  gap: 3px !important;
}

.streak-min-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: 100% !important;
}

.streak-min-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.96rem !important;
  color: #ffffff !important;
  letter-spacing: 0.25px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

/* Day Badge Pill */
.streak-day-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24) 0%, rgba(217, 119, 6, 0.35) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  color: #fde68a !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-match-streak-minimal:hover .streak-day-badge {
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.38) 0%, rgba(217, 119, 6, 0.5) 100%) !important;
}

.streak-min-sub {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
  line-height: 1.2 !important;
  transition: color 0.2s ease !important;
}

.btn-match-streak-minimal:hover .streak-min-sub {
  color: #e2e8f0 !important;
}

.btn-match-streak-minimal.almost-there .streak-min-sub {
  color: #f59e0b !important;
  font-weight: 800 !important;
}

.btn-match-streak-minimal.can-claim .streak-min-sub {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.btn-match-streak-minimal.is-completed .streak-min-sub {
  color: #34d399 !important;
}

/* Right Section */
.streak-min-right {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

/* Reward Preview Box */
.streak-reward-preview-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
}

.streak-reward-mini-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  color: #fbbf24 !important;
  text-transform: uppercase !important;
  opacity: 0.9 !important;
}

/* Reward Pill */
.streak-reward-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.28) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fef08a !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-match-streak-minimal:hover .streak-reward-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.42) 100%) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35) !important;
}

/* Claim Ready Tag */
.streak-claim-ready-tag {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  padding: 5px 11px !important;
  border-radius: 10px !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.85), 0 0 24px rgba(239, 68, 68, 0.55) !important;
  animation: streakClaimReadyPulse 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes streakClaimReadyPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.8), 0 0 22px rgba(239, 68, 68, 0.5);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 24px rgba(245, 158, 11, 1), 0 0 34px rgba(239, 68, 68, 0.8);
  }
}

/* Arrow */
.streak-min-arrow {
  color: #64748b !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  font-weight: 300 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.btn-match-streak-minimal:hover .streak-min-arrow {
  color: #fbbf24 !important;
  transform: translateX(3px) !important;
}

/* ── 2-Step Daily Match Progress Track ── */
.streak-lobby-track-container {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  padding: 4px 0 2px !important;
}

.streak-lobby-step-track {
  position: relative !important;
  width: 100% !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
}

.streak-track-bar-bg {
  position: absolute !important;
  top: 13px !important;
  left: 20px !important;
  right: 20px !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.streak-track-bar-fill {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 60%, #fbbf24 100%) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7) !important;
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.streak-track-bar-fill.blaze-claim {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #fbbf24, #f59e0b) !important;
  background-size: 200% 100% !important;
  animation: streakFillShine 2s infinite linear !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.9) !important;
}

.streak-track-bar-fill.completed {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

@keyframes streakFillShine {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.streak-track-checkpoints {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
}

.streak-track-step {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  padding: 3px 10px 3px 4px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.streak-track-step .step-badge {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  background: #1e293b !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  color: #94a3b8 !important;
  position: relative !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.streak-track-step .step-icon-check,
.streak-track-step .step-icon-trophy {
  display: none !important;
}

.streak-track-step.step-done {
  border-color: rgba(16, 185, 129, 0.5) !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

.streak-track-step.step-done .step-badge {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

.streak-track-step.step-done .step-digit {
  display: none !important;
}

.streak-track-step.step-done .step-icon-check,
.streak-track-step.step-done .step-icon-trophy {
  display: inline-block !important;
}

.streak-track-step.step-active {
  border-color: rgba(251, 191, 36, 0.7) !important;
  background: rgba(245, 158, 11, 0.15) !important;
  animation: stepActiveBorderPulse 1.8s infinite ease-in-out !important;
}

.streak-track-step.step-active .step-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7) !important;
  transform: scale(1.1) !important;
}

@keyframes stepActiveBorderPulse {

  0%,
  100% {
    border-color: rgba(251, 191, 36, 0.5);
  }

  50% {
    border-color: rgba(251, 191, 36, 1);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
  }
}

.streak-track-step .step-text {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  transition: color 0.2s ease !important;
}

.streak-track-step.step-done .step-text {
  color: #34d399 !important;
}

.streak-track-step.step-active .step-text {
  color: #fbbf24 !important;
}

/* ── Motivational Bottom Ribbon & 7-Day Timeline ── */
.streak-lobby-bottom-ribbon {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  padding-top: 8px !important;
  margin-top: 2px !important;
}

.streak-motive-message {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  flex: 1 1 auto !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

.streak-motive-message .motive-one-left {
  color: #fbbf24 !important;
  font-weight: 900 !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.45) !important;
}

.streak-motive-message .motive-claim {
  color: #f59e0b !important;
  font-weight: 900 !important;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.8) !important;
}

.streak-motive-message .motive-done {
  color: #34d399 !important;
  font-weight: 800 !important;
}

.streak-7day-pips {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}

.streak-pip {
  width: 15px !important;
  height: 15px !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #64748b !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.streak-pip.pip-done {
  background: rgba(16, 185, 129, 0.28) !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.4) !important;
}

.streak-pip.pip-current {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.75) !important;
  transform: scale(1.15) !important;
}

.streak-pip.pip-claimable {
  animation: pipFlamePulse 1.3s infinite ease-in-out !important;
}

@keyframes pipFlamePulse {

  0%,
  100% {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.75);
  }

  50% {
    transform: scale(1.3);
    box-shadow: 0 0 14px rgba(245, 158, 11, 1), 0 0 6px rgba(239, 68, 68, 0.8);
  }
}

.streak-pip.pip-locked {
  color: #94a3b8 !important;
}


/* ── Top Header Badge (.match-streak-header-badge) ── */
.match-streak-header-badge,
#header-match-streak-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 40px !important;
  height: 40px !important;
  max-height: 40px !important;
  padding: 0 12px !important;
  background: rgba(28, 22, 14, 0.94) !important;
  border-radius: 12px !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  position: relative !important;
  user-select: none !important;
  touch-action: manipulation !important;
  outline: none !important;
  font-family: 'Outfit', sans-serif !important;
}

.match-streak-header-badge:hover,
#header-match-streak-badge:hover {
  background: rgba(38, 28, 18, 0.98) !important;
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 158, 11, 0.3) !important;
  transform: translateY(-1px) !important;
}

.match-streak-header-badge:active,
#header-match-streak-badge:active {
  transform: scale(0.97) !important;
}

.match-streak-header-badge:focus-visible,
#header-match-streak-badge:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.match-streak-header-badge.can-claim,
#header-match-streak-badge.can-claim {
  border-color: rgba(251, 191, 36, 0.9) !important;
  animation: streakHeaderCanClaimPulse 2s infinite ease-in-out !important;
}

@keyframes streakHeaderCanClaimPulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 158, 11, 0.35);
  }

  50% {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 158, 11, 0.65);
    border-color: #fbbf24;
  }
}

.match-streak-header-flame {
  font-size: 1.15rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.8)) !important;
}

.match-streak-claim-pill {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  padding: 1px 6px !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9) !important;
  letter-spacing: 0.3px !important;
  animation: streakClaimReadyPulse 1.6s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── Match Streak Modal Styles ── */
.match-streak-modal-container {
  background: linear-gradient(165deg, rgba(16, 23, 42, 0.98) 0%, rgba(10, 15, 29, 0.99) 100%) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 20px !important;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(245, 158, 11, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  max-width: 640px !important;
  width: 95vw !important;
  padding: 16px 20px !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  max-height: min(92vh, 92dvh) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(245, 158, 11, 0.35) transparent !important;
  font-family: 'Outfit', sans-serif !important;
}

.match-streak-top-glow {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, transparent, #f59e0b 20%, #ef4444 50%, #fbbf24 80%, transparent) !important;
  border-radius: 20px 20px 0 0 !important;
}

.match-streak-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.match-streak-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.match-streak-flame-box {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
  border: 1.5px solid #f59e0b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35) !important;
  flex-shrink: 0 !important;
}

.match-streak-flame-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8)) !important;
}

.match-streak-header-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.match-streak-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.match-streak-title {
  margin: 0 !important;
  font-family: 'Cinzel', serif !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.04em !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
}

.match-streak-badge-streak-fire {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #fef08a !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.match-streak-subtitle {
  margin: 0 !important;
  font-size: 0.78rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
}

.match-streak-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.match-streak-close-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35) !important;
}

.match-streak-close-btn:active {
  background: rgba(239, 68, 68, 0.38) !important;
  border-color: #ef4444 !important;
  transform: scale(0.94) !important;
}

/* Today Progress Card */
.match-streak-today-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.today-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
  gap: 8px !important;
}

.today-card-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.today-card-tag {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.today-card-status {
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  letter-spacing: 0.02em !important;
}

.match-streak-badge-active {
  background: rgba(56, 189, 248, 0.16) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

.match-streak-progress-track {
  width: 100% !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  margin-bottom: 10px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  position: relative !important;
}

.match-streak-progress-track::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 2px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.match-streak-progress-fill {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 60%, #38bdf8 100%) !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6) !important;
}

.today-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
}

.streak-visual-rules {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.streak-rule-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  color: #cbd5e1 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.streak-rule-chip svg {
  color: #38bdf8 !important;
  flex-shrink: 0 !important;
}

.today-card-claim-hint {
  color: #fbbf24 !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   KMKZ 7-Day Match Streak Roadmap & Interactive Visual Progress Bar
   ========================================================================== */
.match-streak-roadmap-section {
  margin-bottom: 12px !important;
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.75) 0%, rgba(12, 17, 32, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 14px 14px 16px !important;
  position: relative !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.roadmap-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.roadmap-header-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.roadmap-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.roadmap-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.roadmap-cycle-pill {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  transition: all 0.3s ease !important;
}

.roadmap-cycle-pill.cycle-claimable {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
  animation: cyclePillPulse 1.6s infinite ease-in-out !important;
}

.roadmap-cycle-pill.cycle-completed {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

@keyframes cyclePillPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.9;
  }
}

.roadmap-subtitle {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  font-weight: 500 !important;
}

.roadmap-cycle-tag {
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  color: #a78bfa !important;
  background: rgba(167, 139, 250, 0.12) !important;
  border: 1px solid rgba(167, 139, 250, 0.35) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ── Progress Bar & Checkpoints Container ── */
.roadmap-progress-bar-container {
  position: relative !important;
  width: 100% !important;
  padding: 4px 6px 12px !important;
  margin-bottom: 8px !important;
  box-sizing: border-box !important;
}

.roadmap-progress-bar-bg {
  position: relative !important;
  width: 100% !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  overflow: visible !important;
}

.roadmap-progress-bar-fill {
  position: relative !important;
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #10b981 0%, #06b6d4 40%, #f59e0b 80%, #fbbf24 100%) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.65) !important;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.roadmap-progress-spark {
  position: absolute !important;
  right: -4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 0 8px #fbbf24, 0 0 14px rgba(251, 191, 36, 0.9) !important;
  pointer-events: none !important;
  animation: sparkPulse 1.2s infinite alternate ease-in-out !important;
}

@keyframes sparkPulse {
  0% {
    transform: translateY(-50%) scale(0.85);
    box-shadow: 0 0 6px #fbbf24;
  }
  100% {
    transform: translateY(-50%) scale(1.25);
    box-shadow: 0 0 10px #fbbf24, 0 0 18px rgba(245, 158, 11, 0.9);
  }
}

.roadmap-progress-checkpoints {
  position: absolute !important;
  top: 4px !important;
  left: 6px !important;
  right: 6px !important;
  height: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  pointer-events: none !important;
}

.roadmap-checkpoint {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: #0f172a !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.6rem !important;
  font-weight: 900 !important;
  color: #94a3b8 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.3s ease !important;
  z-index: 2 !important;
  user-select: none !important;
}

.roadmap-checkpoint .cp-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.3) !important;
}

.roadmap-checkpoint.cp-completed {
  background: #10b981 !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6) !important;
}

.roadmap-checkpoint.cp-claimable {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #fef08a !important;
  color: #0f172a !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8) !important;
  animation: cpClaimPulse 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes cpClaimPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(245, 158, 11, 1);
  }
}

.roadmap-checkpoint.cp-active {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6) !important;
}

.roadmap-checkpoint.cp-locked {
  background: #0b0f19 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ── 7-Day Milestone Cards Grid (Desktop Default: 7 Columns) ── */
.match-streak-roadmap {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.match-streak-node {
  background: linear-gradient(180deg, rgba(22, 31, 53, 0.8) 0%, rgba(12, 17, 32, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 6px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: center !important;
  gap: 4px !important;
  min-height: 100px !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.match-streak-node:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.2) !important;
}

.match-streak-node.node-completed {
  border-color: rgba(34, 197, 94, 0.4) !important;
  background: linear-gradient(180deg, rgba(16, 32, 28, 0.8) 0%, rgba(9, 20, 18, 0.95) 100%) !important;
  opacity: 0.85 !important;
}

.match-streak-node.node-completed:hover {
  border-color: rgba(52, 211, 153, 0.7) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3) !important;
}

.match-streak-node.node-claimable {
  border-color: #f59e0b !important;
  background: linear-gradient(180deg, rgba(45, 30, 15, 0.9) 0%, rgba(20, 14, 10, 0.98) 100%) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45) !important;
  animation: nodeClaimGlow 1.8s infinite ease-in-out !important;
}

.match-streak-node.node-active {
  border-color: rgba(56, 189, 248, 0.7) !important;
  background: linear-gradient(180deg, rgba(14, 34, 60, 0.85) 0%, rgba(10, 20, 36, 0.96) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}

.match-streak-node.node-locked {
  opacity: 0.65 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: rgba(12, 17, 30, 0.65) !important;
}

.match-streak-node.is-special-chest {
  border: 1.5px solid #f59e0b !important;
  background: linear-gradient(180deg, rgba(45, 20, 65, 0.9) 0%, rgba(25, 12, 40, 0.98) 100%) !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.35) !important;
}

.match-streak-node.is-special-chest:hover {
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.6), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.roadmap-node-glow {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
}

.match-streak-node.node-claimable .roadmap-node-glow {
  background: linear-gradient(90deg, transparent, #fbbf24, #ef4444, transparent) !important;
  height: 2px !important;
}

.match-streak-node.is-special-chest .roadmap-node-glow {
  background: linear-gradient(90deg, transparent, #fbbf24, #c084fc, #fbbf24, transparent) !important;
  height: 2px !important;
}

.roadmap-node-top {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  width: 100% !important;
}

.roadmap-day-tag-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

.roadmap-node-day {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
}

.node-claimable .roadmap-node-day,
.is-special-chest .roadmap-node-day {
  color: #fde68a !important;
}

.roadmap-status-icon {
  font-size: 0.68rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.roadmap-status-icon.completed-check {
  color: #34d399 !important;
  font-weight: 900 !important;
}

.roadmap-status-icon.claim-flame {
  color: #fbbf24 !important;
}

.roadmap-status-icon.in-progress-bolt {
  color: #38bdf8 !important;
}

.roadmap-status-icon.locked-lock {
  color: #64748b !important;
}

.roadmap-badge {
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.roadmap-badge.badge-done {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.roadmap-badge.badge-claim {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0f172a !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6) !important;
}

.roadmap-badge.badge-active {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
}

.roadmap-badge.badge-locked {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ── Reward Visual (Coin Medallion & Mythic Chest) ── */
.roadmap-node-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 2px 0 !important;
  flex: 1 !important;
}

.roadmap-reward-visual {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  width: 100% !important;
}

.coin-token-halo {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.roadmap-coin-icon {
  width: 26px !important;
  height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.6)) !important;
  transition: transform 0.2s ease !important;
}

.roadmap-coin-img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 3px 6px rgba(245, 158, 11, 0.45)) !important;
  transition: transform 0.2s ease !important;
}

.roadmap-coin-mini-img {
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
  display: inline-block !important;
}

.match-streak-node:hover .roadmap-coin-icon,
.match-streak-node:hover .roadmap-coin-img {
  transform: scale(1.1) rotate(4deg) !important;
}

.mythic-chest-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
}

.roadmap-reward-coins {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.roadmap-reward-coins.highlight-gold {
  color: #fde68a !important;
  font-size: 0.84rem !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8) !important;
}

.kmkz-coin-hex-mini {
  font-size: 0.65rem !important;
  color: #f59e0b !important;
}

/* ── Mythic Chest Visual (Day 7) ── */
.mythic-chest-visual {
  position: relative !important;
}

.mythic-chest-glow {
  position: absolute !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, rgba(168, 85, 247, 0.25) 60%, transparent 80%) !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -65%) !important;
  animation: chestAuraPulse 2s infinite alternate ease-in-out !important;
  pointer-events: none !important;
}

@keyframes chestAuraPulse {
  0% {
    transform: translate(-50%, -65%) scale(0.9);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -65%) scale(1.3);
    opacity: 1;
  }
}

.mythic-crate-svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.8)) !important;
  animation: chestFloat 2.5s infinite ease-in-out !important;
}

@keyframes chestFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px) scale(1.04);
  }
}

.mythic-chest-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  color: #fde68a !important;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.3), rgba(168, 85, 247, 0.35)) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  letter-spacing: 0.04em !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.3) !important;
  white-space: nowrap !important;
}

/* Action Area */
.match-streak-action-area {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.streak-cooldown-note {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  text-align: center !important;
}

.btn-claim-streak {
  width: 100% !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-claim-streak.ready-pulse {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.6) !important;
  animation: btnClaimStreakPulse 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes btnClaimStreakPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.85);
  }
}

.btn-claim-streak.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

/* ── Mobile Responsiveness for Match Streak (High Ergonomics, Zero Squeeze) ── */
@media (max-width: 640px) {
  .match-streak-modal-container {
    width: 96vw !important;
    padding: 16px 14px !important;
    border-radius: 18px !important;
    max-height: calc(100dvh - 16px) !important;
  }

  .match-streak-header {
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
  }

  .match-streak-title {
    font-size: 1.02rem !important;
  }

  .match-streak-today-card {
    padding: 12px 13px !important;
    margin-bottom: 12px !important;
  }

  .today-card-status {
    font-size: 0.9rem !important;
  }

  .match-streak-roadmap-section {
    padding: 12px 11px 14px !important;
    margin-bottom: 12px !important;
  }

  /* Split into clean, balanced 4-column 2-row layout with Day 7 as double-width featured card */
  .match-streak-roadmap {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 7px !important;
    width: 100% !important;
  }

  .match-streak-node.is-special-chest,
  .match-streak-node[data-day="7"] {
    grid-column: span 2 !important;
  }

  .match-streak-node.is-special-chest .mythic-chest-visual {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  .match-streak-node.is-special-chest .mythic-chest-meta {
    align-items: flex-start !important;
  }

  .match-streak-node {
    padding: 8px 5px !important;
    min-height: 92px !important;
    gap: 5px !important;
    border-radius: 12px !important;
  }

  .roadmap-node-day {
    font-size: 0.68rem !important;
  }

  .roadmap-badge {
    font-size: 0.6rem !important;
    padding: 2px 6px !important;
  }

  .roadmap-coin-icon,
  .roadmap-coin-img {
    width: 24px !important;
    height: 24px !important;
  }

  .roadmap-reward-coins {
    font-size: 0.78rem !important;
  }

  .btn-claim-streak {
    min-height: 42px !important;
    font-size: 0.84rem !important;
    padding: 8px 12px !important;
  }
}

@media (max-width: 480px) {
  .match-streak-modal-container {
    width: 96vw !important;
    padding: 15px 12px !important;
  }

  .match-streak-title {
    font-size: 0.95rem !important;
  }

  .match-streak-roadmap {
    gap: 6px !important;
  }

  .match-streak-node {
    padding: 7px 4px !important;
    min-height: 88px !important;
  }

  .roadmap-node-day {
    font-size: 0.66rem !important;
  }

  .roadmap-badge {
    font-size: 0.58rem !important;
    padding: 1px 5px !important;
  }

  .roadmap-coin-icon,
  .roadmap-coin-img {
    width: 22px !important;
    height: 22px !important;
  }

  .roadmap-reward-coins {
    font-size: 0.74rem !important;
  }

  .roadmap-checkpoint {
    width: 14px !important;
    height: 14px !important;
    font-size: 0.55rem !important;
  }
}

@media (max-width: 360px) {
  .match-streak-modal-container {
    padding: 14px 10px !important;
  }

  .match-streak-title {
    font-size: 0.88rem !important;
  }

  .match-streak-badge-streak-fire {
    display: none !important;
  }

  .match-streak-roadmap {
    gap: 5px !important;
  }

  .match-streak-node {
    padding: 7px 3px !important;
    min-height: 84px !important;
  }

  .roadmap-node-day {
    font-size: 0.63rem !important;
  }

  .roadmap-badge {
    font-size: 0.56rem !important;
    padding: 1px 4px !important;
  }

  .roadmap-coin-icon,
  .roadmap-coin-img {
    width: 20px !important;
    height: 20px !important;
  }

  .roadmap-reward-coins {
    font-size: 0.71rem !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   KMKZ LEVEL ROADMAP & 3D CHEST CELEBRATION MODALS
   ═══════════════════════════════════════════════════════════════════ */

/* Modal Level Rewards Overlay */
#modal-level-rewards {
  z-index: 1000005 !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  width: 100vw !important;
  height: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  padding: max(6px, env(safe-area-inset-top, 6px)) max(6px, env(safe-area-inset-right, 6px)) max(6px, env(safe-area-inset-bottom, 6px)) max(6px, env(safe-area-inset-left, 6px)) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#modal-level-rewards.hidden {
  display: none !important;
}

.level-rewards-modal-container {
  background: linear-gradient(180deg, rgba(20, 16, 34, 0.98) 0%, rgba(11, 9, 20, 0.99) 100%) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
  border-radius: 28px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(168, 85, 247, 0.25) !important;
  max-width: 640px !important;
  width: 100% !important;
  height: 88vh !important;
  height: min(88vh, calc(100dvh - 16px)) !important;
  max-height: 100% !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  font-family: 'Outfit', sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  margin: auto !important;
}

/* Header */
.level-rewards-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2) !important;
  margin-bottom: 14px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 10px !important;
}

.level-rewards-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.level-rewards-trophy-icon {
  font-size: 2.2rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.65)) !important;
  animation: kmkzTrophyBounce 3s ease-in-out infinite !important;
  flex-shrink: 0 !important;
}

@keyframes kmkzTrophyBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.06);
  }
}

.level-rewards-title {
  font-size: 1.28rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 45%, #c084fc 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 20px rgba(192, 132, 252, 0.35) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.level-rewards-subtitle {
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  margin: 3px 0 0 0 !important;
  line-height: 1.3 !important;
}

.level-rewards-modal-container .btn-close-modal {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
}

.level-rewards-modal-container .btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: scale(1.08) !important;
}

/* Modal Body */
.level-rewards-modal-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: hidden !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Level Status Card */
.level-status-card {
  background: linear-gradient(135deg, rgba(28, 20, 50, 0.9) 0%, rgba(16, 12, 30, 0.95) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: 20px !important;
  padding: 14px 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.level-status-top {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.level-current-badge-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 60px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #6b21a8 0%, #a855f7 100%) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  flex-shrink: 0 !important;
}

.level-current-prefix {
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  color: #e9d5ff !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
}

.level-current-num {
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1 !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
}

.level-current-label {
  display: none !important;
}

.level-xp-label-main {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.level-xp-tag-pill {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  padding: 1px 7px !important;
  border-radius: 6px !important;
  background: rgba(168, 85, 247, 0.22) !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  color: #e9d5ff !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
}

.level-xp-sub-text {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

.level-xp-details {
  flex: 1 1 0% !important;
  min-width: 170px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

.level-xp-labels {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.78rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 6px !important;
}

.level-xp-labels span:first-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#level-roadmap-xp-text {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.level-xp-bar-track {
  width: 100% !important;
  height: 10px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7) !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.level-xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 50%, #f59e0b 100%) !important;
  border-radius: 10px !important;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.75) !important;
}

.level-claim-all-wrap {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.btn-claim-all-levels {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 10px 16px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.btn-claim-all-levels:hover:not(.disabled):not(:disabled) {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.65) !important;
}

.btn-claim-all-levels.disabled,
.btn-claim-all-levels:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  transform: none !important;
}

.badge-claim-all-count {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  border-radius: 10px !important;
  padding: 1px 6px !important;
  line-height: 1.2 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   LEVEL ROADMAP TRACK & MILESTONES CONTAINER (Target: /html/body/div[1]/div[27]/div/div[2]/div[2])
   ═══════════════════════════════════════════════════════════════════ */

.level-roadmap-track-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  background: rgba(10, 8, 20, 0.65) !important;
  border: 1px solid rgba(168, 85, 247, 0.22) !important;
  border-radius: 22px !important;
  padding: 14px 14px 10px 14px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.level-roadmap-track-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 4px 4px 4px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 8px !important;
}

.track-header-title {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  color: #c084fc !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.track-pending-tag {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 12px !important;
  padding: 2px 10px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.level-roadmap-nodes-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 4px 6px 14px 4px !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent !important;
  box-sizing: border-box !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

.level-roadmap-nodes-container::-webkit-scrollbar {
  width: 6px !important;
}

.level-roadmap-nodes-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 4px !important;
}

.level-roadmap-nodes-container::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.45) !important;
  border-radius: 4px !important;
}

.level-roadmap-nodes-container::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.75) !important;
}

/* Individual Milestone Card (Desktop Base) */
.level-milestone-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 11px 16px !important;
  border-radius: 16px !important;
  background: rgba(22, 17, 38, 0.9) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  box-sizing: border-box !important;
  user-select: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.level-milestone-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Card States: Claimable */
.level-milestone-card.card-claimable {
  background: linear-gradient(135deg, rgba(46, 24, 76, 0.95) 0%, rgba(28, 16, 50, 0.95) 100%) !important;
  border: 1.5px solid #a855f7 !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35), inset 0 0 16px rgba(168, 85, 247, 0.18) !important;
  animation: kmkzClaimableCardPulse 2.4s ease-in-out infinite !important;
}

@keyframes kmkzClaimableCardPulse {

  0%,
  100% {
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.3), inset 0 0 12px rgba(168, 85, 247, 0.12);
  }

  50% {
    box-shadow: 0 0 32px rgba(168, 85, 247, 0.55), inset 0 0 20px rgba(168, 85, 247, 0.25);
  }
}

/* Card States: Claimed */
.level-milestone-card.card-claimed {
  background: rgba(14, 20, 34, 0.6) !important;
  border: 1px solid rgba(34, 197, 94, 0.25) !important;
  opacity: 0.85 !important;
}

/* Card States: Locked */
.level-milestone-card.card-locked {
  background: rgba(14, 11, 24, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  opacity: 0.65 !important;
}

.level-milestone-card.card-locked:hover {
  opacity: 0.88 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Level indicator on card */
.card-level-indicator {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.card-claimable .card-level-indicator {
  background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6) !important;
}

.card-claimed .card-level-indicator {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.35) !important;
}

.card-lvl-num {
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1 !important;
}

.card-lvl-lbl {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #c084fc !important;
  letter-spacing: 0.6px !important;
}

.card-claimed .card-lvl-lbl {
  color: #4ade80 !important;
}

/* Reward Info */
.card-reward-info {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.card-reward-title {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.card-reward-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.chip-coins,
.chip-chest,
.chip-item,
.chip-mystery {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
}

.chip-coins {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 8px !important;
  padding: 2px 7px !important;
}

.chip-chest {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.38) !important;
  border-radius: 8px !important;
  padding: 2px 7px !important;
}

.chip-item {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 8px !important;
  padding: 2px 7px !important;
}

.chip-mystery {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #f3e8ff !important;
  background: rgba(168, 85, 247, 0.18) !important;
  border: 1px dashed rgba(192, 132, 252, 0.55) !important;
  border-radius: 8px !important;
  padding: 2px 8px !important;
  gap: 4px !important;
  letter-spacing: 0.3px !important;
  box-shadow: inset 0 0 8px rgba(168, 85, 247, 0.15) !important;
}

.chip-sparkle {
  color: #fde047 !important;
  animation: kmkzChipSparkle 2s ease-in-out infinite !important;
  flex-shrink: 0 !important;
}

@keyframes kmkzChipSparkle {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.2) rotate(15deg);
    opacity: 1;
    filter: drop-shadow(0 0 4px #fde047);
  }
}

/* Status Pill & Action Button */
.card-status-pill {
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  padding: 5px 12px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.card-status-pill.claimed {
  color: #4ade80 !important;
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.card-status-pill.locked {
  color: #94a3b8 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.card-action-btn {
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%) !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.8rem !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  outline: none !important;
  border-radius: 12px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.55) !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.card-action-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.8) !important;
}

.card-action-btn.pulse-glow {
  animation: kmkzBtnPulseGlow 1.8s infinite !important;
}

@keyframes kmkzBtnPulseGlow {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
  }

  50% {
    box-shadow: 0 6px 26px rgba(217, 70, 239, 0.85);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE STYLES FOR LEVEL REWARDS & ROADMAP TRACK
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  #modal-level-rewards {
    padding: max(4px, env(safe-area-inset-top, 4px)) max(4px, env(safe-area-inset-right, 4px)) max(4px, env(safe-area-inset-bottom, 4px)) max(4px, env(safe-area-inset-left, 4px)) !important;
    align-items: stretch !important;
  }

  .level-rewards-modal-container {
    padding: 10px 10px 8px 10px !important;
    max-height: 100% !important;
    height: 100% !important;
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  /* Header Mobile */
  .level-rewards-header {
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }

  .level-rewards-header-left {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .level-rewards-trophy-icon {
    font-size: 1.5rem !important;
    flex-shrink: 0 !important;
  }

  .level-rewards-title {
    font-size: 1.05rem !important;
    letter-spacing: 0.4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .level-rewards-subtitle {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .level-rewards-modal-container .btn-close-modal {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
  }

  /* Body Mobile */
  .level-rewards-modal-body {
    gap: 8px !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  /* Level Status Card Mobile */
  .level-status-card {
    padding: 8px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .level-status-top {
    display: grid !important;
    grid-template-columns: 48px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 6px 10px !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .level-current-badge-wrap {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 48px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    padding: 2px !important;
  }

  .level-current-prefix {
    font-size: 0.55rem !important;
    letter-spacing: 0.5px !important;
  }

  .level-current-num {
    font-size: 1.25rem !important;
  }

  .level-current-label {
    display: none !important;
  }

  .level-xp-details {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 3px !important;
    box-sizing: border-box !important;
  }

  .level-xp-labels {
    font-size: 0.7rem !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .level-xp-labels span:first-child {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  #level-roadmap-xp-text {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .level-xp-bar-track {
    height: 8px !important;
  }

  .level-claim-all-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }

  .btn-claim-all-levels {
    width: 100% !important;
    justify-content: center !important;
    padding: 7px 12px !important;
    font-size: 0.76rem !important;
    border-radius: 10px !important;
    min-height: 32px !important;
    box-sizing: border-box !important;
  }

  /* Track Wrap Mobile (/html/body/div[1]/div[27]/div/div[2]/div[2]) */
  .level-roadmap-track-wrap {
    padding: 8px 8px 6px 8px !important;
    border-radius: 16px !important;
    gap: 6px !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .level-roadmap-track-header {
    padding: 0 2px 2px 2px !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .track-header-title {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  .track-pending-tag {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .level-roadmap-nodes-container {
    gap: 8px !important;
    padding: 2px 4px 10px 2px !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  /* Milestone Card Mobile - Resilient Grid layout */
  .level-milestone-card {
    display: grid !important;
    grid-template-columns: 38px 1fr auto !important;
    grid-template-areas: "indicator info action" !important;
    align-items: center !important;
    gap: 8px 10px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 50px !important;
  }

  .card-level-indicator {
    grid-area: indicator !important;
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .card-lvl-num {
    font-size: 0.98rem !important;
    line-height: 1 !important;
  }

  .card-lvl-lbl {
    font-size: 0.7rem !important;
    line-height: 1 !important;
    margin-top: 1px !important;
  }

  .card-reward-info {
    grid-area: info !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  .card-reward-title {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  .card-reward-chips {
    gap: 4px !important;
    min-width: 0 !important;
  }

  .chip-coins,
  .chip-chest,
  .chip-item,
  .chip-mystery {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 1.5px 6px !important;
    border-radius: 6px !important;
  }

  .card-action-btn {
    grid-area: action !important;
    flex-shrink: 0 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 6px 11px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    min-height: 30px !important;
  }

  .card-status-pill {
    grid-area: action !important;
    flex-shrink: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

/* Ultra-Narrow Mobile Screens (< 420px, iPhone SE, Galaxy Fold, Compact Android) */
@media (max-width: 420px) {
  #modal-level-rewards {
    padding: max(3px, env(safe-area-inset-top, 3px)) max(3px, env(safe-area-inset-right, 3px)) max(3px, env(safe-area-inset-bottom, 3px)) max(3px, env(safe-area-inset-left, 3px)) !important;
  }

  .level-rewards-modal-container {
    padding: 8px 7px 6px 7px !important;
    border-radius: 14px !important;
    gap: 6px !important;
  }

  .level-rewards-title {
    font-size: 0.95rem !important;
  }

  .level-status-top {
    grid-template-columns: 44px 1fr !important;
    gap: 5px 8px !important;
  }

  .level-current-badge-wrap {
    min-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    padding: 2px !important;
  }

  .level-current-prefix {
    font-size: 0.52rem !important;
    letter-spacing: 0.4px !important;
  }

  .level-current-num {
    font-size: 1.15rem !important;
  }

  .level-xp-sub-text {
    display: none !important;
  }

  .level-milestone-card {
    grid-template-columns: 34px 1fr !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "indicator info"
      "action    action" !important;
    padding: 7px 8px !important;
    gap: 6px 8px !important;
    border-radius: 12px !important;
    min-height: auto !important;
  }

  .card-level-indicator {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
  }

  .card-lvl-num {
    font-size: 0.88rem !important;
  }

  .card-lvl-lbl {
    font-size: 0.7rem !important;
  }

  .card-reward-title {
    font-size: 0.76rem !important;
  }

  .card-action-btn {
    width: 100% !important;
    font-size: 0.74rem !important;
    padding: 6px 10px !important;
    min-height: 28px !important;
    justify-content: center !important;
  }

  .card-status-pill {
    width: 100% !important;
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    justify-content: center !important;
  }

  .chip-coins,
  .chip-chest,
  .chip-item,
  .chip-mystery {
    font-size: 0.7rem !important;
    padding: 1.5px 5px !important;
  }
}

/* Mobile Landscape (< 520px height) */
@media (max-height: 520px) {
  #modal-level-rewards {
    padding: max(2px, env(safe-area-inset-top, 2px)) max(4px, env(safe-area-inset-right, 4px)) max(2px, env(safe-area-inset-bottom, 2px)) max(4px, env(safe-area-inset-left, 4px)) !important;
  }

  .level-rewards-modal-container {
    max-height: 100% !important;
    height: 100% !important;
    padding: 6px 10px 4px 10px !important;
    gap: 4px !important;
  }

  .level-rewards-subtitle {
    display: none !important;
  }

  .level-rewards-header {
    padding-bottom: 3px !important;
    margin-bottom: 0 !important;
    gap: 6px !important;
  }

  .level-rewards-trophy-icon {
    font-size: 1.25rem !important;
  }

  .level-rewards-title {
    font-size: 0.92rem !important;
  }

  .level-rewards-modal-container .btn-close-modal {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }

  .level-status-card {
    padding: 4px 8px !important;
    border-radius: 10px !important;
  }

  .level-status-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .level-current-badge-wrap {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .level-current-num {
    font-size: 0.95rem !important;
  }

  .level-current-label {
    display: none !important;
  }

  .level-xp-details {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    gap: 2px !important;
  }

  .level-xp-labels {
    font-size: 0.7rem !important;
  }

  .level-xp-bar-track {
    height: 6px !important;
  }

  .level-claim-all-wrap {
    width: auto !important;
  }

  .btn-claim-all-levels {
    width: auto !important;
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    min-height: 26px !important;
    border-radius: 8px !important;
  }

  .level-roadmap-track-wrap {
    padding: 4px 6px 2px 6px !important;
    border-radius: 12px !important;
    gap: 4px !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }

  .level-roadmap-nodes-container {
    gap: 5px !important;
    padding: 2px 2px 6px 2px !important;
  }

  .level-milestone-card {
    display: grid !important;
    grid-template-columns: 32px 1fr auto !important;
    grid-template-areas: "indicator info action" !important;
    padding: 4px 8px !important;
    min-height: 38px !important;
    gap: 6px 8px !important;
  }

  .card-level-indicator {
    min-width: 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 7px !important;
  }

  .card-lvl-num {
    font-size: 0.85rem !important;
  }

  .card-lvl-lbl {
    font-size: 0.7rem !important;
  }

  .card-reward-title {
    font-size: 0.74rem !important;
  }

  .card-action-btn {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    min-height: 24px !important;
  }

  .card-status-pill {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }
}

/* ==========================================================================
   KMKZ 3D CHEST OPENING & CELEBRATORY LOOT CINEMATIC (AAA QUALITY)
   ========================================================================== */

/* ==========================================================================
   KMKZ BRAWL-STYLE HEXAGON GIFT OPENING & QUALITY PROGRESSION (100DVH FIXED)
   ========================================================================== */

#modal-chest-opening {
  z-index: 1000020 !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: radial-gradient(circle at 50% 42%, rgba(15, 23, 42, 0.98) 0%, rgba(7, 11, 22, 0.99) 62%, #020617 100%) !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
}

#modal-chest-opening.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.chest-opening-scene {
  position: relative !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  font-family: 'Outfit', sans-serif !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  gap: 8px !important;
}

/* Top Bar */
.chest-scene-topbar {
  width: 100% !important;
  max-width: 720px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  z-index: 30 !important;
}

.scene-hex-brand-seal {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

.scene-brand-medallion-img {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.75)) !important;
}

.chest-stage-tag-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
  min-width: 0 !important;
  max-width: calc(100% - 110px) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

#modal-chest-opening[data-tier="rare"] .chest-stage-tag-badge {
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2) !important;
}
#modal-chest-opening[data-tier="epic"] .chest-stage-tag-badge {
  border-color: rgba(168, 85, 247, 0.65) !important;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.25) !important;
}
#modal-chest-opening[data-tier="legendary"] .chest-stage-tag-badge {
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3) !important;
}
#modal-chest-opening[data-tier="mythic"] .chest-stage-tag-badge {
  border-color: rgba(244, 63, 94, 0.8) !important;
  box-shadow: 0 4px 22px rgba(239, 68, 68, 0.38) !important;
}

.vault-tag-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  background: #94a3b8 !important;
  transition: background 0.3s ease, box-shadow 0.3s ease !important;
}

#modal-chest-opening[data-tier="rare"] .vault-tag-dot { background: #38bdf8 !important; box-shadow: 0 0 8px #38bdf8 !important; }
#modal-chest-opening[data-tier="epic"] .vault-tag-dot { background: #c084fc !important; box-shadow: 0 0 8px #c084fc !important; }
#modal-chest-opening[data-tier="legendary"] .vault-tag-dot { background: #fbbf24 !important; box-shadow: 0 0 10px #fef08a !important; }
#modal-chest-opening[data-tier="mythic"] .vault-tag-dot { background: #fb7185 !important; box-shadow: 0 0 10px #ef4444 !important; }

.chest-stage-tag {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  color: #e2e8f0 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.btn-close-chest {
  position: static !important;
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease !important;
}

.btn-close-chest:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  transform: scale(1.06) !important;
}

.btn-close-chest:focus-visible {
  outline: 2px solid #fef08a !important;
  outline-offset: 2px !important;
}

/* Header */
.chest-stage-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  z-index: 25 !important;
  position: relative !important;
}

.chest-stage-title {
  margin: 0 !important;
  font-size: clamp(1.35rem, 4.6vw, 2rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.7px !important;
  color: #ffffff !important;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85) !important;
  line-height: 1.15 !important;
}

.chest-stage-subtitle {
  margin: 0 !important;
  font-size: clamp(0.8rem, 2.8vw, 0.94rem) !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
  max-width: 380px !important;
}

.chest-stage-subtitle.hidden {
  display: none !important;
}

.hex-upgrade-callout {
  min-height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 14px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.1px !important;
  text-transform: uppercase !important;
  opacity: 0 !important;
  transform: translateY(6px) scale(0.86) !important;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none !important;
}

.hex-upgrade-callout.is-subtle {
  opacity: 0.85 !important;
  transform: translateY(0) scale(1) !important;
  background: rgba(148, 163, 184, 0.14) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.hex-upgrade-callout.is-visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1.06) !important;
}

.hex-upgrade-callout.tier-rare { background: rgba(56, 189, 248, 0.22) !important; color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, 0.7) !important; box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important; }
.hex-upgrade-callout.tier-epic { background: rgba(168, 85, 247, 0.24) !important; color: #e9d5ff !important; border: 1px solid rgba(192, 132, 252, 0.75) !important; box-shadow: 0 0 18px rgba(168, 85, 247, 0.48) !important; }
.hex-upgrade-callout.tier-legendary { background: rgba(245, 158, 11, 0.26) !important; color: #fef08a !important; border: 1px solid rgba(251, 191, 36, 0.85) !important; box-shadow: 0 0 22px rgba(245, 158, 11, 0.55) !important; }
.hex-upgrade-callout.tier-mythic { background: rgba(239, 68, 68, 0.3) !important; color: #fecdd3 !important; border: 1px solid rgba(251, 113, 133, 0.9) !important; box-shadow: 0 0 26px rgba(239, 68, 68, 0.65) !important; }

/* Ambient Lighting, Sunburst, Shockwave & Canvas */
.chest-ambient-glow {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(520px, 95vw) !important;
  height: min(520px, 95vw) !important;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.2) 0%, rgba(100, 116, 139, 0.08) 38%, transparent 72%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: background 0.35s ease !important;
}

#modal-chest-opening[data-tier="rare"] .chest-ambient-glow {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, rgba(14, 165, 233, 0.14) 40%, transparent 72%) !important;
}
#modal-chest-opening[data-tier="epic"] .chest-ambient-glow {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.34) 0%, rgba(126, 34, 206, 0.16) 42%, transparent 72%) !important;
}
#modal-chest-opening[data-tier="legendary"] .chest-ambient-glow {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.36) 0%, rgba(217, 119, 6, 0.18) 44%, transparent 74%) !important;
}
#modal-chest-opening[data-tier="mythic"] .chest-ambient-glow {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.42) 0%, rgba(239, 68, 68, 0.2) 45%, transparent 75%) !important;
}

.chest-light-beams {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 680px !important;
  height: 680px !important;
  background: conic-gradient(from 0deg,
      transparent 0deg,
      rgba(255, 255, 255, 0.04) 18deg,
      transparent 36deg,
      rgba(255, 255, 255, 0.04) 90deg,
      transparent 108deg,
      rgba(255, 255, 255, 0.04) 180deg,
      transparent 198deg,
      rgba(255, 255, 255, 0.04) 270deg,
      transparent 288deg,
      rgba(255, 255, 255, 0.04) 360deg) !important;
  pointer-events: none !important;
  z-index: 2 !important;
  border-radius: 50% !important;
  animation: spinSunburstBeams 42s linear infinite !important;
  mask-image: radial-gradient(circle, black 18%, transparent 68%) !important;
  -webkit-mask-image: radial-gradient(circle, black 18%, transparent 68%) !important;
}

#modal-chest-opening[data-tier="legendary"] .chest-light-beams {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(251, 191, 36, 0.12) 20deg, transparent 40deg, rgba(254, 240, 138, 0.1) 90deg, transparent 110deg, rgba(251, 191, 36, 0.12) 180deg, transparent 200deg, rgba(254, 240, 138, 0.1) 270deg, transparent 290deg) !important;
}
#modal-chest-opening[data-tier="mythic"] .chest-light-beams {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(244, 63, 94, 0.16) 20deg, transparent 40deg, rgba(251, 191, 36, 0.14) 90deg, transparent 110deg, rgba(244, 63, 94, 0.16) 180deg, transparent 200deg, rgba(251, 191, 36, 0.14) 270deg, transparent 290deg) !important;
}

@keyframes spinSunburstBeams {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.chest-shockwave-ring {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(0) !important;
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  border: 3px solid #fef08a !important;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.8) !important;
  pointer-events: none !important;
  z-index: 40 !important;
  opacity: 0 !important;
}

.chest-shockwave-ring.fire-shockwave {
  animation: shockwaveBoom 0.52s cubic-bezier(0.12, 0.9, 0.22, 1) forwards !important;
}

@keyframes shockwaveBoom {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; border-width: 7px; }
  65% { opacity: 0.75; border-width: 2.5px; }
  100% { transform: translate(-50%, -50%) scale(6.5); opacity: 0; border-width: 1px; }
}

.chest-burst-flash {
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45) 0%, rgba(251, 191, 36, 0.2) 45%, transparent 76%) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  z-index: 38 !important;
}

.chest-burst-flash.flash-active {
  animation: screenBurstFlash 0.36s ease-out forwards !important;
}

@keyframes screenBurstFlash {
  0% { opacity: 0; }
  22% { opacity: 1; }
  100% { opacity: 0; }
}

.chest-particles-canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 45 !important;
}

/* Central Stage */
.chest-stage-center {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 20 !important;
  padding: 4px 0 !important;
}

/* ==========================================================================
   HEXAGON GIFT WITH RIBBON (EVOLVING SHAPE & COLOR BY QUALITY TIER)
   ========================================================================== */

.hex-gift-wrapper {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  outline: none !important;
  touch-action: manipulation !important;
  gap: 10px !important;
}

.hex-gift-wrapper.hidden {
  display: none !important;
}

.hex-gift-wrapper.can-open {
  animation: hexGiftFloat 2.8s ease-in-out infinite alternate !important;
}

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

.hex-aura-halo {
  position: absolute !important;
  top: 44% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: clamp(180px, 46vw, 240px) !important;
  height: clamp(180px, 46vw, 240px) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.25) 0%, transparent 70%) !important;
  filter: blur(12px) !important;
  pointer-events: none !important;
  transition: background 0.3s ease, transform 0.3s ease !important;
}

#modal-chest-opening[data-tier="rare"] .hex-aura-halo { background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%) !important; }
#modal-chest-opening[data-tier="epic"] .hex-aura-halo { background: radial-gradient(circle, rgba(168, 85, 247, 0.52) 0%, transparent 72%) !important; transform: translate(-50%, -50%) scale(1.1) !important; }
#modal-chest-opening[data-tier="legendary"] .hex-aura-halo { background: radial-gradient(circle, rgba(251, 191, 36, 0.58) 0%, transparent 74%) !important; transform: translate(-50%, -50%) scale(1.18) !important; }
#modal-chest-opening[data-tier="mythic"] .hex-aura-halo { background: radial-gradient(circle, rgba(244, 63, 94, 0.65) 0%, transparent 75%) !important; transform: translate(-50%, -50%) scale(1.26) !important; }

.hex-orbit-ring {
  position: absolute !important;
  top: 44% !important;
  left: 50% !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity 0.35s ease !important;
}

.hex-orbit-ring.ring-outer {
  width: clamp(210px, 54vw, 270px) !important;
  height: clamp(210px, 54vw, 270px) !important;
  border: 1.5px dashed rgba(192, 132, 252, 0.5) !important;
  transform: translate(-50%, -50%) !important;
  animation: hexOrbitSpin 12s linear infinite !important;
}

.hex-orbit-ring.ring-inner {
  width: clamp(185px, 46vw, 232px) !important;
  height: clamp(185px, 46vw, 232px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  transform: translate(-50%, -50%) !important;
  animation: hexOrbitSpin 8s linear infinite reverse !important;
}

#modal-chest-opening[data-tier="epic"] .hex-orbit-ring.ring-outer { opacity: 0.75 !important; }
#modal-chest-opening[data-tier="legendary"] .hex-orbit-ring.ring-outer { opacity: 0.9 !important; border-color: rgba(251, 191, 36, 0.6) !important; }
#modal-chest-opening[data-tier="legendary"] .hex-orbit-ring.ring-inner { opacity: 0.75 !important; }
#modal-chest-opening[data-tier="mythic"] .hex-orbit-ring.ring-outer { opacity: 1 !important; border-color: rgba(251, 113, 133, 0.8) !important; }
#modal-chest-opening[data-tier="mythic"] .hex-orbit-ring.ring-inner { opacity: 0.95 !important; border-color: rgba(254, 240, 138, 0.7) !important; }

@keyframes hexOrbitSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hex-gift-stage {
  position: relative !important;
  width: clamp(190px, 52vw, 250px) !important;
  height: clamp(190px, 52vw, 250px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}

.hex-gift-svg {
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}

/* Tier Shape & Color Evolution */
.hex-crest-epic,
.hex-crest-legendary,
.hex-crest-mythic,
.hex-ribbon-diagonal,
.hex-vertex-studs,
.hex-bow-wings {
  opacity: 0 !important;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Common (Tier 0) */
.hex-shell-base {
  fill: url(#hexTierCommonBody);
  stroke: #cbd5e1;
  transition: stroke 0.28s ease;
}
.hex-inner-frame {
  stroke: rgba(226, 232, 240, 0.38);
}
.hex-ribbon-band,
.hex-bow-loop,
.hex-bow-tail,
.hex-bow-knot {
  fill: url(#hexRibbonSilver);
}
.hex-core-gem {
  fill: #94a3b8;
}

/* Rare (Tier 1) */
#modal-chest-opening[data-tier="rare"] .hex-shell-base {
  fill: url(#hexTierRareBody);
  stroke: #7dd3fc;
}
#modal-chest-opening[data-tier="rare"] .hex-inner-frame {
  stroke: rgba(186, 230, 253, 0.65);
}
#modal-chest-opening[data-tier="rare"] .hex-vertex-studs {
  opacity: 1 !important;
}
#modal-chest-opening[data-tier="rare"] .hex-core-gem {
  fill: #38bdf8;
}
#modal-chest-opening[data-tier="rare"] .hex-gift-svg {
  transform: scale(1.03) !important;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.5)) !important;
}

/* Epic (Tier 2) */
#modal-chest-opening[data-tier="epic"] .hex-shell-base {
  fill: url(#hexTierEpicBody);
  stroke: #e9d5ff;
}
#modal-chest-opening[data-tier="epic"] .hex-inner-frame {
  stroke: rgba(233, 213, 255, 0.78);
}
#modal-chest-opening[data-tier="epic"] .hex-ribbon-band,
#modal-chest-opening[data-tier="epic"] .hex-bow-loop,
#modal-chest-opening[data-tier="epic"] .hex-bow-tail,
#modal-chest-opening[data-tier="epic"] .hex-bow-knot,
#modal-chest-opening[data-tier="epic"] .hex-bow-wings {
  fill: url(#hexRibbonGold);
}
#modal-chest-opening[data-tier="epic"] .hex-crest-epic,
#modal-chest-opening[data-tier="epic"] .hex-ribbon-diagonal,
#modal-chest-opening[data-tier="epic"] .hex-vertex-studs,
#modal-chest-opening[data-tier="epic"] .hex-bow-wings {
  opacity: 1 !important;
}
#modal-chest-opening[data-tier="epic"] .hex-core-gem {
  fill: #c084fc;
}
#modal-chest-opening[data-tier="epic"] .hex-gift-svg {
  transform: scale(1.06) !important;
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.65)) !important;
}

/* Legendary (Tier 3) */
#modal-chest-opening[data-tier="legendary"] .hex-shell-base {
  fill: url(#hexTierLegendaryBody);
  stroke: #fef08a;
}
#modal-chest-opening[data-tier="legendary"] .hex-inner-frame {
  stroke: rgba(254, 249, 195, 0.88);
}
#modal-chest-opening[data-tier="legendary"] .hex-ribbon-band,
#modal-chest-opening[data-tier="legendary"] .hex-bow-loop,
#modal-chest-opening[data-tier="legendary"] .hex-bow-tail,
#modal-chest-opening[data-tier="legendary"] .hex-bow-knot,
#modal-chest-opening[data-tier="legendary"] .hex-bow-wings {
  fill: url(#hexRibbonPrism);
}
#modal-chest-opening[data-tier="legendary"] .hex-crest-legendary,
#modal-chest-opening[data-tier="legendary"] .hex-ribbon-diagonal,
#modal-chest-opening[data-tier="legendary"] .hex-vertex-studs,
#modal-chest-opening[data-tier="legendary"] .hex-bow-wings {
  opacity: 1 !important;
}
#modal-chest-opening[data-tier="legendary"] .hex-core-gem {
  fill: #fef08a;
}
#modal-chest-opening[data-tier="legendary"] .hex-gift-svg {
  transform: scale(1.1) !important;
  filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.78)) !important;
}

/* Mythic (Tier 4) */
#modal-chest-opening[data-tier="mythic"] .hex-shell-base {
  fill: url(#hexTierMythicBody);
  stroke: #fff1f2;
}
#modal-chest-opening[data-tier="mythic"] .hex-inner-frame {
  stroke: #fef08a;
}
#modal-chest-opening[data-tier="mythic"] .hex-ribbon-band,
#modal-chest-opening[data-tier="mythic"] .hex-bow-loop,
#modal-chest-opening[data-tier="mythic"] .hex-bow-tail,
#modal-chest-opening[data-tier="mythic"] .hex-bow-knot,
#modal-chest-opening[data-tier="mythic"] .hex-bow-wings {
  fill: url(#hexRibbonPrism);
}
#modal-chest-opening[data-tier="mythic"] .hex-crest-legendary,
#modal-chest-opening[data-tier="mythic"] .hex-crest-mythic,
#modal-chest-opening[data-tier="mythic"] .hex-ribbon-diagonal,
#modal-chest-opening[data-tier="mythic"] .hex-vertex-studs,
#modal-chest-opening[data-tier="mythic"] .hex-bow-wings {
  opacity: 1 !important;
}
#modal-chest-opening[data-tier="mythic"] .hex-core-gem {
  fill: #fff1f2;
}
#modal-chest-opening[data-tier="mythic"] .hex-gift-svg {
  transform: scale(1.14) !important;
  filter: drop-shadow(0 0 34px rgba(244, 63, 94, 0.85)) drop-shadow(0 0 18px rgba(251, 191, 36, 0.55)) !important;
}

/* Impact & Upgrade Animations */
.hex-gift-stage.is-tapping {
  animation: hexTapBounce 0.24s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.hex-gift-stage.is-upgrading {
  animation: hexUpgradeSurge 0.36s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hex-gift-stage.is-opened {
  animation: hexBurstExplode 0.28s ease-in forwards !important;
}

@keyframes hexTapBounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.13, 0.89) rotate(-3deg); }
  70% { transform: scale(0.95, 1.07) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes hexUpgradeSurge {
  0% { transform: scale(0.88); filter: brightness(1.1); }
  45% { transform: scale(1.22); filter: brightness(1.55); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes hexBurstExplode {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(1.28); opacity: 1; filter: brightness(2); }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Tap Pips & Prompt */
.hex-tap-prompt {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
}

.hex-tap-prompt.hidden {
  display: none !important;
}

.hex-tap-pips {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.tap-pip {
  width: 12px !important;
  height: 12px !important;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  transition: transform 0.22s ease, background 0.22s ease !important;
}

.tap-pip.is-filled {
  background: #fef08a !important;
  transform: scale(1.18) !important;
}

.tap-text {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  color: #fde68a !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85) !important;
}

/* ==========================================================================
   BOTTOM BAR: 5-TIER QUALITY PROGRESS BAR & PINNED CLAIM CTA
   ========================================================================== */

.chest-scene-bottombar {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 560px !important;
  margin: 0 auto !important;
  z-index: 30 !important;
}

.loot-quality-bar {
  position: relative !important;
  background: rgba(15, 23, 42, 0.86) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  padding: 12px 12px 10px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
}

.loot-quality-bar.hidden {
  display: none !important;
}

.quality-track-bg {
  position: relative !important;
  height: 6px !important;
  margin: 0 20px 10px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
}

.quality-track-fill {
  height: 100% !important;
  width: 0% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #94a3b8 0%, #38bdf8 30%, #a855f7 60%, #f59e0b 82%, #ef4444 100%) !important;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.quality-nodes {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

.quality-node {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  opacity: 0.42 !important;
  transition: opacity 0.24s ease, transform 0.24s ease !important;
}

.quality-node.is-reached {
  opacity: 0.85 !important;
}

.quality-node.is-active {
  opacity: 1 !important;
  transform: translateY(-2px) scale(1.06) !important;
}

.quality-node.just-upgraded {
  animation: qualityNodePop 0.36s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes qualityNodePop {
  0% { transform: scale(1); }
  50% { transform: translateY(-5px) scale(1.22); }
  100% { transform: translateY(-2px) scale(1.06); }
}

.q-hex-dot {
  width: 18px !important;
  height: 20px !important;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  background: #64748b !important;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

.quality-node[data-tier="common"] .q-hex-dot { background: #94a3b8 !important; }
.quality-node[data-tier="rare"] .q-hex-dot { background: #38bdf8 !important; }
.quality-node[data-tier="epic"] .q-hex-dot { background: #a855f7 !important; }
.quality-node[data-tier="legendary"] .q-hex-dot { background: #f59e0b !important; }
.quality-node[data-tier="mythic"] .q-hex-dot { background: #ef4444 !important; }

.q-label {
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  color: #cbd5e1 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.quality-node.is-active[data-tier="rare"] .q-label { color: #7dd3fc !important; }
.quality-node.is-active[data-tier="epic"] .q-label { color: #e9d5ff !important; }
.quality-node.is-active[data-tier="legendary"] .q-label { color: #fef08a !important; }
.quality-node.is-active[data-tier="mythic"] .q-label { color: #fecdd3 !important; }

.chest-claim-footer.hidden {
  display: none !important;
}

/* ==========================================================================
   CENTERED REWARD PANEL (ZERO OVERLAP, ZERO CLIPPING ON MOBILE & DESKTOP)
   ========================================================================== */

.chest-lateral-flyout.chest-reward-panel {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 440px !important;
  max-height: 100% !important;
  background: linear-gradient(165deg, rgba(17, 24, 39, 0.96) 0%, rgba(9, 13, 24, 0.98) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.55) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 32px rgba(245, 158, 11, 0.2) !important;
  z-index: 30 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#modal-chest-opening[data-tier="common"] .chest-reward-panel { border-color: rgba(148, 163, 184, 0.55) !important; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 24px rgba(148, 163, 184, 0.16) !important; }
#modal-chest-opening[data-tier="rare"] .chest-reward-panel { border-color: rgba(56, 189, 248, 0.65) !important; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 28px rgba(56, 189, 248, 0.25) !important; }
#modal-chest-opening[data-tier="epic"] .chest-reward-panel { border-color: rgba(168, 85, 247, 0.7) !important; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 32px rgba(168, 85, 247, 0.28) !important; }
#modal-chest-opening[data-tier="mythic"] .chest-reward-panel { border-color: rgba(244, 63, 94, 0.8) !important; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.85), 0 0 36px rgba(239, 68, 68, 0.34) !important; }

.chest-lateral-flyout.hidden {
  display: none !important;
}

.chest-lateral-flyout.flyout-slide-in {
  animation: rewardPanelPopIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes rewardPanelPopIn {
  0% { opacity: 0; transform: translateY(18px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.flyout-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
}

.flyout-badge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.flyout-badge-loot {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  letter-spacing: 0.9px !important;
  text-transform: uppercase !important;
}

.flyout-rarity-chip {
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
}

.flyout-rarity-chip.rarity-common { background: rgba(148, 163, 184, 0.2) !important; color: #e2e8f0 !important; border: 1px solid rgba(148, 163, 184, 0.45) !important; }
.flyout-rarity-chip.rarity-rare { background: rgba(56, 189, 248, 0.2) !important; color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, 0.5) !important; }
.flyout-rarity-chip.rarity-epic { background: rgba(168, 85, 247, 0.22) !important; color: #e9d5ff !important; border: 1px solid rgba(168, 85, 247, 0.55) !important; }
.flyout-rarity-chip.rarity-legendary { background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(220, 38, 38, 0.22) 100%) !important; color: #fef08a !important; border: 1px solid rgba(251, 191, 36, 0.65) !important; }
.flyout-rarity-chip.rarity-mythic { background: linear-gradient(135deg, rgba(239, 68, 68, 0.32) 0%, rgba(185, 28, 28, 0.32) 100%) !important; color: #fecdd3 !important; border: 1px solid rgba(244, 63, 94, 0.75) !important; }

.flyout-title {
  margin: 2px 0 0 !important;
  font-size: clamp(1.15rem, 4vw, 1.38rem) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

.flyout-subtitle {
  margin: 0 !important;
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
}

.flyout-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch !important;
}

.flyout-item-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

.flyout-item-card.hidden {
  display: none !important;
}

.flyout-item-card.card-coins { border-color: rgba(251, 191, 36, 0.5) !important; background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(15, 23, 42, 0.65) 100%) !important; }
.flyout-item-card.card-chest { border-color: rgba(245, 158, 11, 0.5) !important; background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(15, 23, 42, 0.65) 100%) !important; }
.flyout-item-card.card-title-reward { border-color: rgba(192, 132, 252, 0.5) !important; background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(15, 23, 42, 0.65) 100%) !important; }
.flyout-item-card.card-cosmetic { border-color: rgba(168, 85, 247, 0.5) !important; background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(15, 23, 42, 0.65) 100%) !important; }
.flyout-item-card.card-milestone { border-color: rgba(251, 191, 36, 0.55) !important; background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(15, 23, 42, 0.7) 100%) !important; }
.flyout-item-card.card-extra { border-color: rgba(56, 189, 248, 0.5) !important; background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(15, 23, 42, 0.65) 100%) !important; }

.flyout-item-icon-box {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0 !important;
}

.flyout-item-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.flyout-item-category {
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.7px !important;
}

.flyout-item-category-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.flyout-cosmetic-rarity-pill {
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  border-radius: 5px !important;
  background: rgba(168, 85, 247, 0.25) !important;
  color: #e9d5ff !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  text-transform: uppercase !important;
}

.flyout-item-headline {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.flyout-item-sub {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
}

.btn-flyout-confirm {
  width: 100% !important;
  min-height: 48px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #dc2626 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.9rem !important;
  letter-spacing: 1px !important;
  border: 1px solid rgba(254, 240, 138, 0.5) !important;
  border-radius: 14px !important;
  padding: 13px 18px !important;
  cursor: pointer !important;
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.4) !important;
  transition: transform 0.18s ease, filter 0.18s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: uppercase !important;
}

.btn-flyout-confirm:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.08) !important;
}

.btn-flyout-confirm:focus-visible {
  outline: 2px solid #fef08a !important;
  outline-offset: 2px !important;
}

@media (max-height: 660px) {
  .hex-gift-stage {
    width: clamp(150px, 42vw, 190px) !important;
    height: clamp(150px, 42vw, 190px) !important;
  }
  .chest-lateral-flyout.chest-reward-panel {
    padding: 14px !important;
    gap: 8px !important;
  }
  .flyout-item-card {
    padding: 8px 11px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hex-gift-wrapper.can-open,
  .chest-light-beams,
  .hex-orbit-ring {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KMKZ GLOBAL LIVE ANNOUNCEMENT BANNER (LUXURY CYBER-GLASS)
   ═══════════════════════════════════════════════════════════════════ */

.global-announcement-banner {
  position: fixed !important;
  top: 14px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 32px) !important;
  max-width: 720px !important;
  z-index: 100050 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
  animation: kmkzAnnouncementSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
}

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

.global-announcement-banner.closing {
  opacity: 0 !important;
  transform: translate(-50%, -20px) scale(0.96) !important;
}

.global-announcement-inner {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px !important;
  border-radius: 14px !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  background: rgba(15, 23, 42, 0.94) !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-sizing: border-box !important;
}

/* Variant: Info (Cyan) */
.global-announcement-banner.announcement-info .global-announcement-inner {
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.25) !important;
}

.global-announcement-banner.announcement-info .global-announcement-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

/* Variant: Warning (Amber / Maintenance) */
.global-announcement-banner.announcement-warning .global-announcement-inner {
  border-color: rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 28px rgba(245, 158, 11, 0.3) !important;
}

.global-announcement-banner.announcement-warning .global-announcement-badge {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}

/* Variant: Celebration (Gold / Event) */
.global-announcement-banner.announcement-celebration .global-announcement-inner {
  border-color: rgba(234, 179, 8, 0.6) !important;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75), 0 0 32px rgba(234, 179, 8, 0.35) !important;
}

.global-announcement-banner.announcement-celebration .global-announcement-badge {
  background: rgba(234, 179, 8, 0.2) !important;
  border: 1px solid rgba(234, 179, 8, 0.5) !important;
  color: #fef08a !important;
}

.global-announcement-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.global-announcement-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
}

.global-announcement-body {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.global-announcement-title {
  color: #f8fafc !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.global-announcement-msg {
  color: #cbd5e1 !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  word-break: break-word !important;
}

.global-announcement-close {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  flex-shrink: 0 !important;
  outline: none !important;
}

.global-announcement-close:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  transform: scale(1.1) !important;
}

@keyframes kmkzAnnouncementSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@media (max-width: 640px) {
  .global-announcement-banner {
    top: 8px !important;
    width: calc(100% - 16px) !important;
  }

  .global-announcement-inner {
    padding: 8px 12px !important;
    gap: 8px !important;
  }

  .global-announcement-badge {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
  }

  .global-announcement-title {
    font-size: 0.82rem !important;
  }

  .global-announcement-msg {
    font-size: 0.76rem !important;
    -webkit-line-clamp: 2 !important;
  }

  .global-announcement-close {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.8rem !important;
  }
}

/* ==========================================================================
   KMKZ IN-GAME EMOJIS & CHAT SYSTEM
   Accessible, modern glassmorphism UI for emotes and quick chat
   ========================================================================== */

/* SR-Only utility for accessibility / screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 1. In-Game Emoji Popover (Floating, Glassmorphism, Dock-Anchored) */
.in-game-emoji-popover {
  --popover-x: 0px;
  position: fixed;
  bottom: calc(var(--bottom-dock-height, 68px) + 12px);
  right: 18px;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: rgba(13, 20, 37, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 18px;
  box-shadow: 0 18px 45px -8px rgba(0, 0, 0, 0.82),
    0 0 24px rgba(56, 189, 248, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(var(--popover-x, 0px), 0, 0);
  animation: emojiPopoverIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.in-game-emoji-popover.hidden {
  display: none !important;
}

.in-game-emoji-popover.popover-closing {
  opacity: 0 !important;
  transform: translate3d(var(--popover-x, 0px), 10px, 0) scale(0.96) !important;
  transition: opacity 0.18s cubic-bezier(0.4, 0, 1, 1), transform 0.18s cubic-bezier(0.4, 0, 1, 1) !important;
  pointer-events: none !important;
}

@keyframes emojiPopoverIn {
  0% {
    opacity: 0;
    transform: translate3d(var(--popover-x, 0px), 14px, 0) scale(0.95);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate3d(var(--popover-x, 0px), 0, 0) scale(1);
  }
}

.in-game-emoji-popover:not(.hidden) .emoji-category-section {
  animation: emojiCategoryIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.in-game-emoji-popover:not(.hidden) .emoji-category-section:nth-child(1) {
  animation-delay: 0.03s;
}

.in-game-emoji-popover:not(.hidden) .emoji-category-section:nth-child(2) {
  animation-delay: 0.06s;
}

.in-game-emoji-popover:not(.hidden) .emoji-category-section:nth-child(3) {
  animation-delay: 0.09s;
}

@keyframes emojiCategoryIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.emoji-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emoji-popover-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f8fafc;
  display: flex;
  align-items: center;
  text-transform: uppercase;
}

.btn-close-popover {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #94a3b8;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  line-height: 1;
  padding: 0;
}

.btn-close-popover:hover {
  background: rgba(239, 68, 68, 0.88);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.08);
}

/* Cooldown Bar */
.emoji-popover-cooldown-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.emoji-popover-cooldown-bar.hidden {
  display: none !important;
}

.emoji-popover-cooldown-bar .cooldown-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #fbbf24);
}

/* Body & Categories */
.emoji-popover-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
}

.emoji-popover-body::-webkit-scrollbar {
  width: 5px;
}

.emoji-popover-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.emoji-category-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emoji-category-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding-left: 2px;
}

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

.emoji-grid-btn {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(30, 41, 59, 0.65);
  border-radius: 11px;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  padding: 0;
  line-height: 1;
}

.emoji-grid-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.55);
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
  z-index: 2;
}

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

.emoji-grid-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

/* 2. Chat Quick Emojis Strip */
.chat-quick-emojis-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.chat-quick-emojis-bar::-webkit-scrollbar {
  display: none;
}

.btn-quick-emoji {
  flex-shrink: 0;
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(30, 41, 59, 0.55);
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  padding: 0;
  line-height: 1;
}

.btn-quick-emoji:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.55);
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

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

.btn-quick-emoji:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}

/* 3. Floating Player Reaction Emote Bubbles (Always Fixed Over Canvas & Entire Screen) */
.player-floating-emote {
  position: fixed !important;
  z-index: 100050 !important;
  pointer-events: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  will-change: transform, opacity;
  animation: emoteFloatOnCanvas 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.player-floating-emote.fallback-centered {
  left: 50% !important;
  top: 40% !important;
}

.emote-bubble-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--player-accent, #38bdf8) 0%, transparent 72%);
  opacity: 0.85;
  filter: blur(14px);
  z-index: 1;
}

.emote-bubble-inner {
  position: relative;
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 16px var(--player-accent, rgba(56, 189, 248, 0.7)));
  z-index: 2;
  user-select: none;
  padding: 4px;
}

.emote-bubble-sender {
  position: relative;
  z-index: 3;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 2px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
}

@keyframes emoteFloatOnCanvas {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.35);
  }

  14% {
    opacity: 1;
    transform: translate(-50%, 16px) scale(1.3);
  }

  28% {
    opacity: 1;
    transform: translate(-50%, 28px) scale(1.05);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, 54px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 82px) scale(0.8);
  }
}

/* 4. Responsive Mobile Overrides */
@media (max-width: 640px) {
  .in-game-emoji-popover {
    --popover-x: -50%;
    bottom: calc(var(--bottom-dock-height, 68px) + 8px);
    left: 50%;
    right: auto;
    transform: translate3d(-50%, 0, 0);
    transform-origin: bottom center;
    width: calc(100vw - 20px);
    max-width: 350px;
    max-height: 52vh;
  }

  .emoji-popover-body {
    max-height: calc(52vh - 54px);
    padding: 10px;
    gap: 10px;
  }

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

  .emoji-grid-btn {
    font-size: 1.25rem;
  }

  .btn-quick-emoji {
    width: 29px;
    height: 29px;
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   KMKZ LOBBY ROOM START & LEAVE CONTROLS (BALANCED & RESPONSIVE - NON-STICKY)
   ========================================================================== */
.lobby-start-controls {
  position: static !important;
  bottom: auto !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: 18px auto 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#btn-leave-room-bottom {
  flex: 0 0 52px !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  min-height: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: manipulation !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(153, 27, 27, 0.28) 50%, rgba(220, 38, 38, 0.16) 100%) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.42) !important;
  color: #fca5a5 !important;
  box-shadow: 0 4px 18px -4px rgba(239, 68, 68, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease, background 0.22s ease !important;
}

#btn-leave-room-bottom:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28) 0%, rgba(185, 28, 28, 0.42) 50%, rgba(239, 68, 68, 0.28) 100%) !important;
  border-color: rgba(248, 113, 113, 0.85) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.38), 0 0 14px rgba(239, 68, 68, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

#btn-leave-room-bottom:active:not(:disabled) {
  transform: translateY(1px) scale(0.96) !important;
  box-shadow: 0 2px 10px -2px rgba(239, 68, 68, 0.3) !important;
}

#btn-leave-room-bottom .btn-leave-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#btn-lobby-start-game {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: manipulation !important;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(6, 95, 70, 0.42) 50%, rgba(5, 150, 105, 0.26) 100%) !important;
  border: 1.5px solid rgba(52, 211, 153, 0.55) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px -3px rgba(16, 185, 129, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

#btn-lobby-start-game:not(:disabled) {
  animation: kmkzStartBtnPulse 3s ease-in-out infinite alternate;
}

@keyframes kmkzStartBtnPulse {
  0% {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 4px 18px -3px rgba(16, 185, 129, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  }

  100% {
    border-color: rgba(110, 231, 183, 0.85);
    box-shadow: 0 6px 26px -2px rgba(16, 185, 129, 0.55), 0 0 16px rgba(52, 211, 153, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  }
}

#btn-lobby-start-game:hover:not(:disabled):not(.holding) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32) 0%, rgba(6, 95, 70, 0.55) 50%, rgba(5, 150, 105, 0.38) 100%) !important;
  transform: translateY(-2px) !important;
  border-color: #6ee7b7 !important;
}

/* Barra de Carga Dinámica (Fill 1.2s) */
#btn-lobby-start-game .btn-hold-fill {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  width: 0%;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(90deg, #059669 0%, #10b981 55%, #34d399 100%) !important;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.25) !important;
  border-radius: 12px !important;
}

#btn-lobby-start-game .btn-hold-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 100%);
  box-shadow: 0 0 18px 4px #a7f3d0, 0 0 8px 2px #34d399;
  filter: blur(0.5px);
}

/* Contenido Interno */
#btn-lobby-start-game .btn-hold-content {
  position: relative !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  white-space: nowrap !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

#btn-lobby-start-game .btn-action-icon,
#btn-lobby-start-game .ui-svg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.6));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#btn-lobby-start-game .btn-hold-title {
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  color: #ffffff !important;
}

#btn-lobby-start-game .btn-hold-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px 8px !important;
  background: rgba(0, 0, 0, 0.38) !important;
  border: 1px solid rgba(110, 231, 183, 0.45) !important;
  border-radius: 999px !important;
  font-family: 'Outfit', monospace, sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #a7f3d0 !important;
  letter-spacing: 0.3px !important;
  backdrop-filter: blur(4px) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Estado de Presionado Activo (Holding - 1.2s) */
#btn-lobby-start-game.holding {
  animation: kmkzHoldChargingVibe 0.12s linear infinite !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.7), inset 0 0 20px rgba(52, 211, 153, 0.4) !important;
}

#btn-lobby-start-game.holding .btn-action-icon,
#btn-lobby-start-game.holding .ui-svg-icon {
  transform: scale(1.18) rotate(4deg) !important;
}

#btn-lobby-start-game.holding .btn-hold-badge {
  background: rgba(16, 185, 129, 0.3) !important;
  border-color: #6ee7b7 !important;
  color: #ffffff !important;
}

@keyframes kmkzHoldChargingVibe {
  0% {
    transform: scale(0.975) translate(0, 0);
  }

  25% {
    transform: scale(0.975) translate(-0.6px, 0.6px);
  }

  50% {
    transform: scale(0.975) translate(0.6px, -0.6px);
  }

  75% {
    transform: scale(0.975) translate(-0.6px, -0.6px);
  }

  100% {
    transform: scale(0.975) translate(0, 0);
  }
}

/* Estado de Éxito al completar los 1.2s */
#btn-lobby-start-game.hold-success {
  animation: kmkzHoldSuccessBurst 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
}

@keyframes kmkzHoldSuccessBurst {
  0% {
    transform: scale(0.98);
    filter: brightness(1.7);
    box-shadow: 0 0 50px #34d399, inset 0 0 30px #ffffff;
  }

  40% {
    transform: scale(1.04);
    filter: brightness(1.4);
    box-shadow: 0 0 65px #10b981, 0 0 25px #a7f3d0;
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 4px 20px -3px rgba(16, 185, 129, 0.35);
  }
}

/* Estado Deshabilitado */
#btn-lobby-start-game:disabled,
#btn-lobby-start-game[disabled] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  animation: none !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  filter: grayscale(35%) !important;
}

#btn-lobby-start-game.hidden,
#btn-lobby-start-game[hidden],
#btn-lobby-start-game.guest-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lobby-guest-waiting-badge {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.92) 100%) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  user-select: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  animation: guestWaitingPulse 2.5s ease-in-out infinite alternate !important;
}

@keyframes guestWaitingPulse {
  0% {
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  }
  100% {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
  }
}

.lobby-guest-waiting-badge .guest-waiting-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  flex-shrink: 0;
}

.lobby-guest-waiting-badge .guest-waiting-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
}

.lobby-guest-waiting-badge.hidden,
.lobby-guest-waiting-badge[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 480px) {
  .lobby-start-controls {
    gap: 8px !important;
    margin-top: 14px !important;
  }

  #btn-leave-room-bottom {
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  #btn-lobby-start-game {
    flex: 1 1 auto !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
  }

  #btn-lobby-start-game .btn-hold-content {
    gap: 6px !important;
    white-space: nowrap !important;
  }

  #btn-lobby-start-game .btn-action-icon,
  #btn-lobby-start-game .ui-svg-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 0 !important;
  }

  #btn-lobby-start-game .btn-action-icon svg,
  #btn-lobby-start-game .ui-svg-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  #btn-lobby-start-game .btn-hold-title {
    font-size: 0.85rem !important;
    letter-spacing: 0.02em !important;
  }

  #btn-lobby-start-game .btn-hold-badge {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
  }
}

@media (max-width: 360px) {
  .lobby-start-controls {
    gap: 6px !important;
    margin-top: 12px !important;
  }

  #btn-leave-room-bottom {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 10px !important;
  }

  #btn-leave-room-bottom svg {
    width: 18px !important;
    height: 18px !important;
  }

  #btn-lobby-start-game {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 10px !important;
    padding: 0 6px !important;
  }

  #btn-lobby-start-game .btn-hold-title {
    font-size: 0.76rem !important;
  }

  #btn-lobby-start-game .btn-hold-badge {
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
  }
}

/* ==========================================================================
   KMKZ CHAT INTERACTIVO FLOTANTE - BURBUJA Y GLOBOS ESTILO CÓMIC
   ========================================================================== */

/* Burbuja Flotante Arrastrable */
.chat-floating-bubble {
  position: fixed;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 25px -4px rgba(6, 182, 212, 0.5), 0 0 15px rgba(99, 102, 241, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 9999;
  user-select: none;
  touch-action: none;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chat-floating-bubble:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px -3px rgba(6, 182, 212, 0.65), 0 0 22px rgba(99, 102, 241, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.5);
}

.chat-floating-bubble:active,
.chat-floating-bubble.dragging {
  cursor: grabbing !important;
  transform: scale(0.96) !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4) !important;
}

.chat-bubble-inner-btn {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: inherit;
  outline: none;
  padding: 0;
  position: relative;
}

.chat-bubble-icon {
  width: 26px;
  height: 26px;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
  pointer-events: none;
}

.chat-floating-bubble:hover .chat-bubble-icon {
  transform: rotate(-8deg) scale(1.1);
}

/* Badge de mensajes no leídos en la burbuja */
.chat-bubble-badge,
.chat-bubble-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.5);
  animation: bubbleBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 10;
}

.chat-bubble-unread-badge.badge-pulse {
  animation: bubbleBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), bubblePulseAttention 1.2s infinite ease-in-out;
}

@keyframes bubblePulseAttention {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
    filter: brightness(1.2);
  }
}

@keyframes bubbleBadgePop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

/* Animación de entrada y salida de la burbuja */
.chat-floating-bubble.bubble-pop-appear {
  animation: bubbleAppearSpring 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bubbleAppearSpring {
  0% {
    transform: scale(0.2) rotate(-30deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.15) rotate(5deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.chat-floating-bubble.bubble-pop-disappear {
  animation: bubbleDisappearShrink 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes bubbleDisappearShrink {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.2);
    opacity: 0;
  }
}

.chat-floating-bubble.bubble-bounce {
  animation: bubbleGentleBounce 0.45s ease-in-out;
}

@keyframes bubbleGentleBounce {

  0%,
  100% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.2) translateY(-4px);
  }

  60% {
    transform: scale(0.95) translateY(2px);
  }
}

.chat-floating-bubble.bubble-animating {
  transition: left 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), right 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Animación de pulso cuando llega un mensaje nuevo mientras la burbuja está activa */
.chat-floating-bubble.bubble-pulse {
  animation: bubblePulseWave 1.4s infinite ease-in-out;
}

@keyframes bubblePulseWave {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7), 0 8px 25px -4px rgba(6, 182, 212, 0.5);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(6, 182, 212, 0), 0 8px 25px -4px rgba(6, 182, 212, 0.5);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0), 0 8px 25px -4px rgba(6, 182, 212, 0.5);
  }
}

/* Bocadillo Emergente de Cómic (Preview Flotante) */
.chat-bubble-preview {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 8px 12px;
  min-width: 170px;
  max-width: 250px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chat-bubble-preview:not(.hidden) {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-bubble-preview.preview-fade-out {
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.chat-bubble-preview-sender,
.bubble-preview-author {
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.chat-bubble-preview-text,
.bubble-preview-text {
  font-size: 0.8rem;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Colita de bocadillo de cómic para el preview */
.chat-bubble-preview-tail,
.bubble-preview-tail {
  position: absolute;
  bottom: -7px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgba(15, 23, 42, 0.94);
  border-right: 1.5px solid rgba(56, 189, 248, 0.4);
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.4);
  transform: rotate(45deg);
}

/* Ventana de Chat: Botones de Cabecera */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-btn-minimize,
.chat-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.chat-btn-minimize:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.chat-btn-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* Globos de Chat Estilo Orgánico & Glassmorphism Accesible */
.chat-speech-bubble-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
  animation: speechBubbleFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  width: 100%;
}

@keyframes speechBubbleFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-speech-bubble-item.speech-from-me {
  flex-direction: row-reverse;
}

.speech-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid var(--bubble-color, rgba(56, 189, 248, 0.6));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 10px rgba(56, 189, 248, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}

.speech-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.speech-avatar-fallback {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--bubble-color, #38bdf8);
}

.speech-bubble-body {
  position: relative;
  max-width: min(84%, 310px);
  padding: 9px 13px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Globo propio: derecha, curvatura orgánica asimétrica */
.speech-from-me .speech-bubble-body {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.94) 0%, rgba(30, 64, 175, 0.96) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  border-radius: 18px 18px 4px 18px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.speech-from-me .speech-bubble-body::after {
  display: none !important;
}

/* Globo ajeno: izquierda, fondo slate con glassmorphism orgánico */
.speech-from-other .speech-bubble-body {
  background: linear-gradient(135deg, rgba(24, 33, 52, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 18px 18px 18px 4px !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.speech-from-other .speech-bubble-body::after {
  display: none !important;
}

/* Mención especial */
.chat-speech-bubble-item.speech-mentioned .speech-bubble-body {
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.94) 0%, rgba(120, 53, 15, 0.88) 100%) !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

.speech-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.speech-author {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.speech-badge-mention {
  background: #fbbf24;
  color: #78350f;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 5px;
  display: inline-block;
  vertical-align: middle;
}

.speech-time {
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.68rem;
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.speech-from-me .speech-time {
  color: rgba(255, 255, 255, 0.8);
}

.speech-bubble-text {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: #f8fafc;
  word-break: break-word;
}

/* Estado Vacío Orgánico del Chat */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 18px;
  gap: 8px;
  color: #94a3b8;
  height: 100%;
}

.chat-empty-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.chat-empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  color: #f1f5f9;
}

.chat-empty-subtitle {
  font-size: 0.76rem;
  color: #94a3b8;
  max-width: 260px;
  line-height: 1.38;
  margin: 0;
}

/* Barra de Entrada de Chat */
.chat-input-container {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: rgba(12, 18, 32, 0.95) !important;
  flex-shrink: 0 !important;
}

.chat-input-wrapper {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

#chat-input-text {
  width: 100% !important;
  background: rgba(18, 26, 44, 0.90) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  padding: 8px 52px 8px 14px !important;
  font-size: 0.88rem !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}

#chat-input-text:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

.chat-char-counter {
  position: absolute;
  right: 12px;
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.65);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.chat-char-counter.near-limit {
  color: #fbbf24;
  font-weight: 700;
}

.btn-chat-send {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 18px !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em !important;
  padding: 8px 14px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease !important;
  flex-shrink: 0 !important;
}

.btn-chat-send:hover {
  filter: brightness(1.12) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-chat-send:active {
  transform: scale(0.96) translateY(0) !important;
}

@media (max-width: 600px) {
  .chat-floating-bubble {
    width: 48px;
    height: 48px;
  }

  .chat-bubble-icon {
    width: 22px;
    height: 22px;
  }

  .speech-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.75rem;
  }

  .speech-bubble-body {
    max-width: calc(100% - 38px);
    font-size: 0.84rem;
    padding: 8px 11px;
  }
}

/* ==========================================================================
   KMKZ ROOM LOBBY — MOBILE ERGONOMICS & VIEW-PANEL-PLAYERS
   ========================================================================== */

/* Room View Switcher & Tabs */
.room-view-switcher {
  display: flex !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
}

.room-view-tab {
  flex: 1 !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}

/* Players Grid on Mobile */
@media (max-width: 540px) {

  #view-panel-players .players-lobby-grid,
  .players-lobby-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 8px !important;
    margin: 8px 0 !important;
  }

  .lobby-player-item {
    padding: 8px 10px !important;
  }
}

@media (max-width: 380px) {

  #view-panel-players .players-lobby-grid,
  .players-lobby-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

/* Config Players Count Group — Mobile Row (Discreet & Compact) */
@media (max-width: 540px) {
  #config-players-count-wrapper.config-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 4px 0 !important;
    padding: 3px 8px !important;
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }

  #config-players-count-wrapper label {
    flex: 0 0 auto !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  #config-players-count-wrapper label .ui-svg-icon svg {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.75 !important;
  }

  #config-players-count {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 120px !important;
    min-height: 28px !important;
    height: 28px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: #cbd5e1 !important;
    background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    box-shadow: none !important;
  }
}

/* Bot Management Card — Mobile (Ultra-Compact) */
@media (max-width: 540px) {
  .lobby-bot-management-card {
    padding: 4px 8px !important;
    margin-top: 4px !important;
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 6px !important;
    row-gap: 3px !important;
    align-items: center !important;
  }

  .bot-diff-header {
    grid-column: 1 / -1 !important;
    margin-bottom: 0 !important;
  }

  .bot-diff-selector {
    grid-column: 1 !important;
    gap: 3px !important;
    margin-bottom: 0 !important;
  }

  .bot-diff-pill-btn {
    min-height: 26px !important;
    height: 26px !important;
    padding: 1px 3px !important;
    font-size: 0.70rem !important;
    border-radius: 6px !important;
    gap: 3px !important;
  }

  .bot-actions-row {
    grid-column: 2 !important;
    width: auto !important;
    margin: 0 !important;
  }

  .btn-lobby-bot-action {
    min-height: 26px !important;
    height: 26px !important;
    width: auto !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    padding: 0 8px !important;
  }
}

@media (max-width: 380px) {
  .bot-diff-pill-btn {
    font-size: 0.7rem !important;
    min-height: 25px !important;
    height: 25px !important;
    padding: 1px 2px !important;
  }

  .btn-lobby-bot-action {
    min-height: 25px !important;
    height: 25px !important;
    padding: 0 6px !important;
    font-size: 0.70rem !important;
  }
}

/* Online Friends Invite Section */
.lobby-online-friends-invite {
  margin-top: 8px !important;
  margin-bottom: 4px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-top: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#lobby-online-friends-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  max-height: 165px !important;
  overflow-y: auto !important;
  padding-right: 2px !important;
  scrollbar-width: thin !important;
}

.lobby-online-friend-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 4px 8px !important;
  min-height: 32px !important;
  height: 32px !important;
  background: linear-gradient(90deg, rgba(20, 29, 50, 0.55) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.lobby-online-friend-item:hover {
  background: linear-gradient(90deg, rgba(28, 42, 70, 0.78) 0%, rgba(18, 28, 48, 0.9) 100%) !important;
  border-color: rgba(56, 189, 248, 0.38) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(56, 189, 248, 0.06) !important;
  transform: translateX(2px) !important;
}

.lobby-online-friend-info {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.lobby-online-friend-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  flex-shrink: 0 !important;
}

.lobby-online-friend-name {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 140px !important;
}

.btn-lobby-friend-invite {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 2px 9px !important;
  min-height: 24px !important;
  height: 24px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  font-family: 'Outfit', sans-serif !important;
  letter-spacing: 0.3px !important;
  border-radius: 6px !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.38) !important;
  color: #38bdf8 !important;
  cursor: pointer !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-lobby-friend-invite:hover:not(:disabled) {
  background: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.02) !important;
}

.btn-lobby-friend-invite:disabled {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
  box-shadow: none !important;
  transform: none !important;
}

@media (max-width: 540px) {
  .lobby-online-friends-invite {
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  #lobby-online-friends-list {
    max-height: 140px !important;
  }

  .btn-lobby-friend-invite {
    min-height: 24px !important;
    padding: 2px 8px !important;
  }
}

@media (max-width: 380px) {
  #lobby-online-friends-list {
    max-height: 120px !important;
  }

  .lobby-online-friend-item {
    padding: 3px 6px !important;
  }

  .lobby-online-friend-name {
    font-size: 0.74rem !important;
    max-width: 100px !important;
  }

  .btn-lobby-friend-invite {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    min-height: 22px !important;
    height: 22px !important;
  }
}

/* ==========================================================================
   ⬡ IN-GAME HUD FAN (ABANICO SUPERIOR)
   ========================================================================== */

/* Overlay de oscurecimiento al abrir el abanico */
#hud-fan-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(3, 7, 18, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 9980 !important;
}

#hud-fan-overlay.fan-active {
  opacity: 0.7 !important;
  pointer-events: auto !important;
}

/* Wrapper contenedor del trigger y los botones del abanico */
.hud-fan-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0 !important;
  z-index: 9999 !important;
}

/* Botón Trigger del abanico */
.btn-fan-trigger {
  position: relative !important;
  z-index: 10000 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92)) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(56, 189, 248, 0.18) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-fan-trigger:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-2px) scale(1.06) !important;
}

.btn-fan-trigger.fan-open {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(15, 23, 42, 0.98)) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.55), 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

.btn-fan-trigger .hud-nav-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-fan-trigger.fan-open .hud-nav-icon {
  transform: rotate(90deg) scale(1.1) !important;
}

/* Contenedor absoluto de los botones del abanico */
.hud-fan-container,
#hud-fan-container {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  pointer-events: none !important;
  z-index: 9995 !important;
  overflow: visible !important;
}

/* Definición de tema y color único para cada botón hexagonal */
#hud-fan-container #btn-toggle-top-hud {
  --btn-hex-color: #00f0ff;
  --btn-hex-border: linear-gradient(135deg, #00f0ff, #0284c7);
  --btn-hex-face: linear-gradient(145deg, rgba(6, 40, 60, 0.95), rgba(8, 20, 36, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(8, 60, 90, 0.97), rgba(8, 26, 48, 0.98));
  --btn-hex-glow: rgba(0, 240, 255, 0.65);
  --btn-hex-glow-strong: rgba(0, 240, 255, 0.95);
}

#hud-fan-container #btn-toggle-bank-hud {
  --btn-hex-color: #fbbf24;
  --btn-hex-border: linear-gradient(135deg, #fbbf24, #d97706);
  --btn-hex-face: linear-gradient(145deg, rgba(55, 38, 8, 0.95), rgba(25, 18, 6, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(80, 56, 12, 0.97), rgba(35, 24, 8, 0.98));
  --btn-hex-glow: rgba(251, 191, 36, 0.65);
  --btn-hex-glow-strong: rgba(251, 191, 36, 0.95);
}

#hud-fan-container #dock-toggle-chat {
  --btn-hex-color: #10b981;
  --btn-hex-border: linear-gradient(135deg, #10b981, #059669);
  --btn-hex-face: linear-gradient(145deg, rgba(6, 46, 32, 0.95), rgba(5, 24, 18, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(8, 68, 48, 0.97), rgba(6, 32, 24, 0.98));
  --btn-hex-glow: rgba(16, 185, 129, 0.65);
  --btn-hex-glow-strong: rgba(16, 185, 129, 0.95);
}

#hud-fan-container #dock-toggle-emotes {
  --btn-hex-color: #c084fc;
  --btn-hex-border: linear-gradient(135deg, #c084fc, #7c3aed);
  --btn-hex-face: linear-gradient(145deg, rgba(45, 16, 68, 0.95), rgba(22, 9, 36, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(68, 24, 102, 0.97), rgba(30, 12, 48, 0.98));
  --btn-hex-glow: rgba(192, 132, 252, 0.65);
  --btn-hex-glow-strong: rgba(192, 132, 252, 0.95);
}

#hud-fan-container #dock-toggle-logs {
  --btn-hex-color: #f97316;
  --btn-hex-border: linear-gradient(135deg, #f97316, #c2410c);
  --btn-hex-face: linear-gradient(145deg, rgba(58, 25, 8, 0.95), rgba(28, 14, 6, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(84, 36, 12, 0.97), rgba(38, 18, 8, 0.98));
  --btn-hex-glow: rgba(249, 115, 22, 0.65);
  --btn-hex-glow-strong: rgba(249, 115, 22, 0.95);
}

#hud-fan-container #btn-info-hud {
  --btn-hex-color: #38bdf8;
  --btn-hex-border: linear-gradient(135deg, #38bdf8, #1d4ed8);
  --btn-hex-face: linear-gradient(145deg, rgba(8, 30, 68, 0.95), rgba(6, 18, 42, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(12, 48, 98, 0.97), rgba(8, 24, 58, 0.98));
  --btn-hex-glow: rgba(56, 189, 248, 0.65);
  --btn-hex-glow-strong: rgba(56, 189, 248, 0.95);
}

#hud-fan-container #btn-settings-hud {
  --btn-hex-color: #f472b6;
  --btn-hex-border: linear-gradient(135deg, #f472b6, #db2777);
  --btn-hex-face: linear-gradient(145deg, rgba(58, 14, 38, 0.95), rgba(28, 8, 20, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(84, 20, 56, 0.97), rgba(38, 10, 26, 0.98));
  --btn-hex-glow: rgba(244, 114, 182, 0.65);
  --btn-hex-glow-strong: rgba(244, 114, 182, 0.95);
}

#hud-fan-container #btn-exit-game {
  --btn-hex-color: #ef4444;
  --btn-hex-border: linear-gradient(135deg, #ef4444, #b91c1c);
  --btn-hex-face: linear-gradient(145deg, rgba(62, 14, 14, 0.95), rgba(30, 8, 8, 0.98));
  --btn-hex-face-hover: linear-gradient(145deg, rgba(90, 20, 20, 0.97), rgba(42, 10, 10, 0.98));
  --btn-hex-glow: rgba(239, 68, 68, 0.65);
  --btn-hex-glow-strong: rgba(239, 68, 68, 0.95);
}

/* Botones en abanico: diseño hexagonal geométrico de precisión (44x44px) */
.hud-fan-container .btn-hud-top-nav,
.hud-fan-container .btn-hud-icon,
#hud-fan-container button {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  overflow: visible !important;
  color: var(--btn-hex-color, #38bdf8) !important;
  transform: translate3d(0, 0, 0) scale(0.3) !important;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    visibility 0.22s ease !important;
  will-change: transform, opacity;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

/* Borde hexagonal exterior sobre ::after (perfectamente concéntrico y sin traslación parasitaria) */
.hud-fan-container .btn-hud-top-nav::after,
.hud-fan-container .btn-hud-icon::after,
#hud-fan-container button::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%) !important;
  -webkit-clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%) !important;
  background: var(--btn-hex-border, linear-gradient(135deg, #38bdf8, #0284c7)) !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 3px var(--btn-hex-glow, rgba(56, 189, 248, 0.6))) !important;
  z-index: 1 !important;
  pointer-events: none !important;
  transition: background 0.2s ease, filter 0.2s ease !important;
}

/* Cara hexagonal interior con bisel de 2px y gradiente metálico oscuro */
.hud-fan-container .btn-hud-top-nav::before,
.hud-fan-container .btn-hud-icon::before,
#hud-fan-container button::before {
  content: '' !important;
  position: absolute !important;
  inset: 2px !important;
  top: 2px !important;
  left: 2px !important;
  right: 2px !important;
  bottom: 2px !important;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--btn-hex-face, linear-gradient(145deg, rgba(23, 33, 53, 0.97), rgba(10, 16, 30, 0.98))) !important;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%) !important;
  -webkit-clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%) !important;
  border-radius: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  transition: background 0.2s ease !important;
}

/* Asegurar que el icono SVG quede en plano superior centrado */
.hud-fan-container .btn-hud-top-nav>*,
.hud-fan-container .btn-hud-icon>*,
#hud-fan-container button>* {
  position: relative !important;
  z-index: 3 !important;
}

.hud-fan-container .btn-hud-top-nav .hud-nav-icon,
.hud-fan-container .btn-hud-icon .hud-nav-icon,
#hud-fan-container .hud-nav-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  color: var(--btn-hex-color, #38bdf8) !important;
}

.hud-fan-container .hud-nav-icon svg,
#hud-fan-container .hud-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  color: var(--btn-hex-color, currentColor) !important;
  stroke: var(--btn-hex-color, currentColor) !important;
  filter: drop-shadow(0 0 3px var(--btn-hex-glow, transparent)) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease !important;
  display: block !important;
}

.hud-fan-container .nav-emoji-icon,
#hud-fan-container .nav-emoji-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 4px var(--btn-hex-glow, rgba(192, 132, 252, 0.6))) !important;
}

/* Botones en abanico: estado abierto desplegado verticalmente */
.hud-fan-container.fan-open .btn-hud-top-nav,
.hud-fan-container.fan-open .btn-hud-icon,
#hud-fan-container.fan-open button {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate3d(0, var(--fan-y, 0px), 0) scale(1) !important;
}

/* Hover de botones hexagonales dentro del abanico */
.hud-fan-container.fan-open .btn-hud-top-nav:hover,
.hud-fan-container.fan-open .btn-hud-icon:hover,
#hud-fan-container.fan-open button:hover {
  transform: translate3d(0, var(--fan-y, 0px), 0) scale(1.1) !important;
  z-index: 10005 !important;
  filter: brightness(1.12) !important;
}

/* Active/tap: mantiene la posición vertical fija y da respuesta háptica visual */
.hud-fan-container.fan-open .btn-hud-top-nav:active,
.hud-fan-container.fan-open .btn-hud-icon:active,
#hud-fan-container.fan-open button:active {
  transform: translate3d(0, var(--fan-y, 0px), 0) scale(0.95) !important;
  z-index: 10005 !important;
}

.hud-fan-container.fan-open .btn-hud-top-nav:hover::before,
.hud-fan-container.fan-open .btn-hud-icon:hover::before,
#hud-fan-container.fan-open button:hover::before {
  background: var(--btn-hex-face-hover, linear-gradient(145deg, rgba(30, 58, 95, 0.96), rgba(15, 23, 42, 0.98))) !important;
}

.hud-fan-container.fan-open .btn-hud-top-nav:hover::after,
.hud-fan-container.fan-open .btn-hud-icon:hover::after,
#hud-fan-container.fan-open button:hover::after {
  filter: drop-shadow(0 0 12px var(--btn-hex-glow-strong, rgba(56, 189, 248, 0.95))) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.85)) !important;
}

.hud-fan-container.fan-open .btn-hud-top-nav:hover .hud-nav-icon svg,
.hud-fan-container.fan-open .btn-hud-icon:hover .hud-nav-icon svg,
#hud-fan-container.fan-open button:hover .hud-nav-icon svg {
  transform: scale(1.15) !important;
  filter: drop-shadow(0 0 8px var(--btn-hex-color, currentColor)) !important;
}

/* ✨ Etiqueta/Nombre de cada botón a la izquierda: High-End Glassmorphism */
.hud-fan-container,
#hud-fan-container,
.hud-fan-wrapper {
  overflow: visible !important;
}

.hud-fan-container .btn-hud-top-nav .nav-label,
.hud-fan-container .btn-hud-icon .nav-label,
#hud-fan-container button .nav-label,
#hud-fan-container .nav-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  position: absolute !important;
  right: calc(100% + 10px) !important;
  top: 50% !important;
  transform: translateY(-50%) translateX(8px) scale(0.94) !important;
  background: rgba(8, 14, 26, 0.90) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 3px solid var(--btn-hex-color, #38bdf8) !important;
  border-radius: 8px !important;
  padding: 3.5px 10px !important;
  font-family: 'Outfit', sans-serif, system-ui !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  cursor: pointer !important;
  transition:
    opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease !important;
  z-index: 20 !important;
  user-select: none !important;
}

/* Indicador micro-dot sutil en la etiqueta */
.hud-fan-container .nav-label::before,
#hud-fan-container button .nav-label::before {
  content: '' !important;
  width: 4.5px !important;
  height: 4.5px !important;
  border-radius: 50% !important;
  background: var(--btn-hex-color, #38bdf8) !important;
  box-shadow: 0 0 6px var(--btn-hex-glow, rgba(56, 189, 248, 0.8)) !important;
  margin-right: 6px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* Visible automáticamente al abrir el abanico desplegable */
.hud-fan-container.fan-open .btn-hud-top-nav .nav-label,
.hud-fan-container.fan-open .btn-hud-icon .nav-label,
#hud-fan-container.fan-open button .nav-label,
#hud-fan-container.fan-open .nav-label {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(-50%) translateX(0) scale(1) !important;
}

/* Resalte sutil al hacer hover en el botón o en la etiqueta */
.hud-fan-container.fan-open .btn-hud-top-nav:hover .nav-label,
.hud-fan-container.fan-open .btn-hud-icon:hover .nav-label,
#hud-fan-container.fan-open button:hover .nav-label,
#hud-fan-container.fan-open .nav-label:hover {
  background: rgba(13, 22, 38, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  border-left-color: var(--btn-hex-color, #38bdf8) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), 0 0 12px var(--btn-hex-glow, rgba(56, 189, 248, 0.45)) !important;
  color: #ffffff !important;
  transform: translateY(-50%) translateX(-2px) scale(1.03) !important;
}

@media (max-width: 480px),
(max-height: 640px) {

  .hud-fan-container,
  #hud-fan-container {
    width: 38px !important;
    height: 38px !important;
  }

  #hud-fan-container button,
  .hud-fan-container .btn-hud-top-nav,
  .hud-fan-container .btn-hud-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  #hud-fan-container .hud-nav-icon svg,
  .hud-fan-container .hud-nav-icon svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
  }

  #hud-fan-container .nav-label,
  .hud-fan-container button .nav-label {
    font-size: 0.7rem !important;
    padding: 2.5px 7px !important;
    letter-spacing: 0.4px !important;
  }
}

/* ==========================================================================
   KMKZ — HUD SUPERIOR MÓVIL: Reducción de espacio vacío y ajuste total del Banco
   Garantiza que TODOS los recursos (madera, arcilla, oveja, trigo, mineral y cartas dev)
   se muestren siempre completos y sin recortes en pantallas móviles pequeñas.
   ========================================================================== */

/* ── ≤768px: Ocultar badge redundante de fase en fila superior para dar espacio ── */
@media (max-width: 768px) {
  #game-phase-indicator,
  .hud-top-right .phase-badge,
  .game-hud-top .phase-badge {
    display: none !important;
  }
}

/* ── ≤650px: móvil estándar ── */
@media (max-width: 650px) {
  #game-screen .game-hud-top {
    padding-top: max(6px, env(safe-area-inset-top, 6px)) !important;
    padding-bottom: 2px !important;
    padding-left: max(5px, env(safe-area-inset-left, 5px)) !important;
    padding-right: max(5px, env(safe-area-inset-right, 5px)) !important;
  }

  .hud-top-nav-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hud-top-left,
  .hud-top-right {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  .hud-top-left .btn-hud-top-nav,
  .hud-top-right .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
  }

  .hud-top-left .btn-hud-top-nav .hud-nav-icon svg,
  .hud-top-right .btn-hud-top-nav .hud-nav-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* Banco: margen seguro y elementos compactos sin cortar extremos */
  #top-bank-bar,
  #game-screen .top-bank-bar {
    padding: 1.5px 5px !important;
    gap: 2.5px !important;
    margin-top: 1px !important;
    margin-bottom: 1px !important;
    border-radius: 9px !important;
    justify-content: center !important;
    justify-content: safe center !important;
    min-width: fit-content !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  .top-bank-hex-brand {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
  }

  .top-bank-divider {
    height: 12px !important;
    margin: 0 1px !important;
  }

  #top-bank-bar .top-bank-item,
  #game-screen .top-bank-item {
    padding: 1px 3.5px !important;
    gap: 1.5px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    font-variant-numeric: tabular-nums !important;
    flex-shrink: 0 !important;
  }

  #top-bank-bar .top-bank-item .res-svg-token,
  #top-bank-bar .top-bank-item .ui-svg-icon,
  #game-screen .top-bank-item .res-svg-token,
  #game-screen .top-bank-item .ui-svg-icon {
    width: 13px !important;
    height: 13px !important;
  }

  /* Barra de jugadores: reducir padding vertical */
  #players-list,
  #game-screen .players-top-bar {
    padding: 3px 8px !important;
    gap: 6px !important;
  }

  /* Pods de jugador: recortar padding interno sin alterar tamaño */
  #game-screen .hex-player-pod {
    gap: 2px !important;
  }
}

/* ── ≤480px: apretar aún más ── */
@media (max-width: 480px) {
  #game-screen .game-hud-top {
    padding-top: max(5px, env(safe-area-inset-top, 5px)) !important;
    padding-bottom: 1px !important;
    padding-left: max(4px, env(safe-area-inset-left, 4px)) !important;
    padding-right: max(4px, env(safe-area-inset-right, 4px)) !important;
  }

  .hud-top-nav-row {
    gap: 3px !important;
  }

  .hud-top-left,
  .hud-top-right {
    gap: 2.5px !important;
  }

  .hud-top-left .btn-hud-top-nav,
  .hud-top-right .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
  }

  .hud-top-left .btn-hud-top-nav .hud-nav-icon svg,
  .hud-top-right .btn-hud-top-nav .hud-nav-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  #top-bank-bar,
  #game-screen .top-bank-bar {
    padding: 1px 4px !important;
    gap: 2px !important;
    margin-top: 0 !important;
    margin-bottom: 1px !important;
    border-radius: 8px !important;
    justify-content: center !important;
    justify-content: safe center !important;
    min-width: fit-content !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  .top-bank-hex-brand {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
  }

  .top-bank-divider {
    height: 11px !important;
    margin: 0 1px !important;
  }

  #top-bank-bar .top-bank-item,
  #game-screen .top-bank-item {
    padding: 1px 2.5px !important;
    font-size: 0.68rem !important;
    gap: 1px !important;
    border-radius: 5px !important;
    font-variant-numeric: tabular-nums !important;
    flex-shrink: 0 !important;
  }

  #top-bank-bar .top-bank-item .res-svg-token,
  #top-bank-bar .top-bank-item .ui-svg-icon,
  #game-screen .top-bank-item .res-svg-token,
  #game-screen .top-bank-item .ui-svg-icon {
    width: 12px !important;
    height: 12px !important;
  }

  #players-list,
  #game-screen .players-top-bar {
    padding: 2px 6px !important;
    gap: 5px !important;
  }

  #game-screen .hex-player-pod:not(.player-chip) {
    padding: 2px 6px !important;
  }
}

/* ── ≤380px: mínimo absoluto para pantallas ultra compactas ── */
@media (max-width: 380px) {
  #game-screen .game-hud-top {
    padding-top: max(4px, env(safe-area-inset-top, 4px)) !important;
    padding-bottom: 0 !important;
    padding-left: max(3px, env(safe-area-inset-left, 3px)) !important;
    padding-right: max(3px, env(safe-area-inset-right, 3px)) !important;
  }

  .hud-top-nav-row {
    gap: 2px !important;
  }

  .hud-top-left,
  .hud-top-right {
    gap: 2px !important;
  }

  .hud-top-left .btn-hud-top-nav,
  .hud-top-right .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
  }

  .hud-top-left .btn-hud-top-nav .hud-nav-icon svg,
  .hud-top-right .btn-hud-top-nav .hud-nav-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  #top-bank-bar,
  #game-screen .top-bank-bar {
    padding: 1px 3px !important;
    gap: 1.5px !important;
    margin: 0 !important;
    border-radius: 7px !important;
    justify-content: center !important;
    justify-content: safe center !important;
    min-width: fit-content !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  /* Ocultar logo K y divisor en <=380px para dar 100% prioridad a los 6 contadores */
  .top-bank-hex-brand,
  .top-bank-divider {
    display: none !important;
  }

  #top-bank-bar .top-bank-item,
  #game-screen .top-bank-item {
    padding: 1px 2px !important;
    font-size: 0.64rem !important;
    gap: 1px !important;
    border-radius: 5px !important;
    font-variant-numeric: tabular-nums !important;
    flex-shrink: 0 !important;
  }

  #top-bank-bar .top-bank-item .res-svg-token,
  #top-bank-bar .top-bank-item .ui-svg-icon,
  #game-screen .top-bank-item .res-svg-token,
  #game-screen .top-bank-item .ui-svg-icon {
    width: 11px !important;
    height: 11px !important;
  }

  #players-list,
  #game-screen .players-top-bar {
    padding: 2px 4px !important;
    gap: 4px !important;
  }

  #game-screen .hex-player-pod:not(.player-chip) {
    padding: 2px 5px !important;
  }
}

/* ── ≤340px: pantallas micro ── */
@media (max-width: 340px) {
  #top-bank-bar,
  #game-screen .top-bank-bar {
    padding: 0.5px 2px !important;
    gap: 1px !important;
  }

  #top-bank-bar .top-bank-item,
  #game-screen .top-bank-item {
    padding: 0.5px 1.5px !important;
    font-size: 0.60rem !important;
    gap: 0.5px !important;
    border-radius: 4px !important;
  }

  #top-bank-bar .top-bank-item .res-svg-token,
  #top-bank-bar .top-bank-item .ui-svg-icon,
  #game-screen .top-bank-item .res-svg-token,
  #game-screen .top-bank-item .ui-svg-icon {
    width: 10px !important;
    height: 10px !important;
  }

  .hud-top-left .btn-hud-top-nav,
  .hud-top-right .btn-hud-top-nav,
  .game-hud-top .btn-hud-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE LOBBY ROSTER & MATCH SUMMARY (#view-panel-players)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 650px) {
  #view-panel-players .lobby-match-roster-controls {
    flex-direction: column !important;
    gap: 6px !important;
  }

  #view-panel-players .config-players-count-group {
    flex: 0 0 auto !important;
    width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 3px 8px !important;
    margin: 4px 0 !important;
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  #view-panel-players .compact-roster-label {
    margin-bottom: 0 !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  #view-panel-players .compact-roster-label .ui-svg-icon svg {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.75 !important;
  }

  #view-panel-players .compact-roster-select {
    width: auto !important;
    min-width: 105px !important;
    max-width: 120px !important;
    height: 28px !important;
    min-height: 28px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
  }

  #view-panel-players .lobby-bot-management-card {
    padding: 4px 8px !important;
    margin-top: 4px !important;
  }

  #lobby-match-summary-card .summary-chips-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }

  #lobby-match-summary-card {
    padding: 7px 9px !important;
    margin-top: 6px !important;
    margin-bottom: 5px !important;
  }
}

@media (max-width: 480px) {
  #lobby-match-summary-card .summary-chips-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
  }

  #lobby-match-summary-card .summary-chip {
    padding: 2.5px 2px !important;
  }

  #lobby-match-summary-card .summary-chip .chip-val {
    font-size: 0.7rem !important;
  }

  #lobby-match-summary-card {
    padding: 6px 8px !important;
  }

  #view-panel-players .bot-diff-pill-btn {
    padding: 1px 3px !important;
    font-size: 0.70rem !important;
    min-height: 26px !important;
    height: 26px !important;
  }

  #view-panel-players .btn-add-single-bot {
    padding: 0 8px !important;
    font-size: 0.72rem !important;
    min-height: 26px !important;
    height: 26px !important;
  }
}

/* ==========================================================================
   SUPRESIÓN TOTAL DE ESTRELLAS DE PRESTIGIO (CLEAN UI & ROBUST LOGIC)
   ========================================================================== */
.player-star-badge,
.podium-badge-pill.stars,
.inspect-stars-corona,
#hero-stars-corona,
#inspect-stars-corona,
.hero-badge-pill.stars,
#hero-badge-stars,
.btn-star-forge-trigger,
.btn-buy-star-action,
.star-forge-trigger-badge {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   SUPRESIÓN DE BURBUJA FLOTANTE DE CHAT
   ========================================================================== */
#chat-floating-bubble,
.chat-floating-bubble,
#btn-chat-pop-bubble,
.btn-chat-pop-bubble {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   AVISO VISUAL DE TURNO (KMKZ LUXURY TURN ALERT)
   ========================================================================== */
.turn-visual-alert-container {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: max(22px, env(safe-area-inset-top, 22px));
  overflow: hidden;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s ease;
}

.turn-visual-alert-container.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.turn-visual-alert-container.is-closing {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Full-Screen Edge Vignette Pulse */
.turn-visual-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 65px 14px rgba(245, 158, 11, 0.45),
    inset 0 0 150px 35px rgba(217, 119, 6, 0.25);
  transition: opacity 0.25s ease;
}

.turn-visual-vignette.anim-playing {
  animation: turnVisualVignettePulse 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes turnVisualVignettePulse {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }

  15% {
    opacity: 1;
    transform: scale(1);
  }

  40% {
    opacity: 0.75;
  }

  65% {
    opacity: 0.9;
  }

  85% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* Floating Glassmorphic Turn Banner */
.turn-visual-splash-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  border-radius: 9999px;
  padding: 10px 22px 10px 14px;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.75),
    0 0 28px 4px rgba(245, 158, 11, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  max-width: calc(100vw - 32px);
  opacity: 0;
  transform: translateY(-80px) scale(0.9);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.turn-visual-splash-banner:hover {
  transform: translateY(0) scale(1.02);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.8),
    0 0 34px 6px rgba(245, 158, 11, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  border-color: rgba(251, 191, 36, 0.9);
}

.turn-visual-splash-banner:active {
  transform: translateY(2px) scale(0.98);
}

.turn-visual-splash-banner.anim-playing {
  animation: turnVisualSplashDrop 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes turnVisualSplashDrop {
  0% {
    opacity: 0;
    transform: translateY(-70px) scale(0.85);
    filter: blur(8px);
  }

  16% {
    opacity: 1;
    transform: translateY(8px) scale(1.03);
    filter: blur(0);
  }

  25% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  80% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-30px) scale(0.96);
    filter: blur(4px);
  }
}

/* Background animated glow inside card */
.turn-visual-splash-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 50%, rgba(245, 158, 11, 0.25), transparent 70%);
  pointer-events: none;
  animation: turnVisualGlow 2.5s ease-in-out infinite alternate;
}

@keyframes turnVisualGlow {
  0% {
    opacity: 0.4;
  }

  100% {
    opacity: 0.9;
  }
}

/* Icon Wrap */
.turn-visual-splash-icon-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 1.5px solid rgba(254, 243, 199, 0.8);
  animation: turnVisualIconPulse 1.8s ease-in-out infinite alternate;
}

@keyframes turnVisualIconPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.55);
  }

  100% {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.85);
  }
}

.turn-visual-splash-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.turn-visual-splash-title {
  font-family: var(--font-heading, inherit);
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fffbeb 0%, #fde68a 45%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  line-height: 1.15;
}

.turn-visual-splash-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

.turn-visual-splash-dismiss-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 4px;
  padding: 4px 6px;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.turn-visual-splash-banner:hover .turn-visual-splash-dismiss-hint {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

@media (max-width: 640px) {
  .turn-visual-alert-container {
    padding-top: max(16px, env(safe-area-inset-top, 16px));
  }

  .turn-visual-splash-banner {
    padding: 8px 16px 8px 12px;
    gap: 10px;
  }

  .turn-visual-splash-icon-wrap {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .turn-visual-splash-icon-wrap svg {
    width: 18px;
    height: 18px;
  }

  .turn-visual-splash-title {
    font-size: 0.95rem;
  }

  .turn-visual-splash-sub {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   KMKZ BATTLE PASS & SEASON CHESTS - INTEGRATED SECTION MODAL STYLES (AAA)
   ========================================================================== */

.bp-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(3, 6, 15, 0.92) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  z-index: 1000006 !important;
}

/* Ambient Backdrop inside Container */
.bp-ambient-backdrop {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
}

.bp-backdrop-aurora {
  position: absolute !important;
  top: -120px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 900px !important;
  height: 480px !important;
  background: radial-gradient(ellipse at 50% 20%, rgba(245, 158, 11, 0.25) 0%, rgba(168, 85, 247, 0.16) 42%, transparent 72%) !important;
  filter: blur(45px) !important;
  opacity: 0.85 !important;
  animation: bpAuroraPulse 8s ease-in-out infinite alternate !important;
}

@keyframes bpAuroraPulse {
  0% { transform: translateX(-50%) scale(0.96); opacity: 0.7; }
  100% { transform: translateX(-50%) scale(1.05); opacity: 0.95; }
}

.bp-backdrop-mesh {
  position: absolute !important;
  inset: 0 !important;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  opacity: 0.45 !important;
  mask-image: radial-gradient(circle at 50% 25%, black 25%, transparent 85%) !important;
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 25%, transparent 85%) !important;
}

.bp-section-container {
  width: 100% !important;
  max-width: 1100px !important;
  max-height: calc(100dvh - 28px) !important;
  background: linear-gradient(168deg, #0e162a 0%, #080d1a 50%, #040610 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 
    0 25px 75px rgba(0, 0, 0, 0.92), 
    0 0 50px rgba(245, 158, 11, 0.18), 
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Header */
.bp-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 22px !important;
  background: linear-gradient(180deg, rgba(18, 25, 48, 0.96) 0%, rgba(10, 15, 30, 0.92) 100%) !important;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

.bp-section-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.bp-header-emblem {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #2b1c09 0%, #17112c 50%, #0a0d18 100%) !important;
  border: 2px solid #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  flex-shrink: 0 !important;
  position: relative !important;
}

.bp-emblem-svg {
  width: 24px !important;
  height: 24px !important;
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)) !important;
}

.bp-header-titles {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.bp-header-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.bp-header-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 45%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  letter-spacing: 0.06em !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5)) !important;
}

.bp-header-season-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15)) !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  color: #fef08a !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.bp-header-tier-status {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.15)) !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

.bp-header-subtitle {
  font-size: 0.8rem !important;
  color: #cbd5e1 !important;
  margin: 0 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.bp-section-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.bp-countdown-tag {
  background: rgba(18, 25, 48, 0.8) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #e2e8f0 !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.bp-inline-svg {
  width: 14px !important;
  height: 14px !important;
  color: #f59e0b !important;
  flex-shrink: 0 !important;
}

.bp-btn-close-modal {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.bp-btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #ffffff !important;
  transform: scale(1.05) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.bp-close-svg {
  width: 16px !important;
  height: 16px !important;
}

/* Scrollable Content Body */
.bp-section-scroll-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 18px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(245, 158, 11, 0.5) rgba(10, 15, 30, 0.5) !important;
  position: relative !important;
  z-index: 1 !important;
}

.bp-section-scroll-body::-webkit-scrollbar {
  width: 8px !important;
}

.bp-section-scroll-body::-webkit-scrollbar-track {
  background: rgba(10, 15, 30, 0.6) !important;
  border-radius: 999px !important;
}

.bp-section-scroll-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f59e0b, #d97706) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(254, 240, 138, 0.3) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
}

.bp-section-scroll-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fbbf24, #f59e0b) !important;
}

/* Hero Progression Console */
.bp-hero-stats-card {
  background: linear-gradient(145deg, rgba(28, 39, 68, 0.88) 0%, rgba(13, 20, 38, 0.94) 55%, rgba(9, 14, 28, 0.98) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.48) !important;
  border-radius: 18px !important;
  padding: 18px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.58), 
    0 0 35px rgba(245, 158, 11, 0.16), 
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 20px rgba(245, 158, 11, 0.05) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  backdrop-filter: blur(16px) !important;
}

.bp-hero-stats-card::before {
  content: '' !important;
  position: absolute !important;
  top: -60px !important;
  left: 20px !important;
  width: 220px !important;
  height: 160px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, transparent 70%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.bp-hero-stats-left {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 3D Gilded Level Shield Emblem */
.bp-hero-level-badge {
  width: 68px !important;
  height: 68px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #2d1c08 0%, #1a1332 50%, #090e1c 100%) !important;
  border: 2px solid #fbbf24 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 
    0 0 25px rgba(245, 158, 11, 0.5), 
    0 6px 14px rgba(0, 0, 0, 0.6), 
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5) !important;
  flex-shrink: 0 !important;
  position: relative !important;
}

.bp-badge-glow-ring {
  position: absolute !important;
  inset: -5px !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  pointer-events: none !important;
  animation: bpBadgeRingPulse 3s ease-in-out infinite alternate !important;
}

@keyframes bpBadgeRingPulse {
  0% {
    transform: scale(0.98);
    opacity: 0.5;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  }
  100% {
    transform: scale(1.04);
    opacity: 1;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.7);
  }
}

.bp-hero-lvl-label {
  font-size: 0.64rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.bp-hero-lvl-num {
  font-family: 'Cinzel', serif !important;
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 40%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8)) !important;
}

.bp-hero-xp-info-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.bp-hero-xp-labels {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.bp-xp-readout-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.bp-hero-xp-val {
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.03em !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

.bp-hero-pct-pill {
  padding: 2px 8px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(2, 132, 199, 0.15)) !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
}

.bp-hero-next-lbl {
  color: #cbd5e1 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

/* Glowing Tactical Liquid XP Track */
.bp-hero-track-bar {
  width: 100% !important;
  height: 13px !important;
  background: #080c16 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bp-hero-fill-bar {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 45%, #fef08a 70%, #38bdf8 100%) !important;
  border-radius: 999px !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7) !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

.bp-hero-fill-bar::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%) !important;
  background-size: 200% 100% !important;
  animation: bpTrackSheen 2.5s infinite linear !important;
  pointer-events: none !important;
}

@keyframes bpTrackSheen {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.bp-bar-laser-head {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 0 12px #ffffff, 0 0 20px #38bdf8 !important;
  border-radius: 999px !important;
  z-index: 2 !important;
}

.bp-track-ticks {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
}

.bp-tick {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 2px !important;
  background: rgba(255, 255, 255, 0.35) !important;
  z-index: 1 !important;
}

/* Quick Stats Row */
.bp-hero-quick-stats {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-top: 3px !important;
}

.bp-quick-stat {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  white-space: nowrap !important;
  gap: 6px !important;
}

.bp-quick-stat#bp-stat-unlocked-count::before {
  content: '' !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #f59e0b !important;
  box-shadow: 0 0 8px #f59e0b !important;
}

.bp-quick-stat#bp-stat-claimed-count::before {
  content: '' !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  box-shadow: 0 0 8px #22c55e !important;
}

.bp-quick-stat#bp-stat-chests-count::before {
  content: '' !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #c084fc !important;
  box-shadow: 0 0 8px #c084fc !important;
}

.bp-quick-stat-sep {
  display: none !important;
}

/* Claim All Rewards CTA */
.bp-btn-claim-all-rewards {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
  padding: 12px 20px !important;
  border-radius: 14px !important;
  cursor: default !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  position: relative !important;
  overflow: hidden !important;
}

.bp-btn-claim-all-rewards.has-claims {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 45%, #d97706 100%) !important;
  border: 1.5px solid #ffffff !important;
  color: #0c101d !important;
  cursor: pointer !important;
  box-shadow: 
    0 0 30px rgba(245, 158, 11, 0.65), 
    0 6px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  animation: bpClaimPulse 2.5s infinite alternate !important;
}

@keyframes bpClaimPulse {
  0% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 34px rgba(245, 158, 11, 0.85), 0 6px 20px rgba(0, 0, 0, 0.6);
  }
}

.bp-btn-claim-all-rewards.has-claims::after {
  content: '' !important;
  position: absolute !important;
  top: -50% !important;
  left: -100% !important;
  width: 60% !important;
  height: 200% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent) !important;
  transform: rotate(25deg) !important;
  animation: bpBtnSweep 3s infinite ease-in-out !important;
  pointer-events: none !important;
}

@keyframes bpBtnSweep {
  0% { left: -100%; }
  35% { left: 160%; }
  100% { left: 160%; }
}

.bp-btn-claim-all-rewards.has-claims:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.bp-btn-claim-all-rewards.has-claims:active {
  transform: translateY(1px) scale(0.97) !important;
}

.bp-btn-claim-all-rewards:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #64748b !important;
  filter: grayscale(1) !important;
}

.bp-btn-svg {
  width: 17px !important;
  height: 17px !important;
  flex-shrink: 0 !important;
}

/* Tabs Bar */
.bp-section-tabs-bar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: linear-gradient(180deg, rgba(14, 20, 38, 0.92) 0%, rgba(9, 13, 26, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  padding: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  width: 100% !important;
  flex-shrink: 0 !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3) !important;
  position: relative !important;
  z-index: 2 !important;
}

.bp-section-tabs-bar::-webkit-scrollbar {
  display: none !important;
}

.bp-section-tab-btn {
  flex: 1 1 0 !important;
  min-width: max-content !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  user-select: none !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.bp-section-tab-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.bp-section-tab-btn.active {
  background: linear-gradient(135deg, rgba(35, 48, 80, 0.95), rgba(18, 25, 48, 0.98)) !important;
  border: 1px solid rgba(245, 158, 11, 0.55) !important;
  border-bottom: 2px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.5), 
    0 0 20px rgba(245, 158, 11, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.bp-tab-svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  transition: transform 0.25s ease !important;
}

.bp-section-tab-btn.active .bp-tab-svg {
  color: #fbbf24 !important;
  transform: scale(1.12) !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)) !important;
}

.bp-tab-badge-pulse {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7) !important;
  animation: bpBeaconWave 2s infinite ease-out !important;
}

@keyframes bpBeaconWave {
  0% { transform: scale(0.95); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }
  100% { transform: scale(0.95); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
}

.bp-tab-dev-chip {
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  background: rgba(239, 68, 68, 0.22) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
  letter-spacing: 0.05em !important;
}

/* Panes */
.bp-section-pane {
  display: none !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
  flex: 1 !important;
}

.bp-section-pane.active {
  display: flex !important;
}

/* Track View Toolbar */
.bp-track-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.bp-filter-chips-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  box-sizing: border-box !important;
}

.bp-sec-chip {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 34px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.bp-sec-chip:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}

.bp-sec-chip.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15)) !important;
  border-color: #fbbf24 !important;
  color: #fef08a !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35) !important;
}

.bp-chip-svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
}

.bp-btn-jump-current {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 36px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.15)) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #38bdf8 !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}

.bp-btn-jump-current:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border-color: #7dd3fc !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.5) !important;
}

.bp-jump-svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
}

/* 50 Levels Grid */
.bp-levels-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bp-level-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: linear-gradient(175deg, rgba(26, 36, 64, 0.85) 0%, rgba(13, 19, 36, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.45), 
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  min-height: 215px !important;
}

.bp-level-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 
    0 14px 32px rgba(0, 0, 0, 0.6), 
    0 0 22px rgba(245, 158, 11, 0.25) !important;
}

/* Locked Card State */
.bp-level-card.status-locked {
  opacity: 0.72 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: linear-gradient(175deg, rgba(16, 22, 38, 0.8) 0%, rgba(8, 12, 22, 0.92) 100%) !important;
}

.bp-level-card.status-locked .bp-card-vector-svg {
  filter: grayscale(0.4) brightness(0.85) !important;
}

/* Unlocked (Ready to claim) Card State */
.bp-level-card.status-unlocked {
  border-color: #fbbf24 !important;
  background: linear-gradient(175deg, rgba(38, 48, 78, 0.9) 0%, rgba(18, 24, 46, 0.98) 100%) !important;
  box-shadow: 
    0 0 28px rgba(245, 158, 11, 0.4), 
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 0 18px rgba(245, 158, 11, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  animation: bpCardPulse 2.8s infinite alternate !important;
}

@keyframes bpCardPulse {
  0% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35), 0 6px 18px rgba(0, 0, 0, 0.5);
  }
  100% {
    box-shadow: 0 0 34px rgba(245, 158, 11, 0.65), 0 10px 28px rgba(0, 0, 0, 0.65);
  }
}

/* Claimed Card State */
.bp-level-card.status-claimed {
  opacity: 0.78 !important;
  border-color: rgba(34, 197, 94, 0.35) !important;
  background: linear-gradient(175deg, rgba(14, 30, 26, 0.8) 0%, rgba(8, 18, 16, 0.94) 100%) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(34, 197, 94, 0.15) !important;
}

/* Milestone Chest Cards (Tiers 10, 20, 30, 40, 50) */
.bp-level-card.milestone-chest,
.bp-level-card.is-milestone-chest {
  border: 2px solid #fbbf24 !important;
  background: linear-gradient(175deg, rgba(48, 32, 18, 0.92) 0%, rgba(22, 16, 32, 0.98) 100%) !important;
  box-shadow: 
    0 0 32px rgba(245, 158, 11, 0.4), 
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Majestic Imperial Milestone Banner */
.bp-milestone-banner {
  margin: -14px -14px 8px -14px !important;
  padding: 6px 10px !important;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #0c101d !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-transform: uppercase !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}

.bp-banner-mini-svg {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0 !important;
}

/* Card Top Badges */
.bp-card-top-row {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

.bp-card-badge {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.bp-card-rarity-pill {
  font-size: 0.66rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.bp-card-rarity-pill.rarity-tag-common {
  background: rgba(148, 163, 184, 0.18) !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
  color: #e2e8f0 !important;
}

.bp-card-rarity-pill.rarity-tag-rare {
  background: rgba(56, 189, 248, 0.2) !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

.bp-card-rarity-pill.rarity-tag-epic {
  background: rgba(192, 132, 252, 0.22) !important;
  border: 1px solid #c084fc !important;
  color: #c084fc !important;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.45) !important;
}

.bp-card-rarity-pill.rarity-tag-legendary {
  background: rgba(251, 191, 36, 0.24) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #fef08a !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.55) !important;
}

.bp-card-rarity-pill.rarity-tag-mythic {
  background: rgba(244, 63, 94, 0.26) !important;
  border: 1.5px solid #f43f5e !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.65) !important;
}

/* 3D Holographic Display Stage */
.bp-card-stage {
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  margin: 4px 0 !important;
}

.bp-card-halo-ring {
  position: absolute !important;
  bottom: 6px !important;
  width: 70px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.3) 0%, transparent 75%) !important;
  filter: blur(3px) !important;
  pointer-events: none !important;
}

.bp-milestone-sunburst {
  position: absolute !important;
  inset: -10px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(168, 85, 247, 0.2) 40%, transparent 70%) !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
  animation: bpSunburstSpin 12s linear infinite !important;
}

@keyframes bpSunburstSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bp-card-vector-svg {
  width: 50px !important;
  height: 50px !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65)) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  animation: bpItemFloat 3.5s ease-in-out infinite alternate !important;
}

@keyframes bpItemFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.bp-level-card:hover .bp-card-vector-svg {
  transform: scale(1.15) translateY(-5px) !important;
}

.bp-card-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.bp-card-name {
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  min-height: 32px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
}

.bp-card-category-lbl {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.bp-card-actions-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  margin-top: auto !important;
}

.bp-card-action-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  border: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.bp-card-action-btn.btn-claim {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 45%, #d97706 100%) !important;
  color: #0c101d !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.bp-card-action-btn.btn-claim:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.7) !important;
}

.bp-card-action-btn.btn-open-chest {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 45%, #7e22ce 100%) !important;
  color: #ffffff !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.bp-card-action-btn.btn-open-chest:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.75) !important;
}

.bp-card-action-btn.btn-claimed {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
}

.bp-card-action-btn.btn-locked {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

.bp-card-preview-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.bp-card-preview-btn:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.bp-preview-eye-svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
}

/* Svg Icons General normalization */
.bp-svg-icon {
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.btn-icon {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

.btn-icon-sm {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0 !important;
}

/* Missions */
.bp-missions-columns {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bp-mission-cat-box {
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.8) 0%, rgba(12, 17, 32, 0.92) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  padding: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.bp-mission-cat-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.bp-mission-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.bp-mission-cat-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.bp-mission-cat-icon svg {
  width: 20px !important;
  height: 20px !important;
}

.bp-mission-cat-title {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.bp-mission-reset-hint {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.74rem !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}

.bp-mini-clock {
  width: 14px !important;
  height: 14px !important;
  color: #f59e0b !important;
  flex-shrink: 0 !important;
}

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

.bp-mission-row {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  transition: border-color 0.2s ease, transform 0.2s ease !important;
}

.bp-mission-row:hover {
  border-color: rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-1px) !important;
}

.bp-mission-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.bp-mission-info {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.bp-mission-icon-box {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.bp-mission-vector-svg {
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}

.bp-mission-texts {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.bp-mission-title {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  line-height: 1.25 !important;
  word-break: break-word !important;
}

.bp-mission-desc {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.3 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.bp-mission-xp-tag {
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15)) !important;
  border: 1px solid #fbbf24 !important;
  color: #fef08a !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

.bp-mission-bar-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.bp-mission-track {
  flex: 1 1 auto !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: hidden !important;
}

.bp-mission-fill {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #f59e0b, #38bdf8) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6) !important;
  transition: width 0.3s ease !important;
}

.bp-mission-ratio {
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  min-width: 36px !important;
  text-align: right !important;
  flex-shrink: 0 !important;
}

.bp-mission-btn {
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  border: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.bp-mission-btn.ready {
  background: linear-gradient(135deg, #fef08a, #f59e0b) !important;
  color: #0c101d !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5) !important;
}

.bp-mission-btn.progress {
  background: rgba(56, 189, 248, 0.18) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.bp-mission-btn.claimed {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
}

/* Vault Grid */
.bp-vault-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.bp-vault-card {
  background: linear-gradient(165deg, rgba(24, 34, 58, 0.85) 0%, rgba(12, 17, 34, 0.96) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  padding: 20px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.bp-vault-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

.bp-vault-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.bp-vault-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 3px 10px !important;
  border-radius: 8px !important;
  border: 1px solid !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

.bp-vault-req {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
}

.bp-vault-chest-stage {
  height: 110px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.bp-vault-ambient-pedestal {
  position: absolute !important;
  bottom: 12px !important;
  width: 120px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse, var(--pedestal-glow, rgba(245, 158, 11, 0.4)) 0%, transparent 75%) !important;
  filter: blur(5px) !important;
  pointer-events: none !important;
}

.bp-vault-sunburst-rays {
  position: absolute !important;
  width: 130px !important;
  height: 130px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%) !important;
  filter: blur(10px) !important;
  pointer-events: none !important;
}

.bp-vault-stage-svg {
  width: 80px !important;
  height: 80px !important;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65)) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  animation: bpItemFloat 3.5s ease-in-out infinite alternate !important;
}

.bp-vault-card:hover .bp-vault-stage-svg {
  transform: scale(1.12) translateY(-4px) !important;
}

.bp-vault-name {
  font-size: 1rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.bp-vault-loot {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
}

.bp-vault-loot-pill {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  font-size: 0.72rem !important;
  color: #e2e8f0 !important;
  font-weight: 700 !important;
  text-align: left !important;
}

.bp-loot-mini-sparkle {
  width: 13px !important;
  height: 13px !important;
  color: #fbbf24 !important;
  flex-shrink: 0 !important;
}

.bp-vault-btn {
  width: 100% !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  border: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-top: auto !important;
  transition: all 0.22s ease !important;
}

.bp-vault-btn.btn-open-chest {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 45%, #7e22ce 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #fef08a !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.55) !important;
}

.bp-vault-btn.btn-open-chest:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.75) !important;
}

.bp-vault-btn.btn-claimed {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
}

.bp-vault-btn.btn-locked {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

/* Simulator Pane */
.bp-sim-box {
  background: linear-gradient(165deg, rgba(20, 28, 48, 0.8) 0%, rgba(12, 17, 32, 0.92) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 18px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.bp-sim-header {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.bp-sim-header-svg {
  width: 32px !important;
  height: 32px !important;
  color: #f59e0b !important;
  flex-shrink: 0 !important;
}

.bp-sim-title {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.bp-sim-desc {
  font-size: 0.78rem !important;
  color: #94a3b8 !important;
  margin: 3px 0 0 0 !important;
}

.bp-sim-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 14px !important;
}

.bp-sim-action-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 5px !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: left !important;
}

.bp-sim-action-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #38bdf8 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45) !important;
}

.bp-sim-btn-svg {
  width: 22px !important;
  height: 22px !important;
  margin-bottom: 4px !important;
}

.bp-sim-action-btn strong {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
}

.bp-sim-action-btn small {
  font-size: 0.74rem !important;
  color: #cbd5e1 !important;
}

.bp-sim-action-btn.danger:hover {
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* ==========================================================================
   KMKZ CHEST OPENING & 3D OBJECT PREVIEW MODAL STYLES
   ========================================================================== */

.bp-chest-overlay,
.bp-preview-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(4, 7, 16, 0.94) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  z-index: 1000010 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.bp-chest-stage-modal,
.bp-preview-modal-card {
  width: 100% !important;
  max-width: 540px !important;
  max-height: min(92dvh, 760px) !important;
  overflow-y: auto !important;
  background: radial-gradient(circle at 50% 25%, rgba(32, 22, 58, 0.98), rgba(9, 13, 26, 0.99)) !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 24px !important;
  padding: 28px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  position: relative !important;
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.35), 0 25px 60px rgba(0, 0, 0, 0.9) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(245, 158, 11, 0.4) transparent !important;
}

.bp-chest-stage-close,
.bp-preview-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.bp-chest-stage-close:hover,
.bp-preview-close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.08) !important;
  border-color: #f59e0b !important;
}

.bp-chest-ambient-rays,
.bp-preview-glow-ring {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 460px !important;
  height: 460px !important;
  transform: translate(-50%, -50%) !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(168, 85, 247, 0.15) 45%, transparent 70%) !important;
  pointer-events: none !important;
  animation: bpRotateRays 14s linear infinite !important;
  z-index: 0 !important;
}

@keyframes bpRotateRays {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.bp-chest-flash-fx {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: radial-gradient(circle, #fff 0%, rgba(254, 240, 138, 0.85) 50%, transparent 80%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

.bp-chest-flash-fx.active {
  animation: bpFlashBang 0.6s ease-out forwards !important;
}

@keyframes bpFlashBang {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }

  30% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.bp-chest-stage-content,
.bp-preview-card-content {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
}

.bp-chest-header-badges,
.bp-preview-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.bp-chest-header-pill,
.bp-preview-rarity,
.bp-revealed-rarity {
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  text-transform: uppercase !important;
  background: linear-gradient(135deg, #a855f7, #f59e0b) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4) !important;
}

.bp-preview-category,
.bp-revealed-category {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.6px !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  text-transform: uppercase !important;
}

.bp-chest-modal-title,
.bp-preview-modal-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.5) !important;
  line-height: 1.2 !important;
}

.bp-chest-modal-subtitle {
  font-size: 0.85rem !important;
  color: #fef08a !important;
  font-weight: 600 !important;
  margin: 0 !important;
  max-width: 440px !important;
}

/* Rates Trigger Button & Panel */
.bp-btn-rates-trigger {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 4px 0 2px 0 !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  user-select: none !important;
}

.bp-btn-rates-trigger:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* 3D Interactive Chest Box Stage */
.bp-chest-box-stage {
  width: 160px !important;
  height: 140px !important;
  cursor: pointer !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin: 6px 0 !important;
  animation: bpChestFloat 3.5s ease-in-out infinite !important;
  perspective: 800px !important;
}

@keyframes bpChestFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.bp-chest-box-stage:hover {
  transform: translateY(-10px) scale(1.08) !important;
}

.bp-chest-svg {
  width: 150px !important;
  height: 130px !important;
  filter: drop-shadow(0 8px 30px rgba(245, 158, 11, 0.55)) !important;
  overflow: visible !important;
}

/* Shaking anticipation */
.bp-chest-box-stage.shaking {
  animation: bpChestRumble 0.8s cubic-bezier(.36, .07, .19, .97) both !important;
}

@keyframes bpChestRumble {

  10%,
  90% {
    transform: translate3d(-5px, -2px, 0) rotate(-4deg) scale(1.02);
  }

  20%,
  80% {
    transform: translate3d(7px, 2px, 0) rotate(5deg) scale(1.04);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-9px, -3px, 0) rotate(-6deg) scale(1.06);
  }

  40%,
  60% {
    transform: translate3d(9px, 3px, 0) rotate(6deg) scale(1.08);
    filter: drop-shadow(0 0 35px #f59e0b) brightness(1.2);
  }
}

/* Chest Burst Opening Animation */
.bp-chest-lid-group {
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease !important;
  transform-origin: 80px 22px !important;
}

.bp-chest-box-stage.is-opening .bp-chest-lid-group,
.bp-chest-box-stage.is-opened .bp-chest-lid-group {
  transform: translateY(-34px) scale(0.9, 0.65) rotate(-16deg) !important;
  filter: drop-shadow(0 -8px 24px #fef08a) brightness(1.35) !important;
}

.bp-chest-box-stage.is-opening {
  animation: bpChestBurstJump 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes bpChestBurstJump {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  30% {
    transform: translateY(10px) scale(1.08, 0.9);
  }

  60% {
    transform: translateY(-24px) scale(1.18);
    filter: drop-shadow(0 0 45px #f59e0b) brightness(1.4);
  }

  85% {
    transform: translateY(-12px) scale(1.08);
  }

  100% {
    transform: translateY(-16px) scale(1.12);
    filter: drop-shadow(0 0 55px #fbbf24) brightness(1.5);
  }
}

.bp-chest-burst-beam {
  position: absolute !important;
  bottom: 25px !important;
  left: 50% !important;
  transform: translateX(-50%) scaleY(0) !important;
  transform-origin: bottom center !important;
  width: 100px !important;
  height: 240px !important;
  background: radial-gradient(ellipse at bottom, rgba(254, 240, 138, 0.95) 0%, rgba(245, 158, 11, 0.7) 40%, rgba(168, 85, 247, 0) 80%) !important;
  filter: blur(8px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 5 !important;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.bp-chest-box-stage.is-opening .bp-chest-burst-beam,
.bp-chest-box-stage.is-opened .bp-chest-burst-beam {
  opacity: 1 !important;
  transform: translateX(-50%) scaleY(1) !important;
}

.bp-chest-tap-hint {
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  letter-spacing: 1px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px dashed rgba(245, 158, 11, 0.45) !important;
  padding: 4px 14px !important;
  border-radius: 12px !important;
  animation: bpHoldPulse 2s infinite !important;
}

@keyframes bpHoldPulse {

  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

.bp-btn-open-action {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border: 1px solid #fef08a !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 0.98rem !important;
  padding: 12px 28px !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5) !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bp-btn-open-action:hover {
  transform: scale(1.04) !important;
  filter: brightness(1.15) !important;
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.75) !important;
}

/* Revealed Reward Screen */
.bp-chest-reward-revealed {
  display: none;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
}

.bp-chest-reward-revealed.active,
.bp-chest-reward-revealed.is-revealed {
  display: flex !important;
  animation: bpRevealReward 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes bpRevealReward {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.85);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chest Rates Panel */
.bp-chest-rates-panel {
  position: absolute !important;
  top: 55px !important;
  left: 16px !important;
  right: 16px !important;
  bottom: 16px !important;
  background: rgba(10, 14, 28, 0.97) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 20px !important;
  padding: 16px 18px !important;
  z-index: 50 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.2) !important;
  animation: bpRatesSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.bp-chest-rates-panel.hidden {
  display: none !important;
}

@keyframes bpRatesSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bp-rates-panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.bp-rates-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.bp-rates-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.bp-btn-close-rates {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.bp-btn-close-rates:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #ef4444 !important;
}

.bp-rates-subtitle {
  font-size: 0.78rem !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.bp-rates-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  padding-right: 4px !important;
}

.bp-rate-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
}

.bp-rate-row-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.bp-rate-badge {
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.bp-rate-pct {
  font-size: 0.88rem !important;
  font-weight: 900 !important;
}

.bp-rate-bar-bg {
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.bp-rate-bar-fill {
  height: 100% !important;
  border-radius: 4px !important;
  transition: width 0.4s ease !important;
}

.bp-rate-samples {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  line-height: 1.2 !important;
}

.bp-rates-notice {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 0.74rem !important;
  color: #bae6fd !important;
  line-height: 1.3 !important;
}

@keyframes bpRevealReward {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.85);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bp-revealed-tags-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.bp-revealed-title,
.bp-preview-item-name {
  font-family: 'Cinzel', serif !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.bp-revealed-bonus,
.bp-preview-bonus-txt {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fef08a !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  padding: 4px 14px !important;
  border-radius: 20px !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3) !important;
}

.bp-revealed-desc,
.bp-preview-item-desc {
  font-size: 0.84rem !important;
  color: #94a3b8 !important;
  max-width: 420px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* ==========================================================================
   DYNAMIC 3D OBJECT PREVIEW GENERATOR STYLES
   ========================================================================== */

.bp-revealed-preview-stage,
.bp-preview-object-stage {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 0 !important;
  min-height: 160px !important;
  position: relative !important;
}

/* 1. DADOS 3D (3D Cube with perspective) */
.bp-3d-dice-stage {
  perspective: 600px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-dice-cube {
  width: 80px !important;
  height: 80px !important;
  position: relative !important;
  transform-style: preserve-3d !important;
  animation: bpDiceSpin 10s linear infinite !important;
}

@keyframes bpDiceSpin {
  0% {
    transform: rotateX(-22deg) rotateY(0deg);
  }

  50% {
    transform: rotateX(-22deg) rotateY(180deg);
  }

  100% {
    transform: rotateX(-22deg) rotateY(360deg);
  }
}

.bp-dice-face {
  position: absolute !important;
  width: 80px !important;
  height: 80px !important;
  border-radius: 14px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.4) !important;
}

/* Themes for Dice */
.bp-dice-cube.theme-ruby .bp-dice-face {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 50%, #7f1d1d 100%) !important;
  border-color: #fca5a5 !important;
  box-shadow: inset 0 0 16px rgba(254, 202, 202, 0.3), 0 0 20px rgba(239, 68, 68, 0.4) !important;
}

.bp-dice-cube.theme-gold .bp-dice-face {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #b45309 100%) !important;
  border-color: #fef08a !important;
  box-shadow: inset 0 0 16px rgba(254, 240, 138, 0.4), 0 0 22px rgba(245, 158, 11, 0.5) !important;
}

.bp-dice-cube.theme-obsidian .bp-dice-face {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%) !important;
  border-color: #94a3b8 !important;
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.15), 0 0 18px rgba(0, 0, 0, 0.8) !important;
}

.bp-dice-cube.theme-cosmic .bp-dice-face {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #312e81 100%) !important;
  border-color: #bae6fd !important;
  box-shadow: inset 0 0 16px rgba(186, 230, 253, 0.3), 0 0 24px rgba(99, 102, 241, 0.5) !important;
}

.face-front {
  transform: rotateY(0deg) translateZ(40px) !important;
}

.face-back {
  transform: rotateY(180deg) translateZ(40px) !important;
}

.face-right {
  transform: rotateY(90deg) translateZ(40px) !important;
}

.face-left {
  transform: rotateY(-90deg) translateZ(40px) !important;
}

.face-top {
  transform: rotateX(90deg) translateZ(40px) !important;
}

.face-bottom {
  transform: rotateX(-90deg) translateZ(40px) !important;
}

.pip {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9), inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
  margin: auto !important;
}

.pip-center {
  grid-column: 2;
  grid-row: 2;
}

.pip-tl {
  grid-column: 1;
  grid-row: 1;
}

.pip-tr {
  grid-column: 3;
  grid-row: 1;
}

.pip-ml {
  grid-column: 1;
  grid-row: 2;
}

.pip-mr {
  grid-column: 3;
  grid-row: 2;
}

.pip-bl {
  grid-column: 1;
  grid-row: 3;
}

.pip-br {
  grid-column: 3;
  grid-row: 3;
}

.bp-dice-shadow {
  width: 70px !important;
  height: 14px !important;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, transparent 70%) !important;
  border-radius: 50% !important;
  margin-top: 4px !important;
}

.bp-dice-label-badge,
.bp-preview-subtitle-pill {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.8px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  padding: 3px 10px !important;
  border-radius: 12px !important;
  text-transform: uppercase !important;
}

/* 2. MARCOS DE PERFIL PREVIEW */
.bp-frame-showcase-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-avatar-preview-pod {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6) !important;
}

.bp-avatar-inner-circle {
  width: 78px !important;
  height: 78px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.2rem !important;
  position: relative !important;
  z-index: 1 !important;
}

.bp-avatar-preview-pod.frame-flame {
  border: 4px solid #ef4444 !important;
  box-shadow: 0 0 25px #ef4444, inset 0 0 15px #f97316 !important;
  animation: bpFlamePulse 1.8s ease-in-out infinite alternate !important;
}

@keyframes bpFlamePulse {
  0% {
    box-shadow: 0 0 15px #ef4444, 0 0 30px #f97316;
  }

  100% {
    box-shadow: 0 0 30px #ef4444, 0 0 45px #fbbf24;
  }
}

.bp-avatar-preview-pod.frame-galaxy {
  border: 4px solid #38bdf8 !important;
  box-shadow: 0 0 25px #38bdf8, inset 0 0 15px #a855f7 !important;
  animation: bpGalaxyPulse 3s linear infinite !important;
}

@keyframes bpGalaxyPulse {
  0% {
    border-color: #38bdf8;
    box-shadow: 0 0 20px #38bdf8;
  }

  50% {
    border-color: #c084fc;
    box-shadow: 0 0 30px #a855f7;
  }

  100% {
    border-color: #38bdf8;
    box-shadow: 0 0 20px #38bdf8;
  }
}

.bp-avatar-preview-pod.frame-cyber {
  border: 4px solid #06b6d4 !important;
  border-radius: 18px !important;
  box-shadow: 0 0 25px #06b6d4, inset 0 0 10px #0891b2 !important;
}

.bp-avatar-preview-pod.frame-cyber .bp-avatar-inner-circle {
  border-radius: 14px !important;
}

.bp-avatar-preview-pod.frame-gold {
  border: 4px solid #fbbf24 !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.8), inset 0 0 15px #fef08a !important;
}

/* 3. AVATAR STAGE */
.bp-avatar-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-avatar-hero-halo {
  width: 96px !important;
  height: 96px !important;
  border-radius: 26px !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(168, 85, 247, 0.15) 100%) !important;
  border: 2px solid var(--halo-accent, #38bdf8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 30px var(--halo-accent, rgba(56, 189, 248, 0.5)) !important;
  animation: bpRewardFloat 3s ease-in-out infinite !important;
}

@keyframes bpRewardFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.bp-avatar-hero-emoji {
  font-size: 3.4rem !important;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.6)) !important;
}

/* 4. EDIFICIOS STAGE */
.bp-building-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-building-sculpture {
  width: 96px !important;
  height: 96px !important;
  border-radius: 22px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
  border: 2px solid #f59e0b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 3.4rem !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4) !important;
  animation: bpRewardFloat 3s ease-in-out infinite !important;
}

/* 5. TITLES STAGE */
.bp-title-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-title-banner-pod {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border: 2px solid #fbbf24 !important;
  border-radius: 16px !important;
  padding: 14px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35) !important;
}

.bp-title-honor-icon {
  font-size: 1.8rem !important;
}

.bp-title-text-main {
  font-family: 'Cinzel', serif !important;
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #fef08a !important;
  letter-spacing: 0.5px !important;
}

.bp-title-stars {
  font-size: 0.85rem !important;
  color: #f59e0b !important;
  letter-spacing: 3px !important;
}

/* 6. GENERIC / COINS / CHEST STAGE */
.bp-generic-reward-stage,
.bp-chest-preview-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
}

.bp-reward-coin-stack,
.bp-chest-hero-icon {
  width: 96px !important;
  height: 96px !important;
  border-radius: 26px !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(168, 85, 247, 0.2) 100%) !important;
  border: 2px solid #fbbf24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 3.4rem !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.5) !important;
  animation: bpRewardFloat 3s ease-in-out infinite !important;
}

/* Preview Modal Actions */
.bp-preview-actions {
  width: 100% !important;
  margin-top: 6px !important;
}

.bp-preview-btn {
  width: 100% !important;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.bp-preview-btn.claim {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0f172a !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5) !important;
}

.bp-preview-btn.claim:hover {
  filter: brightness(1.15) !important;
  transform: scale(1.02) !important;
}

.bp-preview-btn.open-chest {
  background: linear-gradient(135deg, #a855f7, #7e22ce) !important;
  color: #ffffff !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5) !important;
}

.bp-preview-btn.open-chest:hover {
  filter: brightness(1.15) !important;
  transform: scale(1.02) !important;
}

.bp-preview-btn.claimed {
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  color: #4ade80 !important;
  cursor: default !important;
}

.bp-preview-btn.locked {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

/* ==========================================================================
   COMPLETE RESPONSIVE LAYOUT SYSTEM FOR MOBILE & TABLET (KMKZ BATTLE PASS)
   ========================================================================== */

@media (max-width: 900px) {
  .bp-levels-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 12px !important;
  }

  .bp-missions-columns {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .bp-vault-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 768px) {
  .bp-modal-overlay {
    padding: 8px !important;
  }

  .bp-section-container {
    max-height: calc(100dvh - 16px) !important;
    border-radius: 18px !important;
  }

  .bp-section-header {
    padding: 12px 16px !important;
    gap: 10px !important;
  }

  .bp-header-emblem {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }

  .bp-emblem-svg {
    width: 20px !important;
    height: 20px !important;
  }

  .bp-header-title {
    font-size: 1.25rem !important;
  }

  .bp-header-subtitle {
    font-size: 0.74rem !important;
  }

  .bp-section-scroll-body {
    padding: 14px 16px !important;
    gap: 14px !important;
  }

  .bp-hero-stats-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 14px !important;
  }

  .bp-hero-stats-left {
    width: 100% !important;
    gap: 14px !important;
  }

  .bp-btn-claim-all-rewards {
    width: 100% !important;
    justify-content: center !important;
    padding: 11px 16px !important;
  }

  .bp-section-tabs-bar {
    padding: 4px !important;
    gap: 5px !important;
    border-radius: 14px !important;
  }

  .bp-section-tab-btn {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 9px 14px !important;
    font-size: 0.82rem !important;
    gap: 6px !important;
  }

  .bp-track-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .bp-filter-chips-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
    gap: 6px !important;
  }

  .bp-filter-chips-row::-webkit-scrollbar {
    display: none !important;
  }

  .bp-sec-chip {
    flex: 0 0 auto !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 0.78rem !important;
  }

  .bp-btn-jump-current {
    width: 100% !important;
    height: 36px !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
  }

  .bp-levels-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 12px !important;
  }

  .bp-missions-columns {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .bp-mission-cat-box {
    padding: 14px 12px !important;
    border-radius: 16px !important;
    gap: 12px !important;
  }

  .bp-mission-cat-header {
    gap: 8px !important;
    padding-bottom: 10px !important;
  }

  .bp-mission-cat-title {
    font-size: 0.92rem !important;
  }

  .bp-mission-reset-hint {
    font-size: 0.70rem !important;
  }

  .bp-mission-row {
    padding: 12px 10px !important;
    border-radius: 12px !important;
    gap: 10px !important;
  }

  .bp-mission-top {
    gap: 8px !important;
    align-items: flex-start !important;
  }

  .bp-mission-info {
    gap: 10px !important;
  }

  .bp-mission-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
  }

  .bp-mission-vector-svg {
    width: 22px !important;
    height: 22px !important;
  }

  .bp-mission-title {
    font-size: 0.84rem !important;
  }

  .bp-mission-desc {
    font-size: 0.72rem !important;
  }

  .bp-mission-xp-tag {
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
  }

  .bp-mission-bar-wrap {
    gap: 8px !important;
  }

  .bp-mission-track {
    height: 7px !important;
    min-width: 50px !important;
  }

  .bp-mission-ratio {
    font-size: 0.72rem !important;
    min-width: 30px !important;
  }

  .bp-mission-btn {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    height: 28px !important;
    min-height: 28px !important;
  }

  .bp-vault-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 600px) {
  .bp-header-subtitle {
    display: none !important;
  }

  .bp-header-title {
    font-size: 1.15rem !important;
  }

  .bp-header-season-pill,
  .bp-header-tier-status {
    font-size: 0.65rem !important;
    padding: 2px 7px !important;
  }
}

@media (max-width: 480px) {
  .bp-modal-overlay {
    padding: 0 !important;
  }

  .bp-section-container {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .bp-section-header {
    padding: 10px 14px !important;
  }

  .bp-header-emblem {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }

  .bp-emblem-svg {
    width: 20px !important;
    height: 20px !important;
  }

  .bp-header-title {
    font-size: 1.05rem !important;
  }

  .bp-countdown-tag {
    display: none !important;
  }

  .bp-btn-close-modal {
    width: 34px !important;
    height: 34px !important;
  }

  .bp-section-scroll-body {
    padding: 12px !important;
    gap: 14px !important;
  }

  .bp-hero-stats-card {
    padding: 14px !important;
    gap: 12px !important;
    border-radius: 16px !important;
  }

  .bp-hero-stats-left {
    gap: 12px !important;
  }

  .bp-hero-level-badge {
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    border-width: 2px !important;
  }

  .bp-hero-lvl-label {
    font-size: 0.58rem !important;
  }

  .bp-hero-lvl-num {
    font-size: 1.5rem !important;
  }

  .bp-hero-xp-val {
    font-size: 0.88rem !important;
  }

  .bp-hero-pct-pill {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  .bp-hero-next-lbl {
    font-size: 0.72rem !important;
  }

  .bp-quick-stat {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }

  .bp-btn-claim-all-rewards {
    padding: 11px 16px !important;
    font-size: 0.82rem !important;
    border-radius: 12px !important;
  }

  .bp-section-tabs-bar {
    padding: 4px !important;
    gap: 4px !important;
    border-radius: 12px !important;
  }

  .bp-section-tab-btn {
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 10px !important;
    gap: 6px !important;
  }

  .bp-tab-svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Two clean, compact columns on mobile (fits 375px viewport with precision) */
  .bp-levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .bp-level-card {
    padding: 10px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    min-height: 195px !important;
  }

  .bp-milestone-banner {
    margin: -10px -10px 4px -10px !important;
    font-size: 0.62rem !important;
    padding: 4px 6px !important;
  }

  .bp-card-badge {
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
  }

  .bp-card-rarity-pill {
    font-size: 0.6rem !important;
    padding: 2px 5px !important;
  }

  .bp-card-stage {
    height: 66px !important;
  }

  .bp-card-halo-ring {
    width: 58px !important;
    height: 18px !important;
  }

  .bp-card-vector-svg {
    width: 44px !important;
    height: 44px !important;
  }

  .bp-card-name {
    font-size: 0.78rem !important;
    min-height: 28px !important;
  }

  .bp-card-category-lbl {
    font-size: 0.66rem !important;
  }

  .bp-card-actions-row {
    gap: 5px !important;
  }

  .bp-card-action-btn {
    height: 32px !important;
    font-size: 0.72rem !important;
    padding: 0 6px !important;
    border-radius: 8px !important;
  }

  .bp-card-preview-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .bp-preview-eye-svg {
    width: 14px !important;
    height: 14px !important;
  }

  .bp-vault-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .bp-vault-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  .bp-vault-chest-stage {
    height: 85px !important;
  }

  .bp-vault-stage-svg {
    width: 68px !important;
    height: 68px !important;
  }

  .bp-vault-name {
    font-size: 0.92rem !important;
  }

  .bp-vault-btn {
    height: 34px !important;
    font-size: 0.76rem !important;
  }

  /* Chest & Preview Modals on small screens */
  .bp-chest-stage-modal,
  .bp-preview-modal-card {
    max-height: 94dvh !important;
    padding: 18px 16px !important;
    border-radius: 20px !important;
    gap: 12px !important;
  }

  .bp-chest-modal-title,
  .bp-preview-modal-title {
    font-size: 1.3rem !important;
  }

  .bp-chest-box-stage {
    width: 130px !important;
    height: 115px !important;
  }

  .bp-chest-svg {
    width: 120px !important;
    height: 108px !important;
  }

  .bp-btn-open-action {
    padding: 10px 20px !important;
    font-size: 0.84rem !important;
  }

  .bp-revealed-preview-stage,
  .bp-preview-object-stage {
    min-height: 130px !important;
  }

  .bp-revealed-title,
  .bp-preview-item-name {
    font-size: 1.15rem !important;
  }

  .bp-revealed-desc,
  .bp-preview-item-desc {
    font-size: 0.76rem !important;
  }

  .bp-mission-cat-box {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    gap: 10px !important;
  }

  .bp-mission-cat-header {
    gap: 6px !important;
    padding-bottom: 8px !important;
  }

  .bp-mission-cat-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
  }

  .bp-mission-cat-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  .bp-mission-cat-title {
    font-size: 0.86rem !important;
  }

  .bp-mission-reset-hint {
    font-size: 0.66rem !important;
  }

  .bp-mini-clock {
    width: 12px !important;
    height: 12px !important;
  }

  .bp-missions-list-container {
    gap: 8px !important;
  }

  .bp-mission-row {
    padding: 10px 8px !important;
    border-radius: 10px !important;
    gap: 8px !important;
  }

  .bp-mission-info {
    gap: 8px !important;
  }

  .bp-mission-icon-box {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .bp-mission-vector-svg {
    width: 18px !important;
    height: 18px !important;
  }

  .bp-mission-title {
    font-size: 0.80rem !important;
  }

  .bp-mission-desc {
    font-size: 0.68rem !important;
  }

  .bp-mission-xp-tag {
    padding: 2px 7px !important;
    font-size: 0.68rem !important;
  }

  .bp-mission-bar-wrap {
    gap: 6px !important;
  }

  .bp-mission-track {
    height: 6px !important;
    min-width: 45px !important;
  }

  .bp-mission-ratio {
    font-size: 0.68rem !important;
    min-width: 28px !important;
  }

  .bp-mission-btn {
    padding: 4px 8px !important;
    font-size: 0.68rem !important;
    height: 26px !important;
    min-height: 26px !important;
  }
}

@media (max-width: 360px) {
  .bp-levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .bp-level-card {
    padding: 8px !important;
    min-height: 180px !important;
  }

  .bp-card-stage {
    height: 54px !important;
  }

  .bp-card-vector-svg {
    width: 36px !important;
    height: 36px !important;
  }

  .bp-card-action-btn {
    font-size: 0.65rem !important;
    height: 28px !important;
  }

  .bp-card-preview-btn {
    width: 28px !important;
    height: 28px !important;
  }

  .bp-mission-cat-box {
    padding: 10px 8px !important;
  }

  .bp-mission-row {
    padding: 8px 6px !important;
  }

  .bp-mission-bar-wrap {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "track ratio"
      "btn btn" !important;
    gap: 6px !important;
  }

  .bp-mission-track {
    grid-area: track !important;
  }

  .bp-mission-ratio {
    grid-area: ratio !important;
  }

  .bp-mission-btn {
    grid-area: btn !important;
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   KMKZ FORJA DE OBJETIVOS ESPECIALES / SPECIAL ITEM UNLOCK SYSTEM
   ========================================================================== */

#modal-special-unlock.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000006 !important;
  background: rgba(4, 7, 18, 0.88) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(8px, 2vw, 20px) !important;
  box-sizing: border-box !important;
}

#modal-special-unlock.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.special-unlock-modal-container {
  background: radial-gradient(130% 95% at 50% -10%, #16264c 0%, #0b1326 42%, #050814 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  max-width: 680px !important;
  width: 100% !important;
  height: min(92vh, calc(100dvh - 20px)) !important;
  max-height: 100% !important;
  padding: 18px 22px !important;
  box-sizing: border-box !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  margin: auto !important;
}

.special-unlock-modal-container::before {
  content: '' !important;
  position: absolute !important;
  top: -40px !important;
  left: 20% !important;
  right: 20% !important;
  height: 80px !important;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.28) 0%, transparent 70%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.special-unlock-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 12px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  gap: 10px !important;
  background: transparent !important;
  position: relative !important;
  z-index: 1 !important;
}

.special-unlock-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.special-unlock-trophy-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(14, 165, 233, 0.12) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.45rem !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.special-unlock-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.special-unlock-title {
  font-size: clamp(1.05rem, 3.8vw, 1.25rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #ffffff 0%, #bae6fd 60%, #38bdf8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.4) !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.special-unlock-subtitle {
  font-size: clamp(0.72rem, 2.4vw, 0.80rem) !important;
  color: #94a3b8 !important;
  margin: 2px 0 0 0 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Header Live Balance Pill */
.special-unlock-header-points-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(14, 165, 233, 0.08) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  flex-shrink: 0 !important;
  cursor: default !important;
}

.special-header-points-val {
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.4px !important;
  white-space: nowrap !important;
}

.special-unlock-header .btn-close-modal {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #94a3b8 !important;
  font-size: 1.05rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
}

.special-unlock-header .btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

.special-unlock-modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding-right: 4px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent !important;
  position: relative !important;
  z-index: 1 !important;
}

/* --- Active Target Showcase Card --- */
.special-target-card {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: auto !important;
  background: linear-gradient(145deg, rgba(20, 33, 62, 0.92) 0%, rgba(10, 17, 34, 0.98) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 18px !important;
  padding: 16px 18px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.special-target-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #38bdf8 50%, transparent) !important;
}

.special-target-card.is-ready {
  border-color: rgba(16, 185, 129, 0.65) !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.32), inset 0 0 20px rgba(16, 185, 129, 0.14) !important;
}

.special-target-card.is-ready::before {
  background: linear-gradient(90deg, transparent, #10b981 50%, transparent) !important;
}

.special-target-ambient-glow {
  position: absolute !important;
  top: -30px !important;
  right: -30px !important;
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%) !important;
  pointer-events: none !important;
}

.special-target-card.rarity-legendary .special-target-ambient-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%) !important;
}

.special-target-card.rarity-mythic .special-target-ambient-glow {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%) !important;
}

.special-target-card.rarity-epic .special-target-ambient-glow {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%) !important;
}

.special-target-top {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 12px !important;
  position: relative !important;
  z-index: 1 !important;
}

.special-target-visual-wrap {
  width: clamp(64px, 16vw, 76px) !important;
  height: clamp(64px, 16vw, 76px) !important;
  border-radius: 16px !important;
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.22) 0%, rgba(12, 19, 38, 0.95) 75%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2rem !important;
  position: relative !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(56, 189, 248, 0.25) !important;
  flex-shrink: 0 !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
}

.special-target-visual-wrap:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

.special-pedestal-light {
  position: absolute !important;
  bottom: 0 !important;
  left: 10% !important;
  right: 10% !important;
  height: 40% !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.35) 0%, transparent 75%) !important;
  pointer-events: none !important;
}

.special-inspect-chip {
  position: absolute !important;
  bottom: -3px !important;
  right: -3px !important;
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  color: #ffffff !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  padding: 1.5px 6px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
  pointer-events: none !important;
}

.special-target-details {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.special-target-badge-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 4px !important;
  flex-wrap: wrap !important;
}

.special-target-tag {
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
}

.special-target-tag.rarity-common {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid #94a3b8;
}

.special-target-tag.rarity-rare {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.special-target-tag.rarity-epic {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid #a855f7;
}

.special-target-tag.rarity-mythic {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid #ec4899;
}

.special-target-tag.rarity-legendary {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid #f59e0b;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.special-target-type-label {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.special-target-item-name {
  font-size: clamp(1rem, 3.2vw, 1.15rem) !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  margin: 0 0 3px 0 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  word-break: break-word !important;
}

.special-target-points-meta {
  font-size: 0.76rem !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  word-break: break-word !important;
}

/* Progress bar */
.special-progress-wrapper {
  margin-top: 4px !important;
  width: 100% !important;
}

.special-progress-labels {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  margin-bottom: 6px !important;
  flex-wrap: wrap !important;
  gap: 4px 8px !important;
}

.progress-label-title {
  color: #94a3b8 !important;
}

.progress-label-val {
  color: #38bdf8 !important;
  font-weight: 900 !important;
}

.progress-label-val.is-complete {
  color: #10b981 !important;
}

.special-progress-track {
  width: 100% !important;
  height: 12px !important;
  background: rgba(8, 14, 28, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

.special-progress-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #0284c7, #38bdf8 60%, #818cf8 100%) !important;
  border-radius: 999px !important;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8) !important;
}

.special-progress-fill.is-complete {
  background: linear-gradient(90deg, #059669, #10b981 60%, #34d399 100%) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.9) !important;
}

.special-target-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-special-claim {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1.5px solid #34d399 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: clamp(0.78rem, 2.6vw, 0.90rem) !important;
  padding: 10px 14px !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.55) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

.btn-special-claim:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.85) !important;
}

.btn-special-claim.disabled,
.btn-special-claim:disabled {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  animation: none !important;
}

.special-target-subactions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-special-change {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #cbd5e1 !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  padding: 10px 14px !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

.btn-special-change:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

.btn-special-clear {
  background: rgba(239, 68, 68, 0.14) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  padding: 10px 14px !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  touch-action: manipulation !important;
}

.btn-special-clear:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Empty Target State — Altar de Forja Cósmico */
.special-target-empty {
  text-align: center !important;
  padding: 16px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.forge-empty-altar-wrap {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 10px !important;
}

.forge-empty-pedestal-ring {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  border: 1.5px dashed rgba(56, 189, 248, 0.45) !important;
  animation: kmkzRotateSlow 16s linear infinite !important;
}

.forge-empty-icon-box {
  width: 54px !important;
  height: 54px !important;
  border-radius: 16px !important;
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.25) 0%, rgba(15, 23, 42, 0.9) 75%) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35), inset 0 0 14px rgba(56, 189, 248, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 1 !important;
}

.forge-empty-sparkle-halo {
  position: absolute !important;
  inset: -10px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%) !important;
  pointer-events: none !important;
}

.special-target-empty-title {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.3px !important;
}

.forge-points-pill-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #bae6fd !important;
  font-size: 0.78rem !important;
  margin-bottom: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.forge-points-pill-badge strong {
  color: #38bdf8 !important;
  font-weight: 900 !important;
}

.special-target-empty-desc {
  font-size: 0.80rem !important;
  color: #94a3b8 !important;
  max-width: 440px !important;
  margin: 0 auto 14px auto !important;
  line-height: 1.4 !important;
}

.btn-forge-explore {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 22px !important;
  min-height: 42px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  touch-action: manipulation !important;
}

.btn-forge-explore:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 28px rgba(14, 165, 233, 0.7) !important;
}

/* --- Points Source Information Banner --- */
.special-points-info-card {
  flex-shrink: 0 !important;
  background: rgba(13, 21, 40, 0.7) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 16px !important;
  padding: 10px 14px !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}

.special-info-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
  touch-action: manipulation !important;
}

.special-points-info-card.is-expanded .special-info-header {
  margin-bottom: 10px !important;
}

.special-info-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.special-info-sparkle {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.special-info-title {
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.5px !important;
}

.special-info-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

.info-toggle-arrow {
  display: inline-block !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-size: 0.85rem !important;
}

.special-points-info-card.is-expanded .info-toggle-arrow {
  transform: rotate(180deg) !important;
}

.special-points-info-card:not(.is-expanded) .special-info-grid {
  display: none !important;
}

.special-points-info-card.is-expanded .special-info-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  animation: kmkzFadeIn 0.2s ease-out !important;
}

.special-info-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(22, 33, 60, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  min-width: 0 !important;
  transition: border-color 0.2s ease !important;
}

.special-info-item:hover {
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.special-info-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.special-info-icon.gold {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

.special-info-icon.cyan {
  background: rgba(56, 189, 248, 0.16) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

.special-info-icon.amber {
  background: rgba(249, 115, 22, 0.16) !important;
  border: 1px solid rgba(249, 115, 22, 0.35) !important;
  color: #fb923c !important;
}

.special-info-icon.emerald {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

.special-info-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  gap: 1px !important;
}

.special-info-text strong {
  color: #f1f5f9 !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.special-info-text span {
  color: #94a3b8 !important;
  font-size: 0.70rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* --- Catalog Explorer Section --- */
.special-catalog-section {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.special-catalog-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.special-catalog-title {
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  letter-spacing: 0.5px !important;
}

.special-catalog-subtitle {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  margin: 2px 0 0 0 !important;
}

.special-catalog-tabs {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  padding: 4px 2px 6px 2px !important;
  margin: 0 -2px !important;
  scroll-snap-type: x mandatory !important;
}

.special-catalog-tabs::-webkit-scrollbar {
  display: none !important;
}

.special-tab-btn {
  background: rgba(22, 33, 60, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
  font-size: 0.74rem !important;
  padding: 6px 13px !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
  scroll-snap-align: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.special-tab-btn:hover {
  background: rgba(38, 55, 96, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #e2e8f0 !important;
}

.special-tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(14, 165, 233, 0.18) 100%) !important;
  border-color: #38bdf8 !important;
  color: #f0f9ff !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
}

.special-tab-btn .tab-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: inherit !important;
}

.special-tab-count {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  opacity: 0.75 !important;
  margin-left: 2px !important;
  letter-spacing: 0.2px !important;
}

.special-tab-btn.active .special-tab-count {
  opacity: 1 !important;
  color: #38bdf8 !important;
}

.special-catalog-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 10px !important;
}

.special-item-card {
  background: linear-gradient(150deg, rgba(20, 31, 58, 0.88) 0%, rgba(11, 18, 35, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 8px !important;
  position: relative !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.25s ease !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important;
  box-sizing: border-box !important;
}

.special-item-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.special-item-card.is-active-target {
  border-color: #38bdf8 !important;
  background: linear-gradient(150deg, rgba(25, 42, 78, 0.94) 0%, rgba(14, 23, 45, 0.98) 100%) !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.4), inset 0 0 14px rgba(56, 189, 248, 0.15) !important;
}

.special-item-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 4px !important;
}

.special-item-stage {
  height: 82px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1) 0%, rgba(12, 18, 36, 0.7) 75%) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  margin: 4px 0 !important;
  position: relative !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}

.special-item-stage:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.18) 0%, rgba(14, 22, 42, 0.8) 75%) !important;
}

.special-catalog-canvas {
  width: auto !important;
  height: 100% !important;
  max-width: 72px !important;
  max-height: 72px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.special-item-stage:hover .special-catalog-canvas {
  transform: scale(1.08) !important;
}

.special-target-canvas {
  width: auto !important;
  height: 100% !important;
  max-width: 72px !important;
  max-height: 72px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.special-target-visual-wrap:hover .special-target-canvas {
  transform: scale(1.08) !important;
}

.special-item-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.special-item-name {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

.special-item-cost-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  white-space: nowrap !important;
}

.btn-set-target {
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  padding: 7px 8px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-sizing: border-box !important;
  touch-action: manipulation !important;
}

.btn-set-target:hover {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: #38bdf8 !important;
  transform: translateY(-1px) !important;
}

.btn-set-target.active-target {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
  color: #34d399 !important;
  cursor: default !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

/* In-Shop Target Action Button */
.btn-shop-target {
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  font-weight: 900 !important;
  font-size: 0.75rem !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}

.btn-shop-target:hover {
  background: rgba(56, 189, 248, 0.3) !important;
  border-color: #38bdf8 !important;
}

.btn-shop-target.is-target {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES FOR FORJA DE OBJETIVOS (300px - 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .special-points-info-card.is-expanded .special-info-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .special-info-text strong,
  .special-info-text span {
    white-space: normal !important;
    word-break: break-word !important;
  }
}

@media (max-width: 640px) {
  #modal-special-unlock.modal-overlay {
    padding: clamp(4px, 1.5vw, 8px) !important;
  }

  .special-unlock-modal-container {
    padding: 14px 12px !important;
    border-radius: 18px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: min(94dvh, calc(100dvh - 12px)) !important;
    max-height: min(94dvh, calc(100dvh - 12px)) !important;
  }

  .special-unlock-header {
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
  }

  .special-unlock-trophy-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.25rem !important;
    border-radius: 12px !important;
  }

  .special-unlock-title {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem) !important;
  }

  .special-unlock-subtitle {
    font-size: clamp(0.68rem, 2.4vw, 0.74rem) !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .special-unlock-header-points-pill {
    padding: 3px 8px !important;
  }

  .special-header-points-val {
    font-size: 0.74rem !important;
  }

  .special-unlock-modal-body {
    padding-right: 2px !important;
    gap: 12px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .special-target-card {
    padding: 12px 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .special-target-top {
    gap: 10px !important;
    margin-bottom: 10px !important;
  }

  .special-target-visual-wrap {
    width: 66px !important;
    height: 66px !important;
    min-width: 66px !important;
    max-width: 66px !important;
    border-radius: 14px !important;
  }

  .special-target-canvas {
    max-width: 62px !important;
    max-height: 62px !important;
  }

  .special-target-item-name {
    font-size: clamp(0.92rem, 3.4vw, 1.05rem) !important;
  }

  .special-progress-track {
    height: 10px !important;
  }

  .special-target-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .btn-special-claim {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 0.80rem !important;
    min-height: 40px !important;
  }

  .special-target-subactions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .btn-special-change,
  .btn-special-clear {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    font-size: 0.74rem !important;
    min-height: 36px !important;
    justify-content: center !important;
  }

  .special-catalog-tabs {
    gap: 5px !important;
    padding: 2px 2px 6px 2px !important;
  }

  .special-tab-btn {
    padding: 6px 11px !important;
    font-size: 0.72rem !important;
    min-height: 34px !important;
  }

  .special-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .special-item-card {
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .special-item-stage {
    height: 72px !important;
  }

  .special-catalog-canvas {
    max-width: 64px !important;
    max-height: 64px !important;
  }

  .special-item-name {
    font-size: 0.76rem !important;
  }

  .btn-set-target {
    font-size: 0.72rem !important;
    min-height: 34px !important;
  }
}

@media (max-width: 480px) {
  .special-points-info-card.is-expanded .special-info-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .special-info-item {
    padding: 7px 9px !important;
  }
}

@media (max-width: 360px) {
  #modal-special-unlock.modal-overlay {
    padding: 4px !important;
  }

  .special-unlock-modal-container {
    padding: 10px 8px !important;
    border-radius: 16px !important;
    height: min(96dvh, calc(100dvh - 8px)) !important;
    max-height: min(96dvh, calc(100dvh - 8px)) !important;
  }

  .special-unlock-title {
    font-size: 0.92rem !important;
  }

  .special-unlock-subtitle {
    font-size: 0.68rem !important;
  }

  .special-target-card {
    padding: 10px 8px !important;
    border-radius: 14px !important;
  }

  .special-target-visual-wrap {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .special-target-canvas {
    max-width: 56px !important;
    max-height: 56px !important;
  }

  .special-target-item-name {
    font-size: 0.86rem !important;
  }

  .special-target-empty-title {
    font-size: 1rem !important;
  }

  .special-target-empty-desc {
    font-size: 0.72rem !important;
  }

  .btn-forge-explore {
    width: 100% !important;
    max-width: 260px !important;
    font-size: 0.78rem !important;
    padding: 8px 14px !important;
  }

  .special-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .special-item-card {
    padding: 6px !important;
    border-radius: 12px !important;
  }

  .special-item-stage {
    height: 66px !important;
  }

  .special-catalog-canvas {
    max-width: 58px !important;
    max-height: 58px !important;
  }

  .special-item-name {
    font-size: 0.70rem !important;
  }

  .btn-set-target {
    font-size: 0.68rem !important;
    min-height: 32px !important;
    padding: 5px 4px !important;
  }
}

/* ==========================================================================
   INVENTORY MODAL & COSMETIC PREVIEWS
   ========================================================================== */
#modal-inventory.friends-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2.5vw, 18px);
  box-sizing: border-box;
}

#modal-inventory.hidden {
  display: none !important;
}

.inventory-modal-card {
  width: 100% !important;
  max-width: min(960px, calc(100vw - 16px)) !important;
  max-height: min(92vh, 92dvh) !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background: radial-gradient(135% 120% at 50% 0%, #1e1b18 0%, #0d1322 55%, #050814 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: clamp(16px, 3.5vw, 24px) !important;
  padding: clamp(14px, 3vw, 22px) !important;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.94), 0 0 35px rgba(251, 191, 36, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  position: relative !important;
  color: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.inventory-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.inventory-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.05rem, 3.5vw, 1.3rem);
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.inventory-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inventory-badge-count {
  font-size: 0.76rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.inventory-filters-scrollable {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px 2px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.inventory-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.inventory-filter-pill:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(251, 191, 36, 0.4);
}

.inventory-filter-pill.active {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.4);
}

.inventory-scroll-container {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.4) transparent;
}

.inventory-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
  padding: 4px 2px 16px 2px;
}

@media (max-width: 520px) {
  .inventory-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

.inventory-cosmetic-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.92));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.inventory-cosmetic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.2);
}

.inventory-cosmetic-card.is-equipped {
  border-color: #10b981 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25) !important;
}

.inventory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 4px;
}

.inventory-card-rarity {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inventory-card-preview-stage {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 12px;
  background: radial-gradient(circle at center, #0f172a, #030712);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.inventory-card-canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
}

.inventory-preview-hint {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: translateY(4px);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.inventory-cosmetic-card:hover .inventory-preview-hint {
  opacity: 1;
  transform: translateY(0);
}

.inventory-card-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  line-height: 1.2;
}

.inventory-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inventory-status-pill {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.inventory-status-pill.equipped {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.btn-inventory-card-equip {
  width: 100%;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.btn-inventory-card-equip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.5);
  filter: brightness(1.1);
}

.inventory-card-new-badge {
  font-size: 0.7rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 1px 6px;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   KMKZ COMPETITIVE SEASON & TROPHY ROAD SYSTEM
   ========================================================================== */

/* Header Nav Season Pill */
.nav-season-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 20px;
  padding: 4px 12px;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.nav-season-pill:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.2));
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.nav-season-icon {
  font-size: 1rem;
}

.nav-season-cups {
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
}

/* Lobby Season Card Banner (KMKZ Luxury Cyber-Imperial Card) */
.season-lobby-card,
#btn-lobby-season {
  position: relative !important;
  background: radial-gradient(110% 130% at 0% 0%, rgba(251, 191, 36, 0.1) 0%, rgba(15, 23, 42, 0.96) 40%, rgba(10, 15, 29, 0.98) 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.35) !important;
  border-radius: 18px !important;
  padding: 13px 18px !important;
  margin: 12px 0 16px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.75), 0 0 20px rgba(251, 191, 36, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 24px rgba(251, 191, 36, 0.05) !important;
  user-select: none !important;
  outline: none !important;
}

.season-lobby-card::before,
#btn-lobby-season::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.08), rgba(255, 255, 255, 0.14), transparent) !important;
  transform: skewX(-20deg) !important;
  transition: left 0.75s ease !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.season-lobby-card:hover::before,
#btn-lobby-season:hover::before {
  left: 120% !important;
}

.season-lobby-card:hover,
#btn-lobby-season:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 28px rgba(251, 191, 36, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 30px rgba(251, 191, 36, 0.1) !important;
}

.season-lobby-card:active,
#btn-lobby-season:active {
  transform: translateY(0) scale(0.99) !important;
}

.season-lobby-card:focus-visible,
#btn-lobby-season:focus-visible {
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px !important;
}

.season-lobby-card-glow {
  position: absolute !important;
  top: -30px !important;
  left: 15px !important;
  width: 140px !important;
  height: 140px !important;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, rgba(168, 85, 247, 0.18) 45%, transparent 70%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
  z-index: 0 !important;
}

.season-lobby-card:hover .season-lobby-card-glow,
#btn-lobby-season:hover .season-lobby-card-glow {
  transform: scale(1.3) !important;
  opacity: 0.9 !important;
}

.season-lobby-left {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.season-league-badge-slot {
  width: 52px !important;
  height: 52px !important;
  border-radius: 15px !important;
  background: radial-gradient(circle at 35% 30%, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 2px solid rgba(251, 191, 36, 0.85) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 16px rgba(251, 191, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.season-lobby-card:hover .season-league-badge-slot,
#btn-lobby-season:hover .season-league-badge-slot {
  transform: scale(1.08) rotate(-2deg) !important;
  border-color: #fef08a !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.7), 0 0 24px rgba(251, 191, 36, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.season-league-badge-slot .season-badge-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)) !important;
  animation: seasonBadgeIconFloat 3s ease-in-out infinite alternate !important;
}

.season-league-svg {
  display: block !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4)) !important;
}

@keyframes seasonBadgeIconFloat {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-2px);
  }
}

.season-lobby-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.season-lobby-tag {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.season-pill-live {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  color: #4ade80 !important;
  background: rgba(34, 197, 94, 0.16) !important;
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  padding: 1.5px 8px !important;
  border-radius: 8px !important;
  text-transform: uppercase !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2) !important;
}

.season-pill-live::before {
  content: "" !important;
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  box-shadow: 0 0 8px #22c55e !important;
  margin-right: 5px !important;
  animation: seasonLivePulse 1.8s infinite ease-in-out !important;
}

@keyframes seasonLivePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.season-timer-capsule {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  color: #cbd5e1 !important;
  font-weight: 700 !important;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif !important;
  letter-spacing: 0.2px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  border-radius: 20px !important;
  padding: 2px 9px !important;
  font-variant-numeric: tabular-nums !important;
}

.season-timer-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fbbf24 !important;
  animation: seasonHourglassSpin 6s ease-in-out infinite !important;
}

@keyframes seasonHourglassSpin {

  0%,
  85% {
    transform: rotate(0deg);
  }

  92%,
  100% {
    transform: rotate(180deg);
  }
}

.season-lobby-title {
  font-family: 'Cinzel', serif !important;
  font-size: 1.12rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  background: linear-gradient(135deg, #ffffff 20%, #fef08a 65%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.25) !important;
  margin: 1px 0 !important;
  line-height: 1.2 !important;
}

.season-lobby-cups {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.90rem !important;
  color: #fbbf24 !important;
}

.season-lobby-cups .cups-icon {
  font-size: 1.05rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.7)) !important;
}

.season-lobby-cups strong {
  font-size: 1.08rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.4px !important;
}

.cups-league-name {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(14, 165, 233, 0.08) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  padding: 1.5px 8px !important;
  border-radius: 8px !important;
  margin-left: 4px !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) !important;
  letter-spacing: 0.3px !important;
}

.season-lobby-right {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.season-road-preview {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(217, 119, 6, 0.22) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.42) !important;
  padding: 8px 15px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  letter-spacing: 0.3px !important;
}

.season-road-preview-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.4)) !important;
  transition: transform 0.25s ease !important;
}

.season-road-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fbbf24 !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
}

.season-lobby-card:hover .season-road-preview,
#btn-lobby-season:hover .season-road-preview {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.26) 0%, rgba(217, 119, 6, 0.42) 100%) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.season-lobby-card:hover .season-road-preview-icon,
#btn-lobby-season:hover .season-road-preview-icon {
  transform: scale(1.12) rotate(-3deg) !important;
}

.season-lobby-card:hover .season-road-arrow,
#btn-lobby-season:hover .season-road-arrow {
  transform: translateX(4px) !important;
  color: #ffffff !important;
}

@media (max-width: 640px) {

  .season-lobby-card,
  #btn-lobby-season {
    padding: 10px 14px !important;
    border-radius: 15px !important;
    margin: 8px 0 12px 0 !important;
  }

  .season-league-badge-slot {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.5rem !important;
    border-radius: 12px !important;
  }

  .season-lobby-left {
    gap: 12px !important;
  }

  .season-lobby-title {
    font-size: 0.98rem !important;
  }

  .season-road-preview {
    padding: 6px 10px !important;
    font-size: 0.74rem !important;
  }
}

/* ==========================================================================
   KMKZ Season Modal (Battle Season & Trophy Road) - Competitive Esports Theme
   ========================================================================== */

#modal-season.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000005 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(10px, 2.5vw, 24px) !important;
  background: radial-gradient(circle at 50% 18%, rgba(26, 38, 74, 0.72) 0%, rgba(8, 13, 26, 0.9) 60%, rgba(3, 5, 12, 0.97) 100%) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  box-sizing: border-box !important;
}

#modal-season.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modal-season.modal-overlay:not(.hidden) {
  animation: seasonOverlayFade 0.28s ease-out forwards;
}

@keyframes seasonOverlayFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.season-modal-container {
  width: 100% !important;
  max-width: 1040px !important;
  height: min(92dvh, 880px) !important;
  max-height: min(92dvh, 880px) !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  background: linear-gradient(180deg, #10172c 0%, #0a0e1c 45%, #060913 100%) !important;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.1) 0%, transparent 65%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) !important;
  background-size: 100% 100%, 28px 28px !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
  border-radius: 26px !important;
  box-shadow:
    0 30px 90px -10px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 45px -5px rgba(245, 158, 11, 0.25) !important;
  overflow: hidden !important;
  animation: seasonModalEntry 0.34s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.season-modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #fbbf24 50%, transparent 100%);
  z-index: 10;
  opacity: 0.95;
  box-shadow: 0 0 14px #fbbf24, 0 0 24px rgba(251, 191, 36, 0.6);
  pointer-events: none;
}

@keyframes seasonModalEntry {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Season Modal Header */
.season-modal-header {
  position: relative;
  padding: 18px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.25);
  background: linear-gradient(180deg, rgba(26, 36, 62, 0.9) 0%, rgba(13, 20, 38, 0.96) 100%);
  flex-shrink: 0;
  overflow: hidden;
}

.season-header-rays {
  position: absolute;
  top: -90px;
  left: 20px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, rgba(56, 189, 248, 0.12) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(35px);
  animation: seasonAuraPulse 6s ease-in-out infinite alternate;
}

@keyframes seasonAuraPulse {
  0% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.15) rotate(15deg);
    opacity: 1;
  }
}

.season-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
  min-width: 0;
}

.season-header-badge {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.32) 0%, rgba(180, 83, 9, 0.4) 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: seasonBadgeBob 4s ease-in-out infinite;
}

.season-header-badge:hover {
  transform: scale(1.06) rotate(3deg);
}

@keyframes seasonBadgeBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.season-header-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.season-super-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #fbbf24;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
  padding: 2px 9px;
  border-radius: 999px;
  width: fit-content;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.season-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: seasonLivePulse 1.8s infinite;
}

@keyframes seasonLivePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.season-modal-title {
  font-family: 'Cinzel', 'Outfit', serif;
  font-size: 1.65rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #fbbf24 80%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  margin: 3px 0 2px 0;
  letter-spacing: 0.8px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.season-modal-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 8px;
  margin-top: 4px;
  width: fit-content;
}

.season-header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.season-stat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(145deg, rgba(26, 36, 58, 0.9) 0%, rgba(13, 19, 34, 0.96) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.32);
  border-radius: 14px;
  padding: 7px 15px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.season-stat-chip:hover {
  border-color: rgba(251, 191, 36, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.2);
}

.season-stat-icon {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.season-stat-data {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.season-stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.season-stat-val {
  font-size: 1.22rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1.1;
  letter-spacing: 0.4px;
}

.season-modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: 6px;
}

.season-modal-close-btn svg {
  transition: transform 0.22s ease;
}

.season-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
}

.season-modal-close-btn:hover svg {
  transform: scale(1.05);
}

/* Season Modal Navigation Tabs */
.season-modal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: rgba(10, 14, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.season-tab-btn {
  background: rgba(26, 36, 58, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 9px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
  user-select: none;
}

.season-tab-btn .season-tab-icon {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.season-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.season-tab-btn:hover .season-tab-icon {
  transform: scale(1.15);
}

.season-tab-btn.active {
  color: #0b0f19 !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%) !important;
  font-weight: 900 !important;
  border-color: #fef08a !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45), inset 0 1px 1px #fff !important;
  transform: translateY(-1px) !important;
}

/* Season Modal Body Content */
.season-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 26px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.season-modal-body::-webkit-scrollbar {
  width: 8px;
}

.season-modal-body::-webkit-scrollbar-track {
  background: rgba(10, 15, 28, 0.5);
  border-radius: 4px;
}

.season-modal-body::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 4px;
}

.season-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.6);
}

/* Tab 1: Trophy Road */
.trophy-road-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trophy-road-league-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(24, 34, 60, 0.9) 0%, rgba(13, 20, 38, 0.96) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 18px;
  padding: 16px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  gap: 16px;
}

.trophy-road-league-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, transparent);
  opacity: 0.8;
}

.league-indicator-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.league-indicator-badge {
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5));
}

.league-indicator-title {
  font-size: 0.70rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.league-indicator-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.4px;
}

.league-indicator-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.league-progress-text {
  font-size: 0.80rem;
  color: #e2e8f0;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.league-progress-bar-wrap {
  width: 240px;
  height: 10px;
  background: rgba(5, 8, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  padding: 1.5px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
}

.league-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 45%, #fbbf24 85%, #f59e0b 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
  position: relative;
}

.trophy-road-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 2px;
}

.trophy-road-list::before {
  content: '';
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 45px;
  width: 3px;
  background: linear-gradient(180deg, #38bdf8 0%, #fbbf24 50%, #f59e0b 100%);
  opacity: 0.3;
  z-index: 0;
  border-radius: 3px;
}

.trophy-milestone-card {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(135deg, rgba(22, 32, 54, 0.75) 0%, rgba(13, 19, 34, 0.88) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  padding: 14px 20px !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  gap: 16px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.trophy-milestone-card:hover {
  transform: translateX(3px) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.trophy-milestone-card.unlocked {
  background: linear-gradient(135deg, rgba(26, 38, 70, 0.9) 0%, rgba(14, 22, 44, 0.96) 100%) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

.trophy-milestone-card.current {
  background: linear-gradient(135deg, rgba(38, 48, 80, 0.95) 0%, rgba(42, 36, 20, 0.9) 100%) !important;
  border: 1.8px solid #fbbf24 !important;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.35), inset 0 0 16px rgba(251, 191, 36, 0.12) !important;
  transform: scale(1.01) !important;
}

.trophy-milestone-card.claimed {
  background: rgba(10, 14, 26, 0.6) !important;
  border-color: rgba(34, 197, 94, 0.35) !important;
  opacity: 0.72 !important;
}

/* Rarity Enhancements */
.trophy-milestone-card.rarity-rare {
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.trophy-milestone-card.rarity-rare:hover {
  border-color: rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.25) !important;
}

.trophy-milestone-card.rarity-epic {
  border-color: rgba(192, 132, 252, 0.45) !important;
  background: linear-gradient(135deg, rgba(28, 22, 54, 0.8) 0%, rgba(16, 14, 38, 0.92) 100%) !important;
}

.trophy-milestone-card.rarity-epic:hover {
  border-color: rgba(192, 132, 252, 0.85) !important;
  box-shadow: 0 6px 26px rgba(192, 132, 252, 0.3) !important;
}

.trophy-milestone-card.rarity-legendary {
  border-color: rgba(251, 191, 36, 0.55) !important;
  background: linear-gradient(135deg, rgba(38, 30, 20, 0.85) 0%, rgba(18, 16, 30, 0.95) 100%) !important;
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.15) !important;
}

.trophy-milestone-card.rarity-legendary:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.4) !important;
}

.trophy-milestone-card.rarity-mythic {
  border: 1.8px solid rgba(239, 68, 68, 0.6) !important;
  background: linear-gradient(135deg, rgba(46, 16, 26, 0.9) 0%, rgba(24, 12, 34, 0.96) 100%) !important;
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.25), inset 0 0 20px rgba(251, 191, 36, 0.1) !important;
}

.trophy-milestone-card.rarity-mythic:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 10px 34px rgba(239, 68, 68, 0.45), 0 0 20px rgba(251, 191, 36, 0.35) !important;
}

.milestone-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.milestone-trophy-badge {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 58px !important;
  background: linear-gradient(145deg, #182236 0%, #0d1424 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  flex-shrink: 0 !important;
}

.milestone-trophy-badge.rarity-rare {
  border-color: rgba(56, 189, 248, 0.6) !important;
}

.milestone-trophy-badge.rarity-epic {
  border-color: rgba(192, 132, 252, 0.7) !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25) !important;
}

.milestone-trophy-badge.rarity-legendary {
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35) !important;
}

.milestone-trophy-badge.rarity-mythic {
  border-color: #ef4444 !important;
  background: linear-gradient(145deg, #2c121c 0%, #15091a 100%) !important;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.4) !important;
}

.milestone-trophy-badge .icon {
  font-size: 1.15rem !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4)) !important;
}

.milestone-trophy-badge .val {
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  line-height: 1 !important;
  letter-spacing: 0.4px !important;
}

.milestone-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.milestone-tags-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.milestone-league-tag {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
}

.milestone-rarity-pill {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.milestone-rarity-pill.common {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.milestone-rarity-pill.rare {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2) !important;
}

.milestone-rarity-pill.epic {
  background: rgba(192, 132, 252, 0.22) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.25) !important;
}

.milestone-rarity-pill.legendary {
  background: rgba(251, 191, 36, 0.22) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.6) !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35) !important;
}

.milestone-rarity-pill.mythic {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(245, 158, 11, 0.3)) !important;
  color: #fef08a !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
}

.milestone-reward-title {
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.2px !important;
}

.milestone-reward-desc {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.milestone-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.btn-milestone-claim {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 60%, #15803d 100%) !important;
  color: #ffffff !important;
  border: 1px solid #86efac !important;
  font-weight: 900 !important;
  font-size: 0.85rem !important;
  padding: 9px 22px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.45), inset 0 1px 1px #fff;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  animation: pulseClaimBtn 2s infinite ease-in-out;
}

@keyframes pulseClaimBtn {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.45);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.7);
  }
}

.btn-milestone-claim:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.75);
}

.milestone-status-tag {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

.milestone-status-tag.locked {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.milestone-status-tag.claimed-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

/* Tap-to-open indicator for unclaimed unlocked rewards across reward tracks */
.reward-tap-open-hint {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #fde047 !important;
  background: rgba(250, 204, 21, 0.14) !important;
  border: 1px solid rgba(250, 204, 21, 0.45) !important;
  border-radius: 999px !important;
  padding: 2px 7px !important;
  width: fit-content !important;
  max-width: 100% !important;
  line-height: 1.15 !important;
  letter-spacing: 0.2px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  animation: kmkzTapHintPulse 1.8s ease-in-out infinite !important;
}

.reward-tap-open-hint svg {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0 !important;
  color: #fde047 !important;
}

.bp-tap-open-hint {
  margin: 2px auto 0 auto !important;
  font-size: 0.64rem !important;
  padding: 2px 6px !important;
}

@keyframes kmkzTapHintPulse {
  0%, 100% {
    opacity: 0.88;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
  }
}

@media (max-width: 420px) {
  .reward-tap-open-hint {
    font-size: 0.62rem !important;
    padding: 1.5px 6px !important;
    gap: 3px !important;
  }
  .reward-tap-open-hint svg {
    width: 11px !important;
    height: 11px !important;
  }
}

/* Tab 2: Leaderboard */
.season-leaderboard-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Season Top 3 Podium Container */
.season-podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 0 0 16px 0;
  padding: 20px 12px 14px 12px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(251, 191, 36, 0.16) 0%, rgba(30, 41, 59, 0.55) 45%, rgba(15, 23, 42, 0.92) 100%);
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.season-podium-container::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 90px;
  background: radial-gradient(ellipse, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(18px);
}

.season-podium-card {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px 8px 6px;
  border-radius: 16px;
  position: relative;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  user-select: none;
  z-index: 1;
}

.season-podium-card:hover {
  transform: translateY(-4px) scale(1.02);
}

.season-podium-card:active {
  transform: scale(0.98);
}

.season-podium-card.second {
  order: 1;
  min-height: 175px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.20) 0%, rgba(148, 163, 184, 0.08) 35%, rgba(15, 23, 42, 0.94) 100%);
  border: 1.5px solid rgba(203, 213, 225, 0.6);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.15);
}

.season-podium-card.first {
  order: 2;
  min-height: 206px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.26) 0%, rgba(245, 158, 11, 0.12) 35%, rgba(15, 23, 42, 0.96) 100%);
  border: 2px solid rgba(251, 191, 36, 0.88);
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.28), 0 0 18px rgba(251, 191, 36, 0.18), inset 0 1px 0 rgba(254, 240, 138, 0.5);
  z-index: 2;
}

.season-podium-card.third {
  order: 3;
  min-height: 158px;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.20) 0%, rgba(180, 83, 9, 0.08) 35%, rgba(15, 23, 42, 0.94) 100%);
  border: 1.5px solid rgba(217, 119, 6, 0.6);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.15);
}

.season-podium-rank-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
  line-height: 1;
  white-space: nowrap;
}

.season-podium-rank-tag.first {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  color: #0f172a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.season-podium-rank-tag.second {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  color: #0f172a;
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.4);
}

.season-podium-rank-tag.third {
  background: linear-gradient(135deg, #fed7aa 0%, #ea580c 50%, #9a3412 100%);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.4);
}

.season-podium-avatar-wrap {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.season-podium-avatar-frame {
  width: 44px;
  height: 44px;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
  box-sizing: border-box;
  box-shadow: none !important;
  border: none !important;
}

.season-podium-avatar-frame.first {
  width: 54px;
  height: 54px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.season-podium-avatar-frame.second {
  width: 44px;
  height: 44px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.season-podium-avatar-frame.third {
  width: 42px;
  height: 42px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.season-podium-avatar-frame svg,
.season-podium-avatar-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important;
  overflow: visible !important;
}

.season-podium-avatar-frame .avatar-fallback-glyph {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
  font-size: 1.5rem !important;
  user-select: none !important;
}

.season-podium-avatar-frame.first .avatar-fallback-glyph {
  font-size: 1.85rem !important;
}

.season-podium-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  margin-bottom: 3px;
  padding: 0 2px;
}

.season-podium-card.first .season-podium-name {
  font-size: 0.90rem;
  color: #fffde7;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
}

.season-podium-league-pill {
  font-size: 0.7rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.season-podium-trophies-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: 'Outfit', sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  color: #f8fafc;
  margin-bottom: 6px;
  white-space: nowrap;
}

.season-podium-trophies-pill.first {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.season-podium-trophies-pill.second {
  border-color: rgba(203, 213, 225, 0.4);
  color: #e2e8f0;
}

.season-podium-trophies-pill.third {
  border-color: rgba(217, 119, 6, 0.4);
  color: #fed7aa;
}

.season-podium-pedestal {
  width: 100%;
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.season-podium-pedestal .pedestal-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.85;
}

.season-podium-pedestal.first .pedestal-num {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.season-podium-pedestal.second .pedestal-num {
  color: #cbd5e1;
  text-shadow: 0 0 6px rgba(203, 213, 225, 0.4);
}

.season-podium-pedestal.third .pedestal-num {
  color: #ea580c;
  text-shadow: 0 0 6px rgba(234, 88, 12, 0.4);
}

/* Season Leaderboard Table */
.season-leaderboard-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  border-radius: 16px;
  background: rgba(10, 16, 30, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 4px 6px;
}

.season-leaderboard-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 6px;
  box-sizing: border-box;
  table-layout: auto;
}

.season-leaderboard-table th {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fbbf24;
  letter-spacing: 0.6px;
  padding: 8px 12px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.season-leaderboard-table th.season-col-trophies,
.season-leaderboard-table td.season-col-trophies {
  text-align: right;
}

.season-leaderboard-table td {
  padding: 9px 12px;
  background: rgba(18, 25, 46, 0.72);
  font-size: 0.88rem;
  color: #cbd5e1;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.season-leaderboard-table tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.season-leaderboard-table tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.season-leaderboard-table tr:hover td {
  background: rgba(30, 42, 74, 0.9);
  color: #ffffff;
}

.season-leaderboard-table tr.top-1 td {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.22) 0%, rgba(20, 28, 52, 0.85) 100%);
  border-color: rgba(251, 191, 36, 0.45);
}

.season-leaderboard-table tr.top-1 td:first-child {
  border-left: 3px solid #fbbf24;
}

.season-leaderboard-table tr.top-2 td {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.18) 0%, rgba(20, 28, 52, 0.85) 100%);
  border-color: rgba(203, 213, 225, 0.35);
}

.season-leaderboard-table tr.top-2 td:first-child {
  border-left: 3px solid #cbd5e1;
}

.season-leaderboard-table tr.top-3 td {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.18) 0%, rgba(20, 28, 52, 0.85) 100%);
  border-color: rgba(217, 119, 6, 0.35);
}

.season-leaderboard-table tr.top-3 td:first-child {
  border-left: 3px solid #d97706;
}

.season-leaderboard-table tr.is-me td {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22) 0%, rgba(20, 28, 52, 0.9) 100%);
  border-color: rgba(56, 189, 248, 0.6);
}

.season-leaderboard-table tr.is-me td:first-child {
  border-left: 3px solid #38bdf8;
}

.leaderboard-rank-pill {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.85);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.leaderboard-rank-pill.top-1,
.top-1 .leaderboard-rank-pill {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0b0f19;
  font-weight: 900;
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.leaderboard-rank-pill.top-2,
.top-2 .leaderboard-rank-pill {
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  color: #0b0f19;
  font-weight: 900;
  border-color: #e2e8f0;
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.5);
}

.leaderboard-rank-pill.top-3,
.top-3 .leaderboard-rank-pill {
  background: linear-gradient(135deg, #fed7aa, #ea580c);
  color: #ffffff;
  font-weight: 900;
  border-color: #f97316;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}

.leaderboard-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-avatar-slot {
  width: 34px !important;
  height: 34px !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.leaderboard-avatar-slot svg,
.leaderboard-avatar-slot img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important;
  overflow: visible !important;
}

.leaderboard-avatar-slot .avatar-fallback-glyph {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
  font-size: 1.15rem !important;
  user-select: none !important;
}

.leaderboard-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.leaderboard-player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.leaderboard-player-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-player-sub-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.70rem;
  white-space: nowrap;
}

.season-trophies-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  color: #fbbf24;
  white-space: nowrap;
}

.season-stat-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 700;
}

@media (max-width: 640px) {
  .season-podium-container {
    padding: 12px 6px 10px 6px;
    gap: 6px;
    border-radius: 16px;
  }

  .season-podium-card {
    padding: 8px 4px 6px 4px;
    border-radius: 12px;
  }

  .season-podium-card.first {
    min-height: 165px;
  }

  .season-podium-card.second {
    min-height: 145px;
  }

  .season-podium-card.third {
    min-height: 132px;
  }

  .season-podium-avatar-frame.first {
    width: 44px;
    height: 44px;
  }

  .season-podium-avatar-frame.second,
  .season-podium-avatar-frame.third {
    width: 36px;
    height: 36px;
  }

  .season-podium-avatar-frame .avatar-fallback-glyph {
    font-size: 1.25rem !important;
  }

  .season-podium-avatar-frame.first .avatar-fallback-glyph {
    font-size: 1.5rem !important;
  }

  .season-podium-name {
    font-size: 0.74rem;
  }

  .season-podium-card.first .season-podium-name {
    font-size: 0.80rem;
  }

  .season-podium-league-pill {
    font-size: 0.7rem;
    padding: 1px 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .season-podium-trophies-pill {
    font-size: 0.7rem;
    padding: 2px 5px;
    white-space: nowrap;
  }

  .season-leaderboard-table {
    min-width: 0 !important;
    width: 100% !important;
    border-spacing: 0 4px;
  }

  .season-leaderboard-table th {
    padding: 7px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.4px;
  }

  .season-leaderboard-table td {
    padding: 7px 8px;
    font-size: 0.80rem;
  }

  .leaderboard-rank-pill {
    width: 26px;
    height: 26px;
    font-size: 0.74rem;
  }

  .leaderboard-player-cell {
    gap: 7px;
  }

  .leaderboard-avatar-slot {
    width: 28px !important;
    height: 28px !important;
  }

  .leaderboard-avatar-slot .avatar-fallback-glyph {
    font-size: 1rem !important;
  }

  .leaderboard-player-name {
    font-size: 0.80rem;
  }
}

@media (max-width: 560px) {

  th.season-col-elo,
  td.season-col-elo,
  th.season-col-wins,
  td.season-col-wins {
    display: none !important;
  }

  .leaderboard-player-sub-mobile {
    display: flex !important;
  }
}

@media (max-width: 440px) {

  th.season-col-league,
  td.season-col-league {
    display: none !important;
  }

  .season-mobile-trophies {
    display: none !important;
  }

  .season-col-rank {
    width: 32px !important;
    min-width: 32px !important;
    padding: 5px 3px !important;
  }

  .season-col-trophies {
    width: 76px !important;
    min-width: 76px !important;
    text-align: right !important;
    padding: 5px 4px !important;
  }

  .season-trophies-val {
    font-size: 0.74rem !important;
  }

  .season-col-player {
    padding: 5px 4px !important;
  }

  .season-podium-container {
    padding: 8px 4px 6px 4px !important;
    gap: 4px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
  }

  .season-podium-card {
    padding: 6px 2px 4px 2px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    flex: 1 1 0% !important;
  }

  .season-podium-card.first {
    min-height: 148px !important;
  }

  .season-podium-card.second {
    min-height: 132px !important;
  }

  .season-podium-card.third {
    min-height: 120px !important;
  }

  .season-podium-rank-tag {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
    gap: 2px !important;
    margin-bottom: 3px !important;
  }

  .season-podium-avatar-frame.first {
    width: 38px !important;
    height: 38px !important;
  }

  .season-podium-avatar-frame.second,
  .season-podium-avatar-frame.third {
    width: 30px !important;
    height: 30px !important;
  }

  .season-podium-avatar-frame .avatar-fallback-glyph {
    font-size: 1.05rem !important;
  }

  .season-podium-avatar-frame.first .avatar-fallback-glyph {
    font-size: 1.25rem !important;
  }

  .season-podium-name {
    font-size: 0.7rem !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.15 !important;
    margin-bottom: 2px !important;
  }

  .season-podium-card.first .season-podium-name {
    font-size: 0.74rem !important;
  }

  .season-podium-league-pill {
    font-size: 0.7rem !important;
    padding: 1px 3px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
  }

  .season-podium-trophies-pill {
    font-size: 0.7rem !important;
    padding: 1px 4px !important;
    gap: 2px !important;
    white-space: nowrap !important;
    margin-bottom: 3px !important;
  }

  .season-podium-pedestal {
    padding-top: 2px !important;
  }

  .season-podium-pedestal .pedestal-num {
    font-size: 0.85rem !important;
  }

  .leaderboard-rank-pill {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.7rem !important;
  }

  .leaderboard-avatar-slot {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  .leaderboard-avatar-slot .avatar-fallback-glyph {
    font-size: 0.90rem !important;
  }

  .leaderboard-player-cell {
    gap: 6px !important;
  }

  .leaderboard-player-name {
    font-size: 0.76rem !important;
  }
}

@media (max-width: 360px) {
  .season-podium-container {
    padding: 6px 3px 6px 3px !important;
    gap: 3px !important;
  }

  .season-podium-card.first {
    min-height: 140px !important;
  }

  .season-podium-card.second {
    min-height: 125px !important;
  }

  .season-podium-card.third {
    min-height: 114px !important;
  }

  .season-podium-avatar-frame.first {
    width: 34px !important;
    height: 34px !important;
  }

  .season-podium-avatar-frame.second,
  .season-podium-avatar-frame.third {
    width: 28px !important;
    height: 28px !important;
  }

  .season-podium-avatar-frame .avatar-fallback-glyph {
    font-size: 0.95rem !important;
  }

  .season-podium-avatar-frame.first .avatar-fallback-glyph {
    font-size: 1.1rem !important;
  }

  .season-podium-name {
    font-size: 0.7rem !important;
  }

  .season-podium-league-pill {
    font-size: 0.7rem !important;
  }

  .season-podium-trophies-pill {
    font-size: 0.7rem !important;
    padding: 1px 3px !important;
  }

  .season-col-trophies {
    width: 68px !important;
    min-width: 68px !important;
  }

  .season-trophies-val {
    font-size: 0.70rem !important;
  }
}

/* Tab 3: Leagues Grid & Rules */
.season-leagues-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.season-rules-box {
  background: linear-gradient(135deg, rgba(22, 31, 56, 0.85) 0%, rgba(12, 17, 32, 0.95) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.25);
  border-left: 4px solid #fbbf24;
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.season-rules-box h4 {
  font-size: 0.90rem;
  color: #fbbf24;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.season-rules-box p {
  font-size: 0.80rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0;
}

.season-leagues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.season-league-info-card {
  background: linear-gradient(145deg, rgba(24, 34, 60, 0.75) 0%, rgba(13, 19, 36, 0.92) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.season-league-info-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.season-league-info-card.active-user-league {
  border: 2px solid #fbbf24;
  background: linear-gradient(145deg, rgba(35, 48, 85, 0.94) 0%, rgba(20, 28, 52, 0.98) 100%);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.season-league-info-card.active-user-league::after {
  content: 'TU LIGA ACTUAL';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0b0f19;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.league-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.league-card-badge {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.league-card-title-wrap {
  display: flex;
  flex-direction: column;
}

.league-card-name {
  font-size: 1.10rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.league-card-req {
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 800;
}

.league-card-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 14, 26, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.league-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.league-stat-label {
  color: #94a3b8;
  font-weight: 700;
}

.league-stat-val {
  font-weight: 900;
  color: #ffffff;
}

.league-stat-val.win-bonus {
  color: #4ade80;
}

.league-stat-val.loss-shield {
  color: #38bdf8;
}

.season-reward-highlight-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 2px;
}

.league-reward-perks-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
}

.league-perk-item {
  font-size: 0.74rem;
  color: #fef08a;
  font-weight: 700;
  line-height: 1.35;
}

/* Season Reward Banner */
.season-reward-banner-card {
  background: linear-gradient(135deg, rgba(35, 48, 85, 0.95), rgba(18, 26, 48, 0.98));
  border: 2px solid rgba(251, 191, 36, 0.6);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(251, 191, 36, 0.25);
}

.season-reward-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.75));
  animation: seasonBadgeBob 3s ease-in-out infinite;
}

.season-reward-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.season-reward-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  max-width: 520px;
  line-height: 1.45;
}

.btn-claim-season-grand {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  color: #0b0f19;
  border: 1px solid #fef08a;
  font-weight: 900;
  font-size: 0.96rem;
  padding: 12px 28px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5), inset 0 1px 1px #fff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.5px;
}

.btn-claim-season-grand:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.7);
}

/* Responsive Media Queries */
@media (max-width: 860px) {
  .season-modal-container {
    height: 94dvh !important;
    max-height: 94dvh !important;
    border-radius: 20px !important;
  }

  .season-modal-header {
    padding: 16px 20px;
    gap: 14px;
  }

  .season-header-badge {
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
    border-radius: 14px;
  }

  .season-modal-title {
    font-size: 1.35rem;
  }

  .season-modal-tabs {
    padding: 10px 18px;
  }

  .season-modal-body {
    padding: 16px 18px;
  }

  .league-progress-bar-wrap {
    width: 170px;
  }
}

@media (max-width: 640px) {
  #modal-season.modal-overlay {
    padding: 8px !important;
  }

  .season-modal-container {
    height: 96dvh !important;
    max-height: 96dvh !important;
    border-radius: 18px !important;
  }

  .season-modal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 16px 14px 16px;
  }

  .season-header-main {
    width: 100%;
  }

  .season-header-stats {
    width: 100%;
    justify-content: space-between;
  }

  .season-stat-chip {
    flex: 1;
    padding: 6px 10px;
    gap: 6px;
  }

  .season-stat-icon {
    font-size: 1.1rem;
  }

  .season-stat-val {
    font-size: 1.05rem;
  }

  .season-modal-tabs {
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .season-modal-tabs::-webkit-scrollbar {
    display: none;
  }

  .season-tab-btn {
    padding: 7px 14px;
    font-size: 0.80rem;
    white-space: nowrap;
    border-radius: 10px;
  }

  .season-modal-body {
    padding: 14px 12px;
  }

  .trophy-road-league-indicator {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 12px;
  }

  .league-indicator-right {
    width: 100%;
    align-items: stretch;
  }

  .league-progress-bar-wrap {
    width: 100%;
  }

  .trophy-road-list {
    gap: 8px !important;
    padding-left: 0 !important;
  }

  .trophy-road-list::before {
    left: 29px !important;
  }

  /* Milestone Card Mobile - Resilient Grid layout (Same logic as Camino de Niveles) */
  .trophy-milestone-card {
    display: grid !important;
    grid-template-columns: 38px 1fr auto !important;
    grid-template-areas: "indicator info action" !important;
    align-items: center !important;
    gap: 8px 10px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 50px !important;
  }

  .milestone-trophy-badge {
    grid-area: indicator !important;
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  .milestone-trophy-badge .icon {
    font-size: 0.85rem !important;
    line-height: 1 !important;
  }

  .milestone-trophy-badge .val {
    font-size: 0.7rem !important;
    line-height: 1 !important;
    margin-top: 1px !important;
  }

  .milestone-info {
    grid-area: info !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  .milestone-tags-row {
    gap: 5px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }

  .milestone-league-tag {
    font-size: 0.7rem !important;
    line-height: 1 !important;
    letter-spacing: 0.3px !important;
  }

  .milestone-rarity-pill {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
    line-height: 1.1 !important;
    letter-spacing: 0.2px !important;
  }

  .milestone-reward-title {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .milestone-reward-desc {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    color: #94a3b8 !important;
  }

  .milestone-right {
    grid-area: action !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .btn-milestone-claim {
    grid-area: action !important;
    flex-shrink: 0 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    padding: 6px 11px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    min-height: 30px !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
  }

  .milestone-status-tag {
    grid-area: action !important;
    flex-shrink: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

/* Ultra-compact Mobile Screens (< 420px) */
@media (max-width: 420px) {
  .trophy-road-list {
    gap: 6px !important;
  }

  .trophy-road-list::before {
    left: 25px !important;
  }

  .trophy-milestone-card {
    grid-template-columns: 32px 1fr auto !important;
    padding: 4px 8px !important;
    min-height: 38px !important;
    gap: 6px 8px !important;
  }

  .milestone-trophy-badge {
    min-width: 30px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 7px !important;
  }

  .milestone-trophy-badge .icon {
    font-size: 0.75rem !important;
  }

  .milestone-trophy-badge .val {
    font-size: 0.7rem !important;
  }

  .milestone-reward-title {
    font-size: 0.74rem !important;
  }

  .milestone-reward-desc {
    font-size: 0.7rem !important;
  }

  .btn-milestone-claim {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    min-height: 24px !important;
  }

  .milestone-status-tag {
    font-size: 0.7rem !important;
    padding: 3px 6px !important;
  }
}

/* ==========================================================================
   MODERN ACCESSIBLE PROFILE CUSTOMIZATION MODAL (3 SECTIONS: TÍTULO, NOMBRE, AVATAR)
   ========================================================================== */

.modal-custom-profile-glass {
  width: min(680px, 95vw) !important;
  max-width: 680px !important;
  height: auto !important;
  max-height: min(92dvh, 780px) !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(9, 14, 26, 0.99) 100%) !important;
  border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
  border-radius: 20px !important;
  padding: 12px 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 28px rgba(251, 191, 36, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  gap: 6px !important;
}

.profile-modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 6px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.profile-modal-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.profile-modal-title {
  color: #fbbf24 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.05rem !important;
  margin: 0 !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
}

.profile-modal-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #94a3b8 !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  flex-shrink: 0 !important;
  transform: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.profile-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1) !important;
}

.profile-modal-close-btn:active {
  background: rgba(255, 255, 255, 0.24) !important;
  transform: none !important;
}

/* ── 3 Main Navigation Tabs ─────────────────────────────────── */
.profile-custom-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px !important;
  margin-bottom: 0 !important;
  background: rgba(10, 16, 30, 0.85) !important;
  padding: 3px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.profile-custom-tabs.profile-tabs-dual {
  grid-template-columns: 1fr 1fr !important;
}

.profile-custom-tab-btn {
  height: 42px !important;
  padding: 0 4px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  outline: none !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.profile-custom-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

.profile-custom-tab-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 1px !important;
}

.profile-custom-tab-btn.active#btn-tab-profile-titles {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.28) 0%, rgba(245, 158, 11, 0.16) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 3px 12px rgba(251, 191, 36, 0.3) !important;
}

.profile-custom-tab-btn.active#btn-tab-profile-name {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28) 0%, rgba(14, 165, 233, 0.16) 100%) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.3) !important;
}

.profile-custom-tab-btn.active#btn-tab-profile-hexbot,
.profile-custom-tab-btn.active#btn-tab-profile-builder {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.28) 0%, rgba(0, 180, 216, 0.16) 100%) !important;
  color: #00f0ff !important;
  border-color: rgba(0, 240, 255, 0.6) !important;
  box-shadow: 0 3px 14px rgba(0, 240, 255, 0.35) !important;
}

.profile-custom-tab-btn.active#btn-tab-profile-hexframe {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.28) 0%, rgba(217, 119, 6, 0.16) 100%) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  box-shadow: 0 3px 12px rgba(251, 191, 36, 0.3) !important;
}

.profile-custom-tab-btn.active#btn-tab-profile-avatar {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(147, 51, 234, 0.16) 100%) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.55) !important;
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.3) !important;
}

.tab-badge-icon {
  font-size: 0.92rem !important;
  line-height: 1 !important;
}

/* ── Panel 2: Nombre de Jugador ─────────────────────────────── */
#panel-profile-name {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  gap: 14px;
}

.profile-name-edit-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(8, 14, 28, 0.96) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.profile-name-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
}

.profile-name-label {
  font-size: 0.80rem !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.profile-name-char-count {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
}

.profile-name-input-group {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
}

#input-custom-profile-username {
  flex: 1 !important;
  padding: 10px 14px !important;
  background: rgba(2, 6, 23, 0.88) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  font-family: 'Outfit', sans-serif !important;
  box-sizing: border-box !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#input-custom-profile-username:focus {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45) !important;
  background: rgba(4, 10, 32, 0.95) !important;
}

#btn-save-profile-username {
  padding: 0 20px !important;
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  border: 1px solid #7dd3fc !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btn-save-profile-username:hover {
  transform: translateY(-1.5px) !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6) !important;
}

#btn-save-profile-username:active {
  transform: translateY(0.5px) !important;
}

.profile-name-guideline-text {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.4 !important;
  margin-top: 8px !important;
}

.profile-name-preview-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 12px 6px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.profile-name-preview-avatar {
  width: 90px !important;
  height: 90px !important;
  min-width: 90px !important;
  min-height: 90px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 3.6rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.profile-name-preview-avatar svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 90px !important;
  max-height: 90px !important;
  display: block !important;
}

.profile-name-preview-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 4px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.profile-name-preview-chip {
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.4px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6) !important;
}

.profile-name-preview-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ── Panel 3: Avatar Sub-Navigation & Switcher ─────────────── */
.avatar-subtabs-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 3px !important;
  flex-shrink: 0 !important;
}

.avatar-subtab-btn {
  height: 38px !important;
  padding: 0 6px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  border-radius: 9px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  outline: none !important;
}

.avatar-subtab-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.avatar-subtab-btn.active#subtab-avatar-icons {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2) !important;
}

.avatar-subtab-btn.active#subtab-avatar-hexbot {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2) !important;
}

.avatar-subtab-btn.active#subtab-avatar-hexframe {
  background: rgba(251, 191, 36, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fbbf24 !important;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.2) !important;
}

.avatar-subpanel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .modal-custom-profile-glass {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 96dvh !important;
    padding: 8px 10px !important;
    border-radius: 16px !important;
    gap: 5px !important;
  }

  .profile-custom-tabs {
    gap: 3px !important;
    padding: 2px !important;
    margin-bottom: 0 !important;
  }

  .profile-custom-tab-btn {
    height: 30px !important;
    font-size: 0.70rem !important;
    gap: 3px !important;
    padding: 0 2px !important;
  }

  .profile-custom-tab-btn .tab-badge-icon {
    font-size: 0.82rem !important;
  }

  .hexbot-showcase-stage,
  .hexframe-showcase-stage {
    padding: 8px 6px 10px 6px !important;
    margin-bottom: 8px !important;
  }

  .hexframe-frames-grid,
  .hexframe-auras-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    gap: 6px !important;
  }
}

@media (max-width: 400px) {
  .profile-custom-tab-btn {
    font-size: 0.7rem !important;
    padding: 0 1px !important;
    letter-spacing: -0.3px !important;
  }

  .profile-custom-tab-btn .tab-badge-icon {
    font-size: 0.76rem !important;
  }
}

/* ==========================================================================
   HEXBOT STUDIO CATEGORY TABS (2 ROWS BALANCED FLEX LAYOUT)
   ========================================================================== */
#hexbot-category-tabs,
.hexbot-category-tabs-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  overflow-x: visible !important;
  padding-bottom: 2px !important;
  margin-bottom: 10px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.hexbot-cat-tab-btn {
  flex: 1 1 calc(25% - 6px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 6px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  gap: 4px !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.hexbot-cat-tab-btn:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

@media (max-width: 480px) {

  #hexbot-category-tabs,
  .hexbot-category-tabs-row {
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .hexbot-cat-tab-btn {
    flex: 1 1 calc(25% - 4px) !important;
    padding: 6px 3px !important;
    font-size: 0.70rem !important;
    gap: 3px !important;
    border-radius: 8px !important;
  }

  .hexbot-cat-tab-btn span:first-child {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 360px) {
  .hexbot-cat-tab-btn {
    padding: 5px 2px !important;
    font-size: 0.7rem !important;
    gap: 2px !important;
  }
}

/* ==========================================================================
   CYBER AVATAR STUDIO & PROFILE CUSTOMIZATION RESPONSIVE SYSTEM
   ========================================================================== */

#cyberav-category-tabs,
.cyberav-category-tabs-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  padding: 4px 4px 8px 4px !important;
  margin-bottom: 8px !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  scroll-behavior: smooth !important;
  scroll-padding: 0 12px !important;
}

#cyberav-category-tabs::-webkit-scrollbar,
.cyberav-category-tabs-row::-webkit-scrollbar {
  display: none !important;
}

.cyberav-cat-btn {
  flex: 0 0 auto !important;
  padding: 6px 14px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.75) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  user-select: none !important;
  outline: none !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.cyberav-cat-btn:hover {
  border-color: rgba(0, 240, 255, 0.45) !important;
  color: #f1f5f9 !important;
  background: rgba(30, 41, 59, 0.9) !important;
  transform: translateY(-1px) !important;
}

.cyberav-cat-btn.active {
  border-color: var(--cyberav-theme-color, #00f0ff) !important;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(0, 180, 216, 0.14) 100%) !important;
  color: var(--cyberav-theme-color, #00f0ff) !important;
  font-weight: 900 !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.cyberav-cat-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.cyberav-cat-icon svg {
  width: 15px !important;
  height: 15px !important;
}

/* Cyber Avatar Showcase Stage Responsive Styles */
.cyberav-showcase-stage {
  position: relative !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.cyberav-stage-circle-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: width 0.2s ease, height 0.2s ease !important;
}

.cyberav-stage-preview {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cyberav-stage-preview svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Cyber Cards (Items, Colors, Presets, Frames) */
.cyberav-item-card,
.cyberav-color-card,
.cyberav-preset-card,
.cyberav-frame-card {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
  user-select: none !important;
}

.cyberav-item-card:hover,
.cyberav-color-card:hover,
.cyberav-preset-card:hover,
.cyberav-frame-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(0, 240, 255, 0.45) !important;
  background: rgba(30, 41, 59, 0.92) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

.cyberav-item-card.active,
.cyberav-color-card.active {
  border-color: var(--cyberav-theme-color, #00f0ff) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.15) !important;
}

/* ═════════════════════════════════════════════════════════════════════
   HEXAGONAL FRAME & AURA CUSTOMIZER PANEL STYLES (Cyber Studio)
   ═════════════════════════════════════════════════════════════════════ */
.cyberav-hexframe-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding: 6px 2px 14px 2px !important;
}

.cyberav-section-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
}

.cyberav-section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

.cyberav-section-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #94a3b8 !important;
}

.cyberav-hexframes-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  gap: 10px !important;
}

.cyberav-frame-card {
  position: relative !important;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.94) 0%, rgba(10, 15, 29, 0.98) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 10px 8px 9px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
  overflow: hidden !important;
  user-select: none !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.cyberav-frame-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent 0%, var(--frame-rarity-color, #fbbf24) 50%, transparent 100%) !important;
  opacity: 0.45 !important;
  transition: opacity 0.2s ease !important;
}

.cyberav-frame-card:hover {
  transform: translateY(-3px) scale(1.02) !important;
  border-color: var(--frame-rarity-color, rgba(251, 191, 36, 0.6)) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.99) 100%) !important;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.6), 0 0 18px var(--frame-rarity-color, rgba(251, 191, 36, 0.35)) !important;
}

.cyberav-frame-card:hover::before {
  opacity: 0.9 !important;
}

.cyberav-frame-card.active {
  border-color: var(--frame-rarity-color, #fbbf24) !important;
  background: linear-gradient(160deg, rgba(24, 33, 56, 0.98) 0%, rgba(12, 18, 36, 0.99) 100%) !important;
  box-shadow: 0 0 24px var(--frame-rarity-color, rgba(251, 191, 36, 0.45)), inset 0 0 14px var(--frame-rarity-color, rgba(251, 191, 36, 0.2)) !important;
}

.cyberav-frame-card.active::before {
  opacity: 1 !important;
  height: 3px !important;
}

.cyberav-frame-preview-box {
  width: 58px !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.22s ease !important;
}

.cyberav-frame-card:hover .cyberav-frame-preview-box {
  transform: scale(1.06) !important;
}

.cyberav-frame-name-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 100% !important;
}

.cyberav-frame-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 108px !important;
  letter-spacing: 0.2px !important;
}

.cyberav-rarity-pill {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  text-transform: uppercase !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.cyberav-frame-card.active .cyberav-rarity-pill {
  color: #4ade80 !important;
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3) !important;
}

/* Aura Buttons Grid */
.cyberav-auras-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 8px !important;
}

.cyberav-aura-btn {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  padding: 8px 11px !important;
  border-radius: 12px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.7) !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
}

.cyberav-aura-btn:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.cyberav-aura-btn.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(2, 132, 199, 0.12) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.cyberav-aura-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.3px !important;
}

.cyberav-aura-btn.active .cyberav-aura-name {
  color: #38bdf8 !important;
}

.cyberav-aura-desc {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .cyberav-showcase-stage {
    padding: 8px 8px 10px 8px !important;
    margin-bottom: 8px !important;
    border-radius: 14px !important;
  }

  .cyberav-stage-circle-wrap {
    width: 86px !important;
    height: 86px !important;
    margin: 1px 0 4px 0 !important;
  }

  .cyberav-stage-preview {
    width: 74px !important;
    height: 74px !important;
  }

  #cyberav-pedestal-glow {
    width: 70px !important;
    height: 12px !important;
  }

  #cyberav-pedestal-ring {
    width: 58px !important;
    height: 8px !important;
  }

  #btn-cyberav-randomize,
  #btn-cyberav-reset {
    padding: 5px 12px !important;
    font-size: 0.72rem !important;
  }

  #cyberav-category-tabs,
  .cyberav-category-tabs-row {
    gap: 5px !important;
    padding: 2px 2px 6px 2px !important;
    margin-bottom: 6px !important;
  }

  .cyberav-cat-btn {
    padding: 5px 11px !important;
    font-size: 0.72rem !important;
    gap: 5px !important;
  }

  .cyberav-cat-icon {
    width: 14px !important;
    height: 14px !important;
  }

  .cyberav-presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 6px !important;
  }

  .cyberav-colors-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)) !important;
    gap: 6px !important;
  }

  .cyberav-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)) !important;
    gap: 6px !important;
  }

  .cyberav-hexframes-grid,
  .cyberav-auras-grid {
    grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)) !important;
    gap: 6px !important;
  }
}

@media (max-width: 400px) {
  .cyberav-showcase-stage {
    padding: 6px 6px 8px 6px !important;
    margin-bottom: 6px !important;
  }

  .cyberav-stage-circle-wrap {
    width: 74px !important;
    height: 74px !important;
  }

  .cyberav-stage-preview {
    width: 64px !important;
    height: 64px !important;
  }

  #btn-cyberav-randomize,
  #btn-cyberav-reset {
    padding: 4px 9px !important;
    font-size: 0.7rem !important;
  }

  .cyberav-cat-btn {
    padding: 4px 9px !important;
    font-size: 0.7rem !important;
    gap: 4px !important;
  }

  .cyberav-presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 5px !important;
  }

  .cyberav-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)) !important;
    gap: 5px !important;
  }
}

/* Titles Mobile Filter Pills */
#profile-titles-filter-pills {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

#profile-titles-filter-pills::-webkit-scrollbar {
  display: none !important;
}

.title-filter-pill {
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  outline: none !important;
  user-select: none !important;
}

.title-filter-pill:hover {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fbbf24 !important;
}

.title-filter-pill.active {
  border-color: rgba(251, 191, 36, 0.65) !important;
  background: rgba(251, 191, 36, 0.22) !important;
  color: #fbbf24 !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2) !important;
}

/* Username Generator & Suggestions Button */
#btn-suggest-profile-username:hover {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.22) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.3) !important;
}

#btn-suggest-profile-username:active {
  transform: translateY(1px) !important;
}

/* Level Title Equip Buttons */
.btn-title-status.equip-action:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.45) !important;
  border-color: #7dd3fc !important;
}

.btn-title-status.equip-action:active {
  transform: translateY(1px) !important;
}

@media (max-width: 480px) {
  .cyberav-cat-btn {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }

  .cyberav-showcase-stage {
    padding: 8px 8px 10px 8px !important;
    margin-bottom: 8px !important;
    border-radius: 14px !important;
  }

  .cyberav-stage-circle-wrap {
    width: 110px !important;
    height: 110px !important;
    margin: 2px 0 4px 0 !important;
  }

  .cyberav-stage-circle-wrap svg {
    max-width: 96px !important;
    max-height: 96px !important;
  }

  .cyberav-footer-actions {
    margin-top: 6px !important;
    padding-top: 6px !important;
  }

  .cyberav-footer-actions button {
    padding: 10px !important;
    font-size: 0.82rem !important;
  }
}

/* ==========================================================================
   KMKZ AVATAR & INSIGNIA STUDIO (Tactical Vector Engine & Deep Customizer)
   ========================================================================== */

.cyberav-studio-subtabs {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
  padding: 0 !important;
  margin: 0 0 6px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.studio-subtab-btn {
  height: 34px !important;
  min-width: 0 !important;
  padding: 0 4px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 9px !important;
  color: #94a3b8 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: all 0.18s ease !important;
}

.studio-subtab-btn:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #f8fafc !important;
  transform: translateY(-1px) !important;
}

.studio-subtab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(2, 132, 199, 0.14) 100%) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

.studio-subtab-btn .subtab-label-short {
  display: none !important;
}
.studio-subtab-btn .subtab-label-full {
  display: inline !important;
}

@media (max-width: 540px) {
  .studio-subtab-btn .subtab-label-short {
    display: inline !important;
  }
  .studio-subtab-btn .subtab-label-full {
    display: none !important;
  }
}

.studio-subtab-btn svg {
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.studio-subtab-btn.active svg {
  transform: scale(1.1) !important;
}

/* Studio Section Headings */
.studio-section-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.studio-section-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  padding: 0 2px !important;
}

.studio-section-badge {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
  letter-spacing: 0.4px !important;
}

/* 1. Geometric Shapes Row */
.sigil-shapes-row {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sigil-shape-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 4px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
}

.sigil-emblem-card.hidden,
.sigil-emblem-card[hidden] {
  display: none !important;
}

.sigil-shape-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.sigil-shape-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.15) !important;
}

.sigil-shape-preview {
  width: 42px !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) !important;
  transition: transform 0.2s ease !important;
}

.sigil-shape-card:hover .sigil-shape-preview {
  transform: scale(1.08) !important;
}

.sigil-shape-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.sigil-shape-card.active .sigil-shape-label {
  color: #38bdf8 !important;
  font-weight: 900 !important;
}

/* 2. Emblems Filter Chips & Grid */
.sigil-emblems-filter-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 1px 2px 4px !important;
  margin-bottom: 2px !important;
  scrollbar-width: none !important;
}

.sigil-emblems-filter-row::-webkit-scrollbar {
  display: none !important;
}

.sigil-filter-chip {
  padding: 3px 9px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  color: #94a3b8 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  user-select: none !important;
  outline: none !important;
  transition: all 0.18s ease !important;
  flex-shrink: 0 !important;
}

.sigil-filter-chip:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #f1f5f9 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.sigil-filter-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(2, 132, 199, 0.2) 100%) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) !important;
}

.sigil-emblems-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)) !important;
  align-content: start !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  max-height: clamp(210px, 36vh, 320px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 4px 4px 6px 3px !important;
  border-radius: 12px !important;
  background: rgba(8, 14, 28, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6) !important;
}

.sigil-emblems-grid::-webkit-scrollbar {
  width: 5px !important;
}

.sigil-emblems-grid::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5) !important;
  border-radius: 8px !important;
}

.sigil-emblems-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  border-radius: 8px !important;
}

.sigil-emblem-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 8px 4px 7px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
}

.sigil-emblem-card.hidden,
.sigil-emblem-card[hidden] {
  display: none !important;
}

.sigil-emblem-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45) !important;
}

.sigil-emblem-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.15) !important;
}

.sigil-emblem-icon-box {
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) !important;
  transition: transform 0.2s ease !important;
}

.sigil-emblem-card:hover .sigil-emblem-icon-box {
  transform: scale(1.08) !important;
}

.sigil-emblem-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 90% !important;
}

.sigil-emblem-cat {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.sigil-emblem-card.active .sigil-emblem-name {
  color: #38bdf8 !important;
}

.sigil-emblem-card.active .sigil-emblem-cat {
  color: #94a3b8 !important;
}

/* 3. Dual-Tone Curated Palettes Grid */
.sigil-palettes-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sigil-palette-card {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  text-align: left !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
}

.sigil-emblem-card.hidden,
.sigil-emblem-card[hidden] {
  display: none !important;
}

.sigil-palette-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.sigil-palette-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.32), inset 0 0 8px rgba(56, 189, 248, 0.12) !important;
}

.palette-swatch-duo {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

.palette-swatch-duo .swatch-half {
  flex: 1 !important;
  height: 100% !important;
}

.palette-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  overflow: hidden !important;
}

.palette-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #f1f5f9 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.palette-codes {
  font-size: 0.65rem !important;
  color: #64748b !important;
  font-family: monospace !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sigil-palette-card.active .palette-name {
  color: #38bdf8 !important;
}

/* 4. Background Patterns Grid */
.sigil-patterns-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sigil-pattern-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 6px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
}

.sigil-emblem-card.hidden,
.sigil-emblem-card[hidden] {
  display: none !important;
}

.sigil-pattern-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.sigil-pattern-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.sigil-pattern-preview {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) !important;
}

.sigil-pattern-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  text-align: center !important;
}

.sigil-pattern-card.active .sigil-pattern-name {
  color: #38bdf8 !important;
}

/* 5. Border Trims Grid */
.sigil-borders-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sigil-border-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 10px 8px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
}

.sigil-emblem-card.hidden,
.sigil-emblem-card[hidden] {
  display: none !important;
}

.sigil-border-card:hover {
  transform: translateY(-2px) !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.sigil-border-card.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.sigil-border-indicator {
  width: 38px !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

.sigil-border-indicator.border-gold_leaf {
  background: linear-gradient(90deg, #f59e0b 0%, #fef08a 50%, #d97706 100%) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6) !important;
}

.sigil-border-indicator.border-neon_glow {
  background: linear-gradient(90deg, #00f0ff 0%, #38bdf8 100%) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.8) !important;
}

.sigil-border-indicator.border-military {
  background: repeating-linear-gradient(90deg, #e2e8f0 0 4px, #475569 4px 8px) !important;
}

.sigil-border-indicator.border-clean_bevel {
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

.sigil-border-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
  text-align: center !important;
}

.sigil-border-card.active .sigil-border-name {
  color: #38bdf8 !important;
}

/* 6. Elite Archetypes Grid */
.cyberav-archetypes-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cyberav-archetype-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 8px 9px !important;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.94) 0%, rgba(10, 15, 29, 0.98) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  user-select: none !important;
  outline: none !important;
  overflow: hidden !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
  backdrop-filter: blur(12px) !important;
}

.cyberav-archetype-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent 0%, var(--arch-color, #38bdf8) 50%, transparent 100%) !important;
  opacity: 0.55 !important;
  transition: opacity 0.2s ease !important;
}

.cyberav-archetype-card:hover {
  transform: translateY(-3px) scale(1.02) !important;
  border-color: var(--arch-color, #38bdf8) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.99) 100%) !important;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.6), 0 0 18px var(--arch-color, rgba(56, 189, 248, 0.35)) !important;
}

.cyberav-archetype-card:hover::before {
  opacity: 1 !important;
}

.archetype-avatar-wrap {
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.22s ease !important;
}

.cyberav-archetype-card:hover .archetype-avatar-wrap {
  transform: scale(1.08) !important;
}

.archetype-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  width: 100% !important;
}

.archetype-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.archetype-role {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.archetype-footer-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-top: 4px !important;
  padding-top: 5px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.archetype-duo-dots {
  display: flex !important;
  gap: 4px !important;
}

.duo-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.archetype-status-tag {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.6px !important;
  color: var(--arch-color, #38bdf8) !important;
}

/* Mobile Responsiveness for Studio */
@media (max-width: 640px) {
  .sigil-shapes-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .sigil-emblems-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important;
    gap: 5px !important;
    max-height: clamp(190px, 32vh, 260px) !important;
    overflow-y: auto !important;
  }

  .sigil-palettes-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
    gap: 6px !important;
  }

  .sigil-patterns-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .sigil-borders-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .cyberav-archetypes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   KMKZ HOME REDESIGN: NUEVA JERARQUÍA & LAYOUT
   JUGAR (Primario) ➔ TU PROGRESO (Meta) ➔ ARCADE (Experiencias) ➔ GUÍA (Aprender)
   ═══════════════════════════════════════════════════════════════════ */

/* Section Dividers & Headers */
.home-section-header {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 18px 0 8px 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

.home-section-header.play-section-header,
.home-section-header.ranking-section-header,
.home-section-header.social-section-header,
.home-section-header.shop-section-header,
.home-section-header.settings-section-header {
  margin-top: 4px !important;
}

.home-section-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.home-section-icon {
  font-size: 1.25rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) !important;
}

.home-section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.96rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
}

/* 🟢 PRIMARY CTA: Partida Rápida (Enhanced Visual Weight & Pulse) */
.btn-quick-match {
  position: relative !important;
  box-shadow:
    0 0 24px rgba(34, 197, 94, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  border: 1.5px solid rgba(74, 222, 128, 0.6) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease !important;
}

.btn-quick-match:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow:
    0 0 32px rgba(34, 197, 94, 0.55),
    0 12px 28px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  filter: brightness(1.08) !important;
}

.btn-quick-match:active {
  transform: scale(0.98) !important;
}

/* 🔵 SECONDARY CTA: Unirse a Sala (Accordion con código o salas) */
.join-room-accordion {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  margin-top: 2px !important;
}

.btn-join-room-accordion-trigger {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.65) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  overflow: hidden !important;
}

.btn-join-room-accordion-trigger:hover {
  background: linear-gradient(135deg, rgba(20, 32, 60, 0.9) 0%, rgba(35, 50, 75, 0.8) 100%) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.18) !important;
  transform: translateY(-1px) !important;
}

.btn-join-room-accordion-trigger.is-open {
  border-color: #38bdf8 !important;
  background: rgba(14, 22, 42, 0.95) !important;
  border-bottom-left-radius: 6px !important;
  border-bottom-right-radius: 6px !important;
}

.btn-join-room-accordion-trigger.is-open #join-room-chevron {
  transform: rotate(90deg) !important;
  color: #38bdf8 !important;
}

.join-trigger-info {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-align: left !important;
}

.join-trigger-texts {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  text-align: left !important;
  gap: 2px !important;
}

.join-trigger-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  max-width: 100% !important;
}

.join-trigger-subtitle {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  max-width: 100% !important;
}

.join-trigger-arrow {
  color: #38bdf8 !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
}

.join-room-dropdown {
  background: rgba(11, 17, 34, 0.97) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-top: none !important;
  border-bottom-left-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6) !important;
  animation: joinDropFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.join-room-dropdown.hidden {
  display: none !important;
}

@keyframes joinDropFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.join-code-box {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.join-code-lock {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.35)) !important;
}

.join-code-lock svg {
  width: 16px !important;
  height: 16px !important;
}

#input-room-code {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  background: rgba(6, 10, 22, 0.88) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 1.05rem !important;
  letter-spacing: 3px !important;
  text-align: center !important;
  padding: 0 16px 0 42px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#input-room-code:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.1) !important;
  outline: none !important;
}

#input-room-code::placeholder {
  font-size: 0.84rem !important;
  letter-spacing: 1px !important;
  color: rgba(148, 163, 184, 0.75) !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.btn-join-code-submit {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 46px !important;
  min-height: 46px !important;
  min-width: unset !important;
  padding: 0 20px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.8px !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-join-code-submit .btn-join-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

@media (max-width: 480px) {
  .join-room-dropdown {
    padding: 12px !important;
    gap: 10px !important;
  }

  .join-code-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    position: relative !important;
  }

  .join-code-lock {
    position: absolute !important;
    left: 14px !important;
    top: 23px !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }

  .join-code-lock svg {
    width: 16px !important;
    height: 16px !important;
  }

  #input-room-code {
    width: 100% !important;
    flex: 1 1 auto !important;
    height: 46px !important;
    min-height: 46px !important;
    font-size: 1rem !important;
    letter-spacing: 2.5px !important;
    padding: 0 16px 0 40px !important;
    border-radius: 12px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #input-room-code::placeholder {
    font-size: 0.80rem !important;
    letter-spacing: 0.8px !important;
    color: rgba(148, 163, 184, 0.7) !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .btn-join-code-submit {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 0.84rem !important;
    letter-spacing: 0.8px !important;
    padding: 0 16px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .btn-join-code-submit .btn-join-arrow svg {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 360px) {
  .join-room-dropdown {
    padding: 10px 8px !important;
    gap: 8px !important;
  }

  .join-code-box {
    gap: 8px !important;
  }

  .join-code-lock {
    left: 12px !important;
    top: 22px !important;
  }

  #input-room-code {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 1rem !important;
    letter-spacing: 2px !important;
    padding: 0 12px 0 36px !important;
  }

  .btn-join-code-submit {
    height: 42px !important;
    min-height: 42px !important;
    font-size: 0.80rem !important;
  }
}

.join-or-divider {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  color: #64748b !important;
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
}

.join-or-divider::before,
.join-or-divider::after {
  content: '' !important;
  flex: 1 !important;
  height: 1px !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.join-or-divider span {
  padding: 0 10px !important;
}

.btn-social-rooms-alt {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 10px !important;
  color: #7dd3fc !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.4px !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-social-rooms-alt:hover {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

/* 🟡 TERTIARY CTA: Crear Sala */
.btn-create-room-tertiary {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  background: rgba(245, 158, 11, 0.07) !important;
  border: 1px dashed rgba(245, 158, 11, 0.4) !important;
  border-radius: 12px !important;
  color: #fbbf24 !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.8px !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  margin-top: 2px !important;
}

.btn-create-room-tertiary:hover {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: #f59e0b !important;
  border-style: solid !important;
  color: #fef08a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18) !important;
}

.btn-create-room-tertiary:active {
  transform: scale(0.98) !important;
}

.create-room-icon {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
}

/* 🏆 EXPANDED TU PROGRESO DASHBOARD PANEL */
.upd-compact-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px !important;
  margin-bottom: 2px !important;
}

.upd-compact-level-group {
  display: flex !important;
  align-items: center !important;
}

.upd-compact-level-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #0c0a09 !important;
  padding: 6px 14px !important;
  border-radius: 12px !important;
  font-family: 'Outfit', sans-serif !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.7) !important;
  outline: none !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease !important;
}

.upd-compact-level-badge:hover {
  transform: translateY(-1.5px) scale(1.02) !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

.upd-compact-level-badge:active {
  transform: scale(0.97) !important;
}

.upd-level-badge-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  line-height: 1.15 !important;
}

.upd-level-sub {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: #78350f !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
}

.upd-compact-level-num {
  font-weight: 900 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.5px !important;
  color: #0c0a09 !important;
}

.upd-compact-xp-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.upd-xp-info-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  line-height: 1.15 !important;
}

.upd-xp-label {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.upd-compact-xp-val {
  color: #e2e8f0 !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.4px !important;
}

.upd-chest-ready-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(220, 38, 38, 0.32) 100%) !important;
  border: 1.5px solid rgba(244, 63, 94, 0.5) !important;
  color: #fda4af !important;
  padding: 5px 12px !important;
  border-radius: 10px !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.25) !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  outline: none !important;
}

.upd-chest-ready-pill:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38) 0%, rgba(220, 38, 38, 0.48) 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4) !important;
}

.upd-chest-ready-pill.has-claimable {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: rgba(52, 211, 153, 0.8) !important;
  color: #ffffff !important;
  animation: pulse-glow 2s infinite !important;
}

/* XP Bar & Metadata Track (Elemento visual informativo - NO es un botón) */
.upd-xp-track-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
  cursor: default !important;
  pointer-events: auto !important;
  outline: none !important;
  user-select: none !important;
}

.upd-xp-track-box:hover {
  opacity: 1 !important;
}

.upd-xp-meta-line {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.7rem !important;
}

.upd-xp-meta-title {
  color: #fbbf24 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
}

.upd-xp-meta-hint {
  color: #38bdf8 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.upd-double-tap-banner {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(14, 165, 233, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  font-size: 0.72rem !important;
  color: #bae6fd !important;
  line-height: 1.35 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  margin: 2px 0 2px 0 !important;
}

.upd-double-tap-banner strong {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.upd-double-tap-banner .upd-dt-icon {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #38bdf8 !important;
}

/* Feedback visual al recibir el 1er toque (requiere 2do toque para abrir) */
.upd-double-tap-pending {
  animation: updDoubleTapPulse 0.45s ease-in-out !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.65), inset 0 0 10px rgba(56, 189, 248, 0.3) !important;
}

@keyframes updDoubleTapPulse {

  0%,
  100% {
    transform: scale(1);
  }

  30% {
    transform: scale(0.975);
    border-color: #38bdf8;
  }

  65% {
    transform: scale(1.025);
    border-color: #7dd3fc;
  }
}

.upd-xp-bar-bg {
  width: 100% !important;
  height: 10px !important;
  background: rgba(4, 7, 18, 0.9) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7) !important;
  position: relative !important;
}

.upd-xp-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 50%, #06b6d4 100%) !important;
  border-radius: 999px !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

/* 3 Interactive Cards Grid inside Tu Progreso - Redesigned */
.upd-quick-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 6px 0 4px 0 !important;
}

.upd-quick-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  padding: 12px 8px !important;
  min-height: 98px !important;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 15, 29, 0.95) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

.upd-quick-card * {
  pointer-events: none !important;
}

.upd-quick-card:hover {
  transform: translateY(-2px) !important;
}

.upd-quick-card:active {
  transform: scale(0.95) !important;
  filter: brightness(1.2) !important;
}

#upd-tab-quests {
  border-color: rgba(245, 158, 11, 0.32) !important;
  background: linear-gradient(180deg, rgba(30, 22, 12, 0.75) 0%, rgba(13, 18, 32, 0.95) 100%) !important;
}

#upd-tab-quests:hover,
#upd-tab-quests.active {
  border-color: rgba(245, 158, 11, 0.65) !important;
  box-shadow: 0 8px 24px -2px rgba(245, 158, 11, 0.3), inset 0 0 16px rgba(245, 158, 11, 0.1) !important;
}

#upd-tab-battlepass {
  border-color: rgba(168, 85, 247, 0.32) !important;
  background: linear-gradient(180deg, rgba(30, 16, 42, 0.75) 0%, rgba(13, 18, 32, 0.95) 100%) !important;
}

#upd-tab-battlepass:hover,
#upd-tab-battlepass.active {
  border-color: rgba(168, 85, 247, 0.65) !important;
  box-shadow: 0 8px 24px -2px rgba(168, 85, 247, 0.3), inset 0 0 16px rgba(168, 85, 247, 0.1) !important;
}

#upd-tab-streak {
  border-color: rgba(244, 63, 94, 0.32) !important;
  background: linear-gradient(180deg, rgba(38, 14, 24, 0.75) 0%, rgba(13, 18, 32, 0.95) 100%) !important;
}

#upd-tab-streak:hover,
#upd-tab-streak.active {
  border-color: rgba(244, 63, 94, 0.65) !important;
  box-shadow: 0 8px 24px -2px rgba(244, 63, 94, 0.3), inset 0 0 16px rgba(244, 63, 94, 0.1) !important;
}

.upd-qc-top-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  width: 100% !important;
}

.upd-qc-icon-wrap {
  width: 36px !important;
  height: 36px !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.upd-quick-card:hover .upd-qc-icon-wrap {
  transform: scale(1.1) !important;
}

.quests-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.1) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
}

.bp-glow {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(168, 85, 247, 0.1) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
}

.streak-glow {
  background: radial-gradient(circle, rgba(244, 63, 94, 0.3) 0%, rgba(244, 63, 94, 0.1) 100%) !important;
  border: 1px solid rgba(244, 63, 94, 0.45) !important;
}

.upd-qc-icon {
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.upd-qc-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  width: 100% !important;
}

.upd-qc-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
  color: #f8fafc !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;
}

.upd-qc-badge {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  white-space: nowrap !important;
}

.upd-qc-badge.bp-badge {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.38) !important;
}

.upd-qc-badge.streak-badge {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.38) !important;
}

.upd-qc-desc {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

.upd-qc-action-arrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  width: calc(100% - 6px) !important;
  margin-top: 2px !important;
}

@media (max-width: 600px) {
  .upd-quick-grid {
    gap: 6px !important;
  }

  .upd-quick-card {
    padding: 10px 4px !important;
    min-height: 94px !important;
    gap: 4px !important;
    border-radius: 14px !important;
  }

  .upd-qc-icon-wrap {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  .upd-qc-title {
    font-size: 0.7rem !important;
    letter-spacing: 0.2px !important;
  }

  .upd-qc-badge {
    font-size: 0.7rem !important;
    padding: 1px 5px !important;
  }

  .upd-qc-desc {
    display: none !important;
  }

  .upd-qc-action-arrow {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
    gap: 2px !important;
  }
}

/* Modal Confirmación Tutorial */
#modal-confirm-tutorial {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#modal-confirm-tutorial.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#modal-confirm-tutorial:not(.hidden) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.confirm-tutorial-modal {
  position: relative !important;
  max-width: 480px !important;
  width: 92% !important;
  max-height: min(92vh, 92dvh) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.confirm-tutorial-modal::-webkit-scrollbar {
  width: 4px;
}

.confirm-tutorial-modal::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.4);
  border-radius: 4px;
}

.tut-modal-corner-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  z-index: 10 !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  padding: 0 !important;
}

.tut-modal-corner-close:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  transform: scale(1.08) !important;
}

.tut-modal-corner-close:active {
  transform: scale(0.92) !important;
}

.tut-modal-body {
  padding: 0 !important;
  text-align: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tut-modal-title {
  margin: 4px 0 6px 0 !important;
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

.tut-modal-desc {
  margin-bottom: 12px !important;
  font-size: 0.80rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.tutorial-modules-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tut-module-card {
  background: rgba(15, 23, 42, 0.85) !important;
  border-radius: 12px !important;
  padding: 9px 10px !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  outline: none !important;
  touch-action: manipulation !important;
  user-select: none !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.tut-module-card:hover {
  transform: translateY(-2px) !important;
}

.tut-module-card:active {
  transform: scale(0.97) !important;
}

.tut-module-card.emerald-mod {
  border-color: rgba(16, 185, 129, 0.35) !important;
}
.tut-module-card.emerald-mod:hover {
  border-color: rgba(16, 185, 129, 0.7) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}

.tut-module-card.cyan-mod {
  border-color: rgba(56, 189, 248, 0.35) !important;
}
.tut-module-card.cyan-mod:hover {
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25) !important;
}

.tut-module-card.amber-mod {
  border-color: rgba(251, 191, 36, 0.35) !important;
}
.tut-module-card.amber-mod:hover {
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25) !important;
}

.tut-module-card.purple-mod {
  border-color: rgba(168, 85, 247, 0.35) !important;
}
.tut-module-card.purple-mod:hover {
  border-color: rgba(168, 85, 247, 0.7) !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25) !important;
}

.tut-mod-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.tut-mod-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.tut-mod-badge.emerald {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
}
.tut-mod-badge.cyan {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
}
.tut-mod-badge.amber {
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
}
.tut-mod-badge.purple {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #c084fc !important;
}

.tut-mod-name {
  color: #f1f5f9 !important;
  font-size: 0.80rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.tut-mod-desc {
  font-size: 0.67rem !important;
  color: #94a3b8 !important;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.tut-mod-status {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  margin-left: auto !important;
  letter-spacing: 0.5px !important;
  flex-shrink: 0 !important;
}

.tut-mod-status.completed {
  background: rgba(34, 197, 94, 0.22) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
}

.tut-mod-status.pending {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

.tut-modal-actions {
  margin-bottom: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}

.btn-tut-play-all {
  width: 100% !important;
  justify-content: center !important;
  min-height: 42px !important;
  font-size: 0.85rem !important;
}

.tut-modal-subactions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.btn-tut-rules-link {
  background: none !important;
  border: none !important;
  color: #38bdf8 !important;
  font-size: 0.80rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  padding: 4px 6px !important;
}

.btn-tut-close {
  padding: 6px 14px !important;
  font-size: 0.80rem !important;
}

@keyframes modalPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer Summary Row */
.upd-compact-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  margin-top: 2px !important;
}

.upd-footer-quest-summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 0.78rem !important;
  color: #cbd5e1 !important;
}

.upd-footer-text-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.upd-footer-hint {
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 0.72rem !important;
}

.upd-footer-icon {
  font-size: 1rem !important;
  line-height: 1 !important;
}

.upd-footer-action-btn {
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 8px !important;
  padding: 5px 12px !important;
  color: #38bdf8 !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.upd-footer-action-btn:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #7dd3fc !important;
  transform: translateX(2px) !important;
}

/* 🕹️ ARCADE CARDS GRID */
.arcade-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 20px !important;
}

.arcade-title-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.arcade-main-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.arcade-section-subtitle {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

.btn-arcade-see-all {
  background: transparent !important;
  border: none !important;
  color: #38bdf8 !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.4px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.btn-arcade-see-all:hover {
  color: #7dd3fc !important;
}

.arcade-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 4px !important;
}

.arcade-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer !important;
  min-height: 110px !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease !important;
}

.arcade-card:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6) !important;
}

.arcade-card:active {
  transform: scale(0.98) !important;
}

.arcade-card-tycoon {
  background: linear-gradient(145deg, rgba(38, 28, 8, 0.9) 0%, rgba(18, 14, 4, 0.98) 100%) !important;
  border: 1.5px solid rgba(250, 204, 21, 0.45) !important;
}

.arcade-card-tycoon:hover {
  border-color: #facc15 !important;
  box-shadow: 0 8px 28px rgba(250, 204, 21, 0.35) !important;
}

.arcade-card-casino {
  background: linear-gradient(145deg, rgba(69, 26, 3, 0.85) 0%, rgba(18, 24, 44, 0.96) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
}

.arcade-card-casino:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.28) !important;
}

.arcade-card-teaser {
  background: linear-gradient(145deg, rgba(18, 25, 46, 0.75) 0%, rgba(10, 15, 30, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.arcade-card-teaser:hover {
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.arcade-card-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.arcade-card-icon {
  font-size: 1.45rem !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
}

.arcade-card-badge {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

.arcade-card-badge.badge-new {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2) !important;
}

.arcade-card-badge.badge-live {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.arcade-card-badge.badge-mini {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.arcade-card-body {
  margin: 6px 0 4px 0 !important;
  text-align: left !important;
}

.arcade-card-title {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 900 !important;
  font-size: 0.86rem !important;
  color: #f8fafc !important;
  letter-spacing: 0.4px !important;
  margin: 0 !important;
}

.arcade-card-pill {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  display: block !important;
  margin-top: 1px !important;
}

.arcade-card-pill.jackpot-pill {
  color: #fbbf24 !important;
}

.arcade-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.arcade-card-action {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  color: #38bdf8 !important;
  letter-spacing: 0.4px !important;
}

/* 📖 COMPACT QUICK GUIDE CARD (ULTRA-SLIM ESPORTS STRIP) */
.quick-how-to-play-card {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  min-height: 40px !important;
  max-height: 46px !important;
  background: linear-gradient(135deg, rgba(16, 26, 48, 0.8) 0%, rgba(10, 16, 32, 0.95) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  box-sizing: border-box !important;
}

.quick-how-to-play-card:hover {
  border-color: rgba(56, 189, 248, 0.55) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(56, 189, 248, 0.18) !important;
}

.quick-how-to-play-card:active {
  transform: scale(0.99) !important;
}

.quick-htp-content {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.quick-htp-icon {
  font-size: 1.1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5)) !important;
}

.quick-htp-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  text-align: left !important;
  overflow: hidden !important;
}

.quick-htp-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  line-height: 1.15 !important;
}

.quick-htp-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: 0.4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.quick-htp-tag {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.55rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  padding: 0 4px !important;
  border-radius: 4px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
}

.quick-htp-desc {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important;
  color: #94a3b8 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.quick-htp-action {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* Call To Action Button (Compact Pill) */
.btn-quick-htp-pill {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.67rem !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  letter-spacing: 0.3px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  line-height: 1.2 !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}

.btn-quick-htp-arrow {
  display: inline-block !important;
  transition: transform 0.18s ease !important;
  color: inherit !important;
}

.quick-how-to-play-card:hover .btn-quick-htp-pill {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
}

.quick-how-to-play-card:hover .btn-quick-htp-arrow {
  transform: translateX(2px) !important;
}

.btn-quick-htp-label-full {
  display: inline !important;
}

.btn-quick-htp-label-short {
  display: none !important;
}

@media (max-width: 320px) {
  .btn-quick-htp-label-full {
    display: none !important;
  }
  .btn-quick-htp-label-short {
    display: inline !important;
  }
}

/* Minimal SEO Footer */
.lobby-compact-seo-footer {
  width: 100% !important;
  margin-top: 14px !important;
  padding: 10px 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.seo-compact-links-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.seo-compact-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.72rem !important;
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.15s ease !important;
}

.seo-compact-link:hover {
  color: #38bdf8 !important;
}

.seo-link-icon {
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* ==========================================================================
   KMKZ IN-GAME EXIT MODAL (TACTICAL GAME THEME - ZERO EMOJIS)
   ========================================================================== */

.kmkz-exit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 19, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.kmkz-exit-modal-card {
  max-width: 450px;
  width: 100%;
  margin: auto;
  padding: 24px 20px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(9, 14, 28, 0.98) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.92), 0 0 35px rgba(251, 191, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: kmkzModalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes kmkzModalPopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.kmkz-exit-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.85), transparent);
  pointer-events: none;
}

.exit-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.exit-modal-emblem {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(217, 119, 6, 0.3));
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  margin-bottom: 4px;
}

.exit-modal-badge {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.exit-modal-title {
  color: #f8fafc;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.exit-modal-desc {
  color: #94a3b8;
  font-size: 0.87rem;
  line-height: 1.45;
  margin: 0;
  padding: 0 8px;
}

.exit-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.exit-tactical-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.6);
  color: #f8fafc;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.exit-tactical-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.12);
}

.exit-tactical-btn:active {
  transform: scale(0.985);
}

.exit-tactical-btn .exit-btn-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.exit-tactical-btn .exit-btn-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.exit-tactical-btn .exit-btn-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f8fafc;
  line-height: 1.25;
}

.exit-tactical-btn .exit-btn-subtitle {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exit-tactical-btn .exit-btn-chevron {
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.exit-tactical-btn:hover .exit-btn-chevron {
  color: #ffffff;
  transform: translateX(2px);
}

/* Button Variants */
.exit-tactical-btn--spectate {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(79, 70, 229, 0.3) 100%);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}
.exit-tactical-btn--spectate .exit-btn-icon-wrap {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(165, 180, 252, 0.4);
  color: #a5b4fc;
}
.exit-tactical-btn--spectate:hover {
  border-color: #818cf8;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.exit-tactical-btn--lobby {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}
.exit-tactical-btn--lobby .exit-btn-icon-wrap {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(110, 231, 183, 0.4);
  color: #6ee7b7;
}
.exit-tactical-btn--lobby:hover {
  border-color: #34d399;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.exit-tactical-btn--peace {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(2, 132, 199, 0.3) 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}
.exit-tactical-btn--peace .exit-btn-icon-wrap {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(125, 211, 252, 0.4);
  color: #7dd3fc;
}
.exit-tactical-btn--peace:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.exit-tactical-btn--close-all {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.22) 0%, rgba(153, 27, 27, 0.32) 100%);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.18);
}
.exit-tactical-btn--close-all .exit-btn-icon-wrap {
  background: rgba(220, 38, 38, 0.35);
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}
.exit-tactical-btn--close-all:hover {
  border-color: #ef4444;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.exit-tactical-btn--abandon {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}
.exit-tactical-btn--abandon .exit-btn-icon-wrap {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.exit-tactical-btn--abandon .exit-btn-title {
  color: #fca5a5;
}
.exit-tactical-btn--abandon:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.exit-tactical-btn--cancel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  justify-content: center;
  text-align: center;
  padding: 11px;
}
.exit-tactical-btn--cancel .exit-btn-title {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.88rem;
}
.exit-tactical-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}
.exit-tactical-btn--cancel:hover .exit-btn-title {
  color: #f8fafc;
}

@media (max-width: 480px) {
  .kmkz-exit-modal-card {
    padding: 18px 14px;
    gap: 12px;
    border-radius: 18px;
  }
  .exit-modal-title {
    font-size: 1.2rem;
  }
  .exit-modal-desc {
    font-size: 0.82rem;
    padding: 0 4px;
  }
  .exit-tactical-btn {
    padding: 9px 12px;
    gap: 10px;
  }
  .exit-tactical-btn .exit-btn-icon-wrap {
    width: 34px;
    height: 34px;
  }
  .exit-tactical-btn .exit-btn-title {
    font-size: 0.87rem;
  }
  .exit-tactical-btn .exit-btn-subtitle {
    font-size: 0.71rem;
  }
}

/* ==========================================================================
   KMKZ MOBILE GPU & PERFORMANCE OPTIMIZATIONS
   Eliminates backdrop blur ghosting, button pulsing stutter, and drops CPU/GPU load
   ========================================================================== */
.screen:not(.active) * {
  animation-play-state: paused !important;
}

@media (max-width: 1024px),
(hover: none) and (pointer: coarse) {

  /* Replace expensive hardware compositing blurs with solid dark backdrops */
  .game-overlay,
  .friends-modal-overlay,
  .modal-overlay,
  .settings-overlay,
  .chat-hud,
  .logs-hud,
  .build-menu-popup,
  .hud-trade-bar,
  .hud-discard-bar,
  .hud-player-trade-bar,
  .game-over-modal-imperial,
  .game-over-overlay,
  .top-bank-bar,
  .my-resources-hud,
  .app-header,
  .mobile-bottom-nav,
  .bottom-nav-bar,
  .lobby-hero-card,
  .card,
  .modal-card,
  .modal-container,
  .forge-fusion-container,
  .profile-card,
  .ranking-card,
  .room-card,
  .header-profile-popover,
  .notif-dropdown,
  .drawer-container,
  .trade-modal-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .game-overlay,
  .friends-modal-overlay,
  .modal-overlay,
  .settings-overlay {
    background: rgba(4, 8, 19, 0.96) !important;
  }

  .app-header,
  .mobile-bottom-nav,
  .bottom-nav-bar {
    background: rgba(10, 15, 29, 0.98) !important;
  }

  .modal-card,
  .modal-container,
  .forge-fusion-container,
  .drawer-container {
    background: rgba(15, 23, 42, 0.98) !important;
  }

  /* Disable battery-draining continuous pulsation on mobile buttons */
  .btn-quick-match::before,
  .quick-bolt,
  .pulse-indicator,
  .hero-quick-btn,
  .hero-quick-btn--play,
  .hud-gold-choice-bar,
  .turn-action-stripe {
    animation: none !important;
  }

  /* Smooth touch transitions for buttons without infinite pulse cycles */
  .btn-quick-match,
  .hero-quick-btn,
  .action-btn-main {
    transform: none !important;
  }
}
/* --- Minimal Clean Fallback Coin (Only on Autoplay Block) --- */
.kmkz-loading-coin-fallback {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.kmkz-coin-fallback-rotator {
  width: clamp(100px, 30vw, 140px);
  height: clamp(100px, 30vw, 140px);
  perspective: 1000px;
  animation: kmkzCoinSpinFallback 3.6s ease-in-out infinite;
}

.kmkz-coin-fallback-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.55));
}

@keyframes kmkzCoinSpinFallback {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
