/**
 * css/styles.css
 * "Bee Free By Fany Arte Natural" - Complete Waxmorphism Design System
 * 
 * Aesthetic: Artisanal Beeswax Glow & Translucent Honey Glass (Waxmorphism)
 * Layout: 400x640 Virtual Coordinate Lock, Viewport Centering & Zero Scrollbars
 * Compatibility: Standalone Zero-Build, Modern Browsers & Automated Headless E2E Suite
 */

/* ==========================================================================
   1. Design System Tokens & Brand Palette
   ========================================================================== */
:root {
  /* Brand Palette (Strictly matching js/config.js and logo artwork) */
  --color-honey-gold: #F59E0B;
  --color-honey-gold-rgb: 245, 158, 11;
  --color-honey-deep: #D97706;
  --color-honey-deep-rgb: 217, 119, 6;
  --color-honey-dark: #B45309;
  --color-honey-dark-rgb: 180, 83, 9;
  --color-honey-amber: #FBBF24;
  --color-bg-light: #FFFDF5;
  --color-bg-cream: #FEF3C7;
  --color-bg-cream-rgb: 254, 243, 199;
  --color-wax-white: #FFFFFF;
  --color-wax-white-rgb: 255, 255, 255;
  --color-text-primary: #1C1917;
  --color-text-muted: #78350F;
  --color-border-warm: #FDE68A;
  --color-border-warm-rgb: 253, 230, 138;

  /* Ambient & Outer Backdrop */
  --color-backdrop-dark: #181514;
  --color-backdrop-glow: #2A2421;

  /* Social CTA Brand Tokens */
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1EBE5D;
  --color-whatsapp-deep: #128C7E;
  --color-instagram-pink: #E1306C;
  --color-instagram-purple: #833AB4;
  --color-instagram-orange: #FD1D1D;
  --color-instagram-amber: #FCB045;
  --color-success: #16A34A;
  --color-danger: #EF4444;

  /* Waxmorphism Lighting, Optical Blurs & Soft Glow Shadows */
  --wax-card-bg: rgba(255, 253, 245, 0.92);
  --wax-card-border: 1.5px solid rgba(253, 230, 138, 0.85);
  --wax-card-highlight: inset 0 1px 2px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 3px 0 rgba(217, 119, 6, 0.12);
  --wax-card-shadow: 0 10px 32px -5px rgba(217, 119, 6, 0.24), 0 0 20px 2px rgba(245, 158, 11, 0.12);
  --wax-glow-pill: 0 4px 14px rgba(217, 119, 6, 0.18);
  --wax-glow-halo: 0 0 16px rgba(245, 158, 11, 0.40);
  --wax-blur: 12px;

  /* Typography Scale */
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1.125rem;   /* 18px */
  --font-size-lg: 1.25rem;    /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 1.875rem;  /* 30px */

  /* Spacing Scale (4px/8px Incremental System) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Organic Rounded Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Motion & Spring Physics */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.25s ease-out;
  --transition-spring: 0.35s var(--ease-spring);

  /* Virtual Game Resolution */
  --game-width: 400px;
  --game-height: 640px;
  --game-aspect: 400 / 640;

  /* Layering Hierarchy */
  --z-canvas: 1;
  --z-hud: 10;
  --z-overlay: 20;
  --z-modal: 30;
  --z-toast: 40;
}

/* ==========================================================================
   2. Reset & Viewport Lock (Zero Scrollbars)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Eliminates all vertical and horizontal scrollbars */
  background-color: var(--color-backdrop-dark);
  background-image: radial-gradient(circle at 50% 30%, var(--color-backdrop-glow) 0%, var(--color-backdrop-dark) 100%);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Accessible focus visible outlines */
:focus-visible {
  outline: 2px solid var(--color-honey-gold);
  outline-offset: 2px;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Screen reader only utility (completely removed from layout flow) */
.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;
}

/* ==========================================================================
   3. Viewport Centering & Aspect-Ratio Lock (400x640)
   ========================================================================== */
.main-wrapper,
.app-container,
body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dual-selector support for #game-container (M4 Spec) and #gameViewport (E2E Test Suite) */
#game-container,
#gameViewport,
.game-container,
.game-viewport {
  position: relative;
  /* Fluid scaling respecting 400x640 ratio without clipping */
  width: min(100vw, calc(100dvh * (400 / 640)));
  height: min(100dvh, calc(100vw * (640 / 400)));
  aspect-ratio: 400 / 640;
  max-width: 480px;
  max-height: 768px;
  background-color: var(--color-bg-cream);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 50px -10px rgba(0, 0, 0, 0.65),
    0 0 0 1.5px rgba(245, 158, 11, 0.35);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* Mobile Portrait edge-to-edge alignment */
@media (max-width: 480px) {
  #game-container,
  #gameViewport,
  .game-container,
  .game-viewport {
    width: min(100vw, calc(100dvh * (400 / 640)));
    height: min(100dvh, calc(100vw * (640 / 400)));
    border-radius: 0;
    box-shadow: none;
  }
}

/* Landscape orientation fitting */
@media (max-height: 520px) and (orientation: landscape) {
  #game-container,
  #gameViewport,
  .game-container,
  .game-viewport {
    height: 100dvh;
    width: calc(100dvh * (400 / 640));
    border-radius: 0;
  }
}

/* Canvas Element (Responsive Virtual Staging) */
#game-canvas,
#gameCanvas,
canvas.game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  z-index: var(--z-canvas);
}

/* ==========================================================================
   4. DOM HUD (Heads-Up Display) Overlay
   ========================================================================== */
#hud,
#hudOverlay,
.hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: var(--z-hud);
}

/* Honey Progress Pill Wrapper */
.progress-wrapper,
.honey-progress-wrapper,
#honey-bar-track {
  background: var(--wax-card-bg);
  backdrop-filter: blur(var(--wax-blur));
  -webkit-backdrop-filter: blur(var(--wax-blur));
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: var(--wax-card-border);
  box-shadow: var(--wax-card-highlight), var(--wax-glow-pill);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  pointer-events: auto;
  transition: transform var(--transition-fast);
}

.honey-icon {
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(217, 119, 6, 0.35));
}

/* Honey Progress Bar Groove */
.progress-bar,
.honey-progress-bar {
  width: 100px;
  height: 12px;
  background: rgba(254, 243, 199, 0.85);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  box-shadow: 
    inset 0 1px 3px rgba(180, 83, 9, 0.25),
    inset 0 0 0 1px rgba(217, 119, 6, 0.15);
}

/* Liquid Honey Progress Fill */
#honey-bar-fill,
#progressFill,
.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #F59E0B 0%, #D97706 60%, #FBBF24 100%);
  box-shadow: 
    0 0 10px rgba(245, 158, 11, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.65);
  position: relative;
  transition: width var(--transition-spring);
  overflow: hidden;
}

/* Shimmering Bubble Sheen across Honey Stream */
#honey-bar-fill::after,
#progressFill::after,
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: honeyShimmer 2.2s infinite linear;
}

/* Honey Score Display Text */
#honey-counter,
#scoreDisplay,
.score-text {
  font-size: var(--font-size-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  min-width: 48px;
  text-align: right;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Circular Mute Toggle Button */
#mute-btn,
#btnMute,
.btn-mute {
  background: var(--wax-card-bg);
  backdrop-filter: blur(var(--wax-blur));
  -webkit-backdrop-filter: blur(var(--wax-blur));
  border: var(--wax-card-border);
  box-shadow: var(--wax-card-highlight), var(--wax-glow-pill);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  pointer-events: auto;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

#mute-btn:hover,
#btnMute:hover,
.btn-mute:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--wax-card-highlight), 0 6px 18px rgba(217, 119, 6, 0.28);
}

#mute-btn:active,
#btnMute:active,
.btn-mute:active {
  transform: scale(0.92);
}

/* ==========================================================================
   5. Waxmorphism Overlay Screens & Modals
   ========================================================================== */
#screen-start,
#startScreen,
#modal-defeat,
#gameOverModal,
#modal-victory,
#victoryModal,
.screen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
  text-align: center;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  z-index: var(--z-modal);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  overscroll-behavior: contain;
}

/* Screen hidden state */
#screen-start.hidden,
#startScreen.hidden,
#modal-defeat.hidden,
#gameOverModal.hidden,
#modal-victory.hidden,
#victoryModal.hidden,
.screen-overlay.hidden,
[hidden] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Waxmorphism Modal Card */
.modal-card,
.wax-card {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(254, 243, 199, 0.92) 100%
  );
  backdrop-filter: blur(var(--wax-blur));
  -webkit-backdrop-filter: blur(var(--wax-blur));
  border: 1.5px solid rgba(253, 230, 138, 0.90);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  width: 100%;
  max-width: 330px;
  margin: auto;
  box-shadow: 
    var(--wax-card-highlight),
    var(--wax-card-shadow);
  transform: scale(1) translateY(0);
  opacity: 1;
  transition: transform var(--transition-spring), opacity var(--transition-normal);
}

/* Subtle bounce transition on modal open */
.screen-overlay.hidden .modal-card,
.screen-overlay.hidden .wax-card {
  transform: scale(0.92) translateY(10px);
  opacity: 0;
}

/* Mascot Logo Badge in Start Screen */
.brand-badge,
.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  position: relative;
}

.brand-badge img,
.brand-logo-img {
  max-width: 110px;
  height: auto;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 4px 10px rgba(217, 119, 6, 0.25));
}

.mascot-floating {
  animation: gentleFloat 3s infinite ease-in-out;
}

/* Modal Typography */
.modal-card h1,
.modal-card h2,
.modal-title {
  color: var(--color-honey-dark);
  font-size: var(--font-size-xl);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-2);
  letter-spacing: -0.3px;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.brand-title,
.modal-title,
#start-title,
#victory-title,
#defeat-title {
  font-family: var(--font-serif);
  font-weight: 700;
}

.modal-card p,
.modal-desc {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.45;
  margin-bottom: var(--space-4);
}

.defeat-score-highlight,
#defeatScoreText {
  font-weight: 800;
  font-size: var(--font-size-md);
  color: var(--color-honey-deep);
  margin-bottom: var(--space-4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   6. Coupon Display & One-Click Copy Feedback
   ========================================================================== */
#coupon-display,
.coupon-box {
  background: rgba(255, 253, 245, 0.95);
  border: 2px dashed var(--color-honey-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  box-shadow: 
    inset 0 1px 3px rgba(217, 119, 6, 0.08),
    0 2px 10px rgba(245, 158, 11, 0.18);
  animation: couponPulse 2.8s infinite ease-in-out;
}

#discountCode,
#coupon-code,
.coupon-code {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-honey-dark);
  letter-spacing: 2px;
  user-select: all;
  -webkit-user-select: all;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Copy Coupon Button */
#btn-copy-coupon,
#btnCopyCoupon,
.btn-copy {
  background: linear-gradient(135deg, var(--color-honey-gold) 0%, var(--color-honey-deep) 100%);
  color: var(--color-wax-white);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--font-size-xs);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
  transition: all var(--transition-fast);
  outline: none;
}

#btn-copy-coupon:hover,
#btnCopyCoupon:hover,
.btn-copy:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
}

#btn-copy-coupon:active,
#btnCopyCoupon:active,
.btn-copy:active {
  transform: scale(0.95);
}

/* Copied Feedback State with Checkmark */
#btn-copy-coupon.copied,
#btnCopyCoupon.copied,
.btn-copy.copied {
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.45) !important;
  transform: scale(1.03);
}

/* ==========================================================================
   7. Buttons & Call-to-Action (CTA) Actions
   ========================================================================== */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

/* Base Interactive Button */
.btn {
  background: linear-gradient(135deg, var(--color-honey-gold) 0%, var(--color-honey-deep) 100%);
  color: var(--color-wax-white);
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--font-size-base);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
  min-height: 44px; /* WCAG 2.2 touch-target compliance */
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45);
}

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

/* Secondary / Outline Button */
.btn.btn-outline,
.btn-outline,
#btn-restart,
#btnPlayAgain,
#btnVictoryRestart,
#btn-play-again {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--color-honey-gold);
  color: var(--color-honey-dark);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.12);
}

.btn.btn-outline:hover,
.btn-outline:hover,
#btn-restart:hover,
#btnPlayAgain:hover,
#btnVictoryRestart:hover,
#btn-play-again:hover {
  background: rgba(254, 243, 199, 0.95);
  border-color: var(--color-honey-deep);
  color: var(--color-honey-deep);
  transform: translateY(-1px);
}

/* WhatsApp CTA Button */
#btn-whatsapp,
#btnWhatsApp,
.btn-cta-whatsapp,
.btn-whatsapp {
  background: linear-gradient(135deg, var(--color-whatsapp) 0%, var(--color-whatsapp-deep) 100%);
  color: var(--color-wax-white);
  text-decoration: none;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
}

#btn-whatsapp:hover,
#btnWhatsApp:hover,
.btn-cta-whatsapp:hover,
.btn-whatsapp:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

#btn-whatsapp:active,
#btnWhatsApp:active,
.btn-cta-whatsapp:active,
.btn-whatsapp:active {
  transform: scale(0.96);
}

/* Instagram CTA Button */
#btn-instagram,
#btnInstagram,
.btn-cta-instagram,
.btn-instagram {
  background: linear-gradient(
    45deg,
    var(--color-instagram-purple) 0%,
    var(--color-instagram-pink) 40%,
    var(--color-instagram-orange) 75%,
    var(--color-instagram-amber) 100%
  );
  color: var(--color-wax-white);
  text-decoration: none;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
}

#btn-instagram:hover,
#btnInstagram:hover,
.btn-cta-instagram:hover,
.btn-instagram:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(225, 48, 108, 0.45);
}

#btn-instagram:active,
#btnInstagram:active,
.btn-cta-instagram:active,
.btn-instagram:active {
  transform: scale(0.96);
}

/* ==========================================================================
   8. Animation Keyframes & Micro-Interactions
   ========================================================================== */
@keyframes honeyShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes couponPulse {
  0%, 100% {
    box-shadow: 
      0 0 0 0 rgba(245, 158, 11, 0.35),
      inset 0 1px 3px rgba(217, 119, 6, 0.08);
    transform: scale(1);
  }
  50% {
    box-shadow: 
      0 0 16px 2px rgba(245, 158, 11, 0.45),
      inset 0 1px 3px rgba(217, 119, 6, 0.08);
    transform: scale(1.015);
  }
}

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

/* ==========================================================================
   9. Accessibility: Reduced Motion (prefers-reduced-motion)
   ========================================================================== */
@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;
  }

  .mascot-floating,
  #coupon-display,
  .coupon-box,
  #honey-bar-fill::after,
  #progressFill::after,
  .progress-fill::after {
    animation: none !important;
    transform: none !important;
  }

  .screen-overlay,
  .modal-card {
    transition: opacity 0.1s ease-out !important;
    transform: none !important;
  }
}

/* ==========================================================================
   10. Lobby, Armario de Cosméticos y Ranking Reina de la Colmena
   ========================================================================== */
.lobby-nick-section {
  background: rgba(254, 243, 199, 0.75);
  border: 1px solid var(--color-border-warm);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: var(--space-3);
  text-align: left;
}

.nick-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-honey-dark);
  display: block;
  margin-bottom: 4px;
}

.nick-input-wrapper {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.nick-input {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-honey-gold);
  background: #FFF;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  outline: none;
}

.nick-input:focus {
  border-color: var(--color-honey-deep);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.btn-save-nick {
  background: var(--color-honey-gold);
  color: #FFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.honey-points-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-honey-dark);
}

.lobby-nav-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: var(--space-3);
}

.btn-lobby-action {
  flex: 1;
  font-size: var(--font-size-xs) !important;
  padding: 8px 6px !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid var(--color-honey-gold) !important;
  color: var(--color-honey-dark) !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.12) !important;
  white-space: nowrap;
}

.btn-lobby-action:hover {
  background: var(--color-bg-cream) !important;
  border-color: var(--color-honey-deep) !important;
}

/* Wardrobe Items Grid */
.wardrobe-points-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px dashed var(--color-honey-gold);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-weight: 700;
  color: var(--color-honey-dark);
  margin-bottom: 12px;
}

.wardrobe-items-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.wardrobe-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFF;
  border: 1px solid var(--color-border-warm);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: left;
}

.wardrobe-card-item.selected {
  border: 2px solid var(--color-honey-gold);
  background: rgba(254, 243, 199, 0.5);
}

.wci-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wci-icon {
  font-size: 1.4rem;
}

.wci-name {
  font-weight: 700;
  font-size: var(--font-size-xs);
  color: var(--color-text-primary);
}

.wci-cost {
  font-size: 0.7rem;
  color: var(--color-honey-dark);
}

.btn-cosmetic-action {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-cosmetic-action.btn-buy {
  background: var(--color-honey-gold);
  color: #FFF;
}

.btn-cosmetic-action.btn-equip {
  background: #E5E7EB;
  color: #1F2937;
}

.btn-cosmetic-action.equipped {
  background: #16A34A;
  color: #FFF;
}

/* Ranking Queen Spotlight & Table */
.queen-spotlight {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(254, 243, 199, 0.8) 100%);
  border: 2px solid var(--color-honey-gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.queen-crown-icon {
  font-size: 2rem;
  animation: gentleFloat 2.5s infinite ease-in-out;
}

.queen-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-honey-dark);
  display: block;
}

.queen-nick {
  font-size: 1.1rem;
  color: var(--color-honey-dark);
  display: block;
}

.queen-score {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-honey-deep);
}

.ranking-list-wrapper {
  max-height: 200px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-warm);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-xs);
  text-align: left;
}

.ranking-table th {
  background: var(--color-bg-cream);
  padding: 6px 8px;
  color: var(--color-honey-dark);
  font-weight: 800;
}

.ranking-table td {
  padding: 6px 8px;
  border-top: 1px solid rgba(253, 230, 138, 0.5);
}

.ranking-table tr.top-1 {
  background: rgba(245, 158, 11, 0.12);
  font-weight: 800;
}

/* ==========================================================================
   11. Selector de Mapas y Estilos Visuales del Menú Principal
   ========================================================================== */
.start-card {
  max-width: 350px !important;
  width: 92% !important;
  padding: 14px 16px !important;
  margin: auto !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 
    0 16px 40px -8px rgba(217, 119, 6, 0.35),
    0 0 24px 4px rgba(245, 158, 11, 0.22) !important;
}

/* Header de Marca Compacto */
.brand-header-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 8px;
  width: 100%;
}

.brand-logo-compact {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 3px 8px rgba(217, 119, 6, 0.3));
}

.brand-titles-compact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-titles-compact .brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-honey-dark);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.brand-titles-compact .brand-tagline {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin: 2px 0 0 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* Píldora del Objetivo del Juego */
.goal-pill {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95) 0%, rgba(253, 230, 138, 0.9) 100%);
  border: 1.5px solid var(--color-honey-gold);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
  width: 100%;
}

.goal-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.goal-text {
  font-size: 0.74rem;
  color: var(--color-honey-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.goal-text strong {
  color: var(--color-honey-deep);
}

/* Nick Row y Honey Points Compactos */
.start-card .lobby-nick-section {
  background: rgba(254, 243, 199, 0.65);
  border: 1px solid var(--color-border-warm);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-bottom: 8px;
  width: 100%;
}

.nick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nick-field {
  flex: 1;
}

.start-card .nick-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-honey-dark);
  display: block;
  margin-bottom: 2px;
}

.start-card .nick-input {
  padding: 4px 8px;
  font-size: 0.78rem;
  height: 28px;
}

.start-card .btn-save-nick {
  padding: 0 10px;
  height: 28px;
  font-size: 0.82rem;
}

.start-card .honey-points-pill {
  padding: 3px 8px;
  height: 28px;
}

.honey-points-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF;
  border: 1.5px solid var(--color-border-warm);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.10);
}

.hp-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.hp-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
}

.hp-value {
  font-size: 0.85rem;
  color: var(--color-honey-dark);
}

/* Selector Horizontal de Mapas - Cero Cortes de Palabras */
.map-selector-compact {
  width: 100%;
  margin-bottom: 10px;
}

.map-pills-row {
  display: flex;
  gap: 5px;
  width: 100%;
}

.map-pill {
  flex: 1;
  background: #FFF;
  border: 1.5px solid var(--color-border-warm);
  border-radius: var(--radius-pill);
  padding: 5px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

.map-pill.active {
  border-color: var(--color-honey-gold);
  background: rgba(254, 243, 199, 0.9);
  color: var(--color-honey-dark);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.map-pill-dot {
  color: #16A34A;
  font-size: 0.55rem;
  animation: gentlePulse 1.8s infinite ease-in-out;
}

.map-pill.locked {
  background: rgba(243, 244, 246, 0.8);
  color: #9CA3AF;
  border-color: rgba(229, 231, 235, 0.9);
  cursor: default;
}

/* Botones de Acción del Menú */
.btn-start-game {
  width: 100%;
  padding: 10px 16px !important;
  font-size: 0.95rem !important;
  font-weight: 800;
  margin-bottom: 6px;
  border-radius: var(--radius-md) !important;
}

.btn-hall-explore {
  width: 100%;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  font-weight: 800;
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%) !important;
  color: #78350F !important;
  border: 1.5px solid #F59E0B !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.2) !important;
  margin-bottom: 8px;
}

.btn-hall-explore:hover {
  background: linear-gradient(135deg, #FEF3C7 0%, #D97706 100%) !important;
  transform: translateY(-1px);
}

.menu-tools-row {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
}

.btn-tool {
  flex: 1;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--color-border-warm);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-honey-dark);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.1);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-align: center;
}

.btn-tool:hover {
  background: rgba(254, 243, 199, 0.85);
  border-color: var(--color-honey-gold);
  transform: translateY(-1px);
}

.controls-hint-inline {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  line-height: 1.2;
}

.controls-hint-inline kbd {
  background: #FFF;
  border: 1px solid var(--color-border-warm);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.64rem;
  font-family: inherit;
  font-weight: 700;
}

.hint-sep {
  opacity: 0.4;
}

.pulse-glow {
  animation: startButtonPulse 2.4s infinite ease-in-out;
}

@keyframes startButtonPulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(245, 158, 11, 0.65);
    transform: scale(1.02);
  }
}

/* ==========================================================================
   12. Modo Panorámica del Lobby y Gran Salón de la Fama (Estilo Mario 64 Hub)
   ========================================================================== */
.btn-peek-lobby {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(254, 243, 199, 0.9);
  border: 1.5px solid var(--color-honey-gold);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-honey-dark);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
  transition: all var(--transition-fast);
  z-index: 10;
}

.btn-peek-lobby:hover {
  background: var(--color-honey-gold);
  color: #FFF;
  transform: translateY(-1px);
}

.peek-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(254, 243, 199, 0.95);
  backdrop-filter: blur(8px);
  border: 2px solid var(--color-honey-gold);
  border-radius: 9999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.25);
  cursor: pointer;
  z-index: 120;
  max-width: 90%;
  text-align: center;
  animation: bannerFloat 2s infinite ease-in-out;
}

.peek-banner-icon {
  font-size: 1.1rem;
}

.peek-banner-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-honey-dark);
}

@keyframes bannerFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

.start-card {
  position: relative;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.start-card.peek-mode {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(40px) scale(0.96) !important;
}

/* Botón Explorar Hall de la Fama */
.btn-hall-explore {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 50%, #F59E0B 100%);
  border: 2px solid var(--color-honey-deep);
  color: #78350F;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-hall-explore:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35);
}

.pulse-subtle {
  animation: subtlePulse 3s infinite ease-in-out;
}

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
  }
  50% {
    box-shadow: 0 0 16px 2px rgba(245, 158, 11, 0.5);
  }
}

/* Overlay de Exploración del Gran Salón */
.hall-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  z-index: 30;
  background: transparent !important;
}

.hall-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--color-border-warm);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.15);
  pointer-events: auto;
}

.btn-hall-nav {
  padding: 6px 10px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.hall-title-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hall-badge-icon {
  font-size: 1rem;
}

.hall-badge-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-honey-dark);
}

.hall-hp-pill {
  padding: 4px 8px;
  margin: 0;
  box-shadow: none;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-play-quick {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Prompt de Proximidad Contextual */
.hall-prompt-pill {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(254, 243, 199, 0.96);
  border: 2px solid var(--color-honey-gold);
  border-radius: 9999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.3);
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  max-width: 90%;
  animation: promptPulse 1.8s infinite ease-in-out;
}

.hall-prompt-pill .prompt-icon {
  font-size: 1.1rem;
}

.hall-prompt-pill .prompt-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-honey-dark);
}

@keyframes promptPulse {
  0%, 100% {
    transform: translate(-50%, 0) scale(1);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
  }
  50% {
    transform: translate(-50%, -3px) scale(1.02);
    box-shadow: 0 0 20px 4px rgba(245, 158, 11, 0.55);
  }
}

.hall-bottom-bar {
  display: flex;
  justify-content: center;
  pointer-events: none;
  margin-bottom: 2px;
}

.hall-controls-legend {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-border-warm);
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.64rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}

.legend-sep {
  opacity: 0.4;
}



