/**
 * BurnZone.io - Design System & Stylesheet
 * Estética Esports Dark Neon, Anti-disrupciones en móvil y Glassmorphism
 */

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(14, 18, 28, 0.85);
  --border-neon: rgba(168, 85, 247, 0.4);
  --color-primary: #a855f7; /* Violeta BurnZone */
  --color-primary-glow: rgba(168, 85, 247, 0.5);
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.5);
  --color-green: #10b981;
  --color-gold: #fbbf24;
  --color-danger: #ef4444;
  --font-main: 'Outfit', -apple-system, sans-serif;
  --font-display: 'Rajdhani', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  background-color: var(--bg-dark);
  font-family: var(--font-main);
  color: #f8fafc;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Canvas de Juego */
#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Pantallas y Overlays Generales */
.overlay-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, rgba(7, 9, 14, 0.95) 100%);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 10px;
}

/* Fondo Dinámico del Mapa de Batalla para el Lobby */
#lobbyScreen {
  background: 
    radial-gradient(circle at center, rgba(7, 9, 14, 0.42) 0%, rgba(7, 9, 14, 0.72) 52%, rgba(4, 5, 8, 0.92) 100%),
    url('/assets/burnzone_map_bg.jpg') center center / cover no-repeat fixed;
  backdrop-filter: blur(2px);
}

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

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

/* Tarjeta del Menú Lobby */
.lobby-card {
  width: 92%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  background: rgba(14, 18, 28, 0.90);
  border: 1px solid var(--border-neon);
  border-radius: 20px;
  padding: 25px 25px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(168, 85, 247, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  position: relative;
}

.lobby-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-primary), var(--color-gold));
}

.glitch-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 15px var(--color-primary-glow);
}

.glitch-title .dot-io {
  color: var(--color-cyan);
  text-shadow: 0 0 15px var(--color-cyan-glow);
}

.tagline {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-top: 4px;
  margin-bottom: 25px;
}

.lobby-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-group input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.btn-primary {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--color-primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--color-primary-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-subtext {
  font-size: 0.75rem;
  font-family: var(--font-main);
  opacity: 0.8;
  font-weight: 400;
  letter-spacing: 0;
}

.btn-competitive {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4) !important;
  color: #000 !important;
}

.btn-competitive:hover {
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6) !important;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--color-cyan);
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Selector de Arenas (Tiers Póker) */
.tier-selector-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.tier-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

@media (max-width: 650px) {
  .tier-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tier-card {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 4px 7px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(30, 41, 59, 0.85);
}

.tier-card.selected {
  border-color: var(--color-gold);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
}

.tier-card.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 0.65rem;
  color: var(--color-gold);
  font-weight: 900;
}

.tier-badge {
  font-size: 1.25rem;
  line-height: 1;
}

.tier-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.tier-usd {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--color-gold);
}

.tier-bzone {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
}

.tier-players {
  font-size: 0.6rem;
  color: var(--color-cyan);
  margin-top: 2px;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Pantalla de Espera de Matchmaking (Lobby Queue) */
.lobby-waiting-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.25s ease-out;
}

.waiting-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.waiting-badge {
  font-size: 1.8rem;
}

.waiting-title-box {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.waiting-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  margin: 0;
}

.waiting-room-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-cyan);
  letter-spacing: 1px;
}

.waiting-radar-box {
  position: relative;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  overflow: hidden;
}

.radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  animation: radarPing 2.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  pointer-events: none;
}

@keyframes radarPing {
  0% { width: 20px; height: 20px; opacity: 1; }
  100% { width: 240px; height: 240px; opacity: 0; }
}

.waiting-status-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.waiting-status-msg {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 1px;
}

.waiting-player-ratio {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
}

.waiting-min-notice {
  font-size: 0.72rem;
  color: #94a3b8;
}

.waiting-countdown-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(249, 115, 22, 0.3) 100%);
  border: 1px solid #f97316;
  border-radius: 10px;
  padding: 9px;
  font-size: 1rem;
  font-weight: 800;
  color: #fed7aa;
  letter-spacing: 1px;
  animation: pulse 1s infinite;
}

.waiting-prize-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
}

.waiting-prize-card .prize-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 1px;
}

.waiting-prize-card .prize-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.waiting-roster-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.roster-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-align: left;
}

.waiting-players-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.waiting-player-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.75rem;
  color: #e2e8f0;
}

.waiting-player-chip.is-you {
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.2);
  color: #67e8f9;
}

.waiting-player-chip.is-bot {
  border-color: #a855f7;
  color: #d8b4fe;
}

.btn-cancel-waiting {
  width: 100%;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn-cancel-waiting:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.btn-cancel-waiting:active {
  transform: scale(0.98);
  background: rgba(239, 68, 68, 0.5);
}

/* Barra de Billetera Phantom y Ranking */
.wallet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.wallet-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-audio-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 11px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-audio-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: translateY(-1px);
}

.btn-audio-pill.active {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.btn-audio-pill.muted {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  opacity: 0.75;
}

.btn-leaderboard-top {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.3) 100%);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-leaderboard-top:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.5) 100%);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.btn-wallet-profile {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: opacity 0.2s;
}

.btn-wallet-profile:hover {
  opacity: 0.8;
}

.btn-wallet {
  background: #ab9ff2;
  color: #1a1a2e;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(171, 159, 242, 0.4);
  transition: transform 0.15s ease;
}

.btn-wallet:hover {
  transform: scale(1.03);
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(171, 159, 242, 0.15);
  border: 1px solid #ab9ff2;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.wallet-address {
  font-family: monospace;
  color: #ab9ff2;
  font-weight: 700;
}

.wallet-balance {
  font-family: var(--font-display);
  color: var(--color-gold);
  font-weight: 700;
}

.btn-mini {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-mini:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-disconnect {
  background: rgba(239, 68, 68, 0.25) !important;
  border: 1px solid rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  cursor: pointer;
}

.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.6) !important;
  color: #fff !important;
  transform: scale(1.05);
}

.btn-disconnect.is-dev {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border-color: #c084fc !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5) !important;
}

.lobby-status {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
}

.status-indicator {
  color: var(--color-green);
  animation: pulse 1.5s infinite;
}

.controls-guide {
  display: flex;
  justify-content: space-around;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #94a3b8;
}

.guide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.guide-item .key {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
}

/* HUD Superior en Juego */
.game-hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

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

.hud-top-left {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prize-badge {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

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

.prize-info {
  display: flex;
  flex-direction: column;
}

.prize-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
}

.prize-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gold);
}

.kill-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 280px;
}

.kill-feed-item {
  background: rgba(15, 23, 42, 0.85);
  border-left: 3px solid var(--color-danger);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #e2e8f0;
  animation: slideInLeft 0.25s ease-out;
}

.hud-top-center {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.alive-counter, .storm-indicator {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  padding: 8px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alive-counter {
  color: var(--color-cyan);
  border-color: var(--color-cyan-glow);
}

.storm-indicator {
  color: var(--color-primary);
  border-color: var(--color-primary-glow);
}

.hud-top-right {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hud-audio-quick {
  display: flex;
  gap: 6px;
  z-index: 60;
  pointer-events: auto;
}

.hud-audio-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s ease;
}

.hud-audio-btn:hover {
  transform: scale(1.08);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

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

.hud-audio-btn.muted {
  opacity: 0.45;
  filter: grayscale(1);
}

.minimap-container {
  width: 140px;
  height: 140px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--border-neon);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

#minimapCanvas {
  width: 100%;
  height: 100%;
}

.spectator-banner {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.65), 0 4px 20px rgba(0, 0, 0, 0.8);
  padding: 10px 22px;
  border-radius: 40px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
  pointer-events: auto !important;
  backdrop-filter: blur(12px);
  animation: spectatorPulse 2s infinite ease-in-out;
}

@keyframes spectatorPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.85); }
}

.spectator-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fca5a5;
  font-family: var(--font-display);
}

.spectator-eye {
  font-size: 1.2rem;
}

.btn-leave-spectator {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 22px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.btn-leave-spectator:hover {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.9);
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

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

.btn-leave-spectator.hud-spec-exit {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 12px;
  margin-right: 4px;
}

.btn-mini-orient {
  background: #06b6d4;
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-mini-orient:hover {
  background: #22d3ee;
  transform: scale(1.05);
}

/* Cuenta Regresiva */
.countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  pointer-events: none;
  background: rgba(7, 9, 14, 0.6);
  backdrop-filter: blur(4px);
}

.countdown-overlay.hidden {
  display: none;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
  animation: zoomPop 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) infinite;
}

.countdown-sub {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

/* Modal de Podio */
.podium-card {
  width: 92%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 2px solid var(--color-gold);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
}

.podium-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.podium-close-btn:active {
  background: rgba(239, 68, 68, 0.5);
  transform: scale(0.92);
}

.podium-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
  letter-spacing: 2px;
  margin-top: 5px;
}

.podium-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 15px;
}

.podium-ranks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  max-height: 48vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.podium-actions {
  margin-top: auto;
  padding-top: 10px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-card) 25%);
  z-index: 5;
}

.podium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.podium-row.rank-1 {
  border-color: var(--color-gold);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), rgba(15, 23, 42, 0.9));
}

.podium-row.rank-2 {
  border-color: #cbd5e1;
}

.podium-row.rank-3 {
  border-color: #b45309;
}

.podium-badge {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  width: 32px;
}

.podium-name {
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
  text-align: left;
  margin-left: 12px;
}

.podium-reward {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-gold);
  font-size: 1.1rem;
}

/* Controles Táctiles (Móvil) */
.touch-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
  pointer-events: none;
  z-index: 25;
}

.touch-controls.hidden {
  display: none;
}

.joystick-zone {
  position: absolute;
  bottom: 20px;
  width: 140px;
  height: 140px;
  pointer-events: auto;
}

.left-zone {
  left: 25px;
}

.right-zone {
  right: 25px;
}

.joystick-base {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-zone .joystick-base {
  border-color: var(--color-cyan-glow);
}

.right-zone .joystick-base {
  border-color: var(--color-primary-glow);
}

.joystick-knob {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  position: absolute;
  pointer-events: none;
  transition: transform 0.05s ease-out;
}

/* Zona de Botones Táctiles Rápidos (Sprint & Dash) */
.touch-actions-zone {
  position: absolute;
  right: 175px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
  z-index: 50;
}

.touch-action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, border-color 0.2s, background 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.touch-action-btn.sprint-btn {
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.touch-action-btn.sprint-btn.active,
.touch-action-btn.sprint-btn:active {
  background: rgba(245, 158, 11, 0.45);
  border-color: #fbbf24;
  transform: scale(0.92);
}

.touch-action-btn.dash-btn {
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.touch-action-btn.dash-btn:active {
  background: rgba(6, 182, 212, 0.45);
  border-color: #38bdf8;
  transform: scale(0.92);
}

/* Advertencia de Orientación Horizontal (Descartable) */
/* Notificación Flotante de Orientación Horizontal (Discreta, Flotante y No Bloqueante) */
.orientation-warning {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* No bloquea clics debajo */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.orientation-warning.dismissed {
  display: none !important;
}

.warning-box {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(6, 182, 212, 0.6);
  border-radius: 30px;
  padding: 8px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto; /* Permite cerrar el toast */
}

.rotate-icon {
  font-size: 1.3rem;
  margin-bottom: 0;
  animation: rotatePhone 2.5s infinite ease-in-out;
}

.warning-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.warning-text strong {
  font-size: 0.8rem;
  color: #fff;
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}

.warning-text span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.warning-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: background 0.15s;
}

.warning-close-btn:active {
  background: rgba(239, 68, 68, 0.5);
}

/* Solo se muestra en móvil vertical si no fue descartado */
@media screen and (orientation: portrait) and (max-width: 900px) {
  .orientation-warning:not(.dismissed) {
    display: flex;
  }
}

/* Animaciones */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes zoomPop {
  0% { transform: scale(0.6); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

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

@keyframes rotatePhone {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

/* ==========================================
   VITALES DEL JUGADOR (ESCUDO + SALUD)
   ========================================== */
.hud-bottom-left {
  position: absolute;
  bottom: 20px;
  left: 20px;
  pointer-events: none;
  z-index: 25;
}

.vitals-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 210px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.vital-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vital-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  width: 65px;
}

.vital-bar-bg {
  flex: 1;
  height: 9px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vital-bar-fill {
  height: 100%;
  transition: width 0.15s ease-out;
  border-radius: 6px;
}

.shield-fill {
  background: linear-gradient(90deg, #0284c7 0%, #06b6d4 100%);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.hp-fill {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.vital-val {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  width: 30px;
  text-align: right;
}

/* ==========================================
   TARJETA DE ARMA EQUIPADA
   ========================================== */
.hud-bottom-right {
  position: absolute;
  bottom: 20px;
  right: 20px;
  pointer-events: none;
  z-index: 25;
}

.weapon-hud-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.weapon-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.weapon-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.weapon-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.weapon-stats {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================
   ALERTA DE AIRDROP LEGENDARIO
   ========================================== */
.airdrop-alert {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
  color: #000;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  padding: 8px 24px;
  border-radius: 30px;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.8);
  letter-spacing: 1px;
  pointer-events: none;
  animation: airdropPulse 1.2s infinite alternate ease-in-out;
  z-index: 40;
}

@keyframes airdropPulse {
  0% { transform: translateX(-50%) scale(0.97); box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
  100% { transform: translateX(-50%) scale(1.03); box-shadow: 0 0 35px rgba(245, 158, 11, 0.95); }
}

@media (max-width: 768px) {
  .hud-bottom-left {
    bottom: 95px;
    left: 10px;
    transform: scale(0.85);
    transform-origin: bottom left;
  }
  .hud-bottom-right {
    bottom: 95px;
    right: 10px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}

/* ==========================================
   ALERTA DE KILL BOUNTY COBRADO
   ========================================== */
.bounty-alert {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(245, 158, 11, 0.95) 100%);
  color: #fff;
  border: 2px solid #fbbf24;
  border-radius: 20px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.3);
  z-index: 50;
  pointer-events: none;
  animation: bountyPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bounty-alert.hidden {
  display: none !important;
}

.bounty-alert-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

.bounty-alert-body {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.bounty-alert-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.bounty-alert-sub {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fef08a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

@keyframes bountyPop {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  70% { transform: translateX(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ==========================================================================
   BANNER DE LOCUTOR DE COMBATE (KINETIC TYPOGRAPHY & ESPORTS ANNOUNCER)
   ========================================================================== */
.announcer-banner {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: announcerPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.announcer-content {
  position: relative;
  background: rgba(10, 14, 23, 0.94);
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 35px var(--color-primary-glow), inset 0 0 20px rgba(168, 85, 247, 0.25);
  border-radius: 16px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(12px);
}

.announcer-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
  animation: announcerIconPulse 0.75s infinite alternate ease-in-out;
}

.announcer-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.announcer-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 25px currentColor;
}

.announcer-subtitle {
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Variantes de color según el evento */
.announcer-banner.theme-red .announcer-content {
  border-color: #ef4444;
  box-shadow: 0 0 45px rgba(239, 68, 68, 0.75), inset 0 0 20px rgba(239, 68, 68, 0.3);
}
.announcer-banner.theme-red .announcer-title { color: #f87171; }

.announcer-banner.theme-cyan .announcer-content {
  border-color: #06b6d4;
  box-shadow: 0 0 45px rgba(6, 182, 212, 0.75), inset 0 0 20px rgba(6, 182, 212, 0.3);
}
.announcer-banner.theme-cyan .announcer-title { color: #22d3ee; }

.announcer-banner.theme-gold .announcer-content {
  border-color: #fbbf24;
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.85), inset 0 0 25px rgba(251, 191, 36, 0.35);
}
.announcer-banner.theme-gold .announcer-title { color: #fde047; }

.announcer-banner.theme-flame .announcer-content {
  border-color: #f97316;
  box-shadow: 0 0 45px rgba(249, 115, 22, 0.8), inset 0 0 20px rgba(249, 115, 22, 0.3);
}
.announcer-banner.theme-flame .announcer-title { color: #fb923c; }

@keyframes announcerPop {
  0% { transform: translateX(-50%) scale(0.3) translateY(-35px); opacity: 0; }
  70% { transform: translateX(-50%) scale(1.08) translateY(5px); opacity: 1; }
  100% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
}

@keyframes announcerIconPulse {
  0% { transform: scale(0.92); }
  100% { transform: scale(1.15) rotate(6deg); }
}

/* Badge de Bounty en Killfeed */
.kill-bounty-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-left: 5px;
}

/* Desglose de Podio */
.podium-breakdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.podium-breakdown-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--font-body);
}

.podium-breakdown-total {
  font-family: var(--font-display);
  font-weight: 800;
  color: #10b981;
  font-size: 1.15rem;
}

/* ==========================================================================
   MODAL DE LEADERBOARD & PERFIL DE JUGADOR (ESPORTS DESIGN)
   ========================================================================== */
.leaderboard-modal-card {
  width: 95%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 0 50px var(--color-primary-glow);
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  text-align: left;
}

.leaderboard-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, var(--color-primary), var(--color-cyan));
}

.leaderboard-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-badge-icon {
  font-size: 1.8rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 6px 10px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.leaderboard-modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
}

.leaderboard-modal-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* Cinta de Métricas Globales del Protocolo */
.protocol-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-pill {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.text-flame {
  color: #f97316;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.text-cyan {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.text-gold {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.text-green {
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Barra de Pestañas */
.leaderboard-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.lb-tab {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lb-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lb-tab.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(147, 51, 234, 0.55) 100%);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.lb-tab-profile {
  margin-left: auto;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.3);
}

.lb-tab-profile.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35) 0%, rgba(14, 165, 233, 0.55) 100%);
  color: #fff;
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px var(--color-cyan-glow);
}

/* Contenedor de Vistas */
.lb-view-container {
  flex: 1;
  overflow-y: auto;
  max-height: 52vh;
  scrollbar-width: thin;
}

.lb-table-wrapper {
  overflow-x: auto;
}

.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 0.9rem;
}

.lb-table thead th {
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.lb-table tbody tr {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.lb-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.lb-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
}

.lb-table tbody td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.lb-table tbody td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.lb-table tbody tr.current-user-row {
  background: rgba(168, 85, 247, 0.16) !important;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: inset 0 0 15px rgba(168, 85, 247, 0.2);
}

.current-user-row td {
  font-weight: 700;
}

/* Medallas y Rangos */
.rank-badge {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.rank-gold {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  font-size: 1.25rem;
}

.rank-silver {
  color: #cbd5e1;
  text-shadow: 0 0 10px rgba(203, 213, 225, 0.8);
  font-size: 1.25rem;
}

.rank-bronze {
  color: #d97706;
  text-shadow: 0 0 10px rgba(217, 119, 6, 0.8);
  font-size: 1.25rem;
}

.player-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name-text {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-pubkey-sub {
  font-family: monospace;
  font-size: 0.72rem;
  color: #64748b;
}

.you-tag {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.stat-subtext {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1px;
}

.prize-highlight {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   VISTA DE PERFIL DE JUGADOR (PROFILE CARD)
   ========================================================================== */
.player-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 20px;
}

.profile-avatar {
  font-size: 2.4rem;
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid var(--color-primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.profile-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-player-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.profile-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.profile-wallet-address {
  font-family: monospace;
  font-size: 0.8rem;
  color: #94a3b8;
}

.profile-balance-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
}

.profile-bal-label {
  font-size: 0.68rem;
  color: #fbbf24;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-bal-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.profile-stat-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
}

.p-stat-icon {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-stat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p-stat-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.p-stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}

.p-stat-rank {
  font-size: 0.75rem;
  color: #a855f7;
  font-weight: 700;
}

.p-stat-sub {
  font-size: 0.72rem;
  color: #64748b;
}

/* Responsividad para móviles */
@media (max-width: 640px) {
  .leaderboard-modal-card {
    padding: 16px 14px;
  }
  .protocol-metrics-ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .profile-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-balance-badge {
    align-items: flex-start;
    width: 100%;
  }
}

/* ==========================================
   TIENDA & ARMERÍA WEB3 - SKINS & COSMÉTICOS
   ========================================== */
.btn-shop-top {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.35));
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.btn-shop-top:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(245, 158, 11, 0.55));
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
  border-color: #fbbf24;
}

#leaderboardModal,
#shopModal,
#guideModal,
#walletModal {
  z-index: 100;
}

.shop-modal-card {
  max-width: 920px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.shop-user-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 15px;
  gap: 15px;
  flex-wrap: wrap;
}

.shop-burn-badge {
  font-size: 0.82rem;
  color: #fdba74;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-burn-badge strong {
  color: #fb923c;
}

.shop-balance-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-balance-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
}

.shop-balance-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
}

.shop-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 15px;
}

.shop-preview-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.preview-canvas-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

#shopPreviewCanvas {
  width: 220px;
  height: 220px;
  display: block;
}

.shop-preview-rarity-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 6px;
}

.rarity-common {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.rarity-rare {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.rarity-epic {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.rarity-legendary {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(245, 158, 11, 0.35));
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.preview-meta {
  margin-bottom: 15px;
  width: 100%;
}

.shop-preview-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.shop-preview-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.preview-action-row {
  width: 100%;
  margin-top: auto;
}

.shop-action-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.shop-action-btn.equip {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  border: 1px solid #22d3ee;
  color: #fff;
}

.shop-catalog-panel {
  max-height: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: 6px;
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.shop-item-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.shop-item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(15, 23, 42, 0.85);
}

.shop-item-card.selected {
  border-color: #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
}

.shop-item-card.equipped-border {
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.shop-item-preview-box {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shop-item-card:hover .shop-item-preview-box {
  transform: scale(1.1);
}

.mini-soldier-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-soldier-visor {
  width: 12px;
  height: 6px;
  border-radius: 0 0 6px 6px;
  position: absolute;
  top: 13px;
}

.mini-crown-icon {
  position: absolute;
  top: -12px;
  font-size: 14px;
  filter: drop-shadow(0 0 4px #fbbf24);
}

.mini-tracer-indicator {
  width: 32px;
  height: 6px;
  border-radius: 3px;
  margin-top: 4px;
}

.shop-item-icon {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.shop-item-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.shop-item-rarity-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.shop-item-price-tag {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-item-status-tag {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.status-owned {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-equipped {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

@media (max-width: 768px) {
  .shop-main-layout {
    grid-template-columns: 1fr;
  }
  .shop-preview-panel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .preview-canvas-wrapper {
    width: 160px;
    height: 160px;
  }
  #shopPreviewCanvas {
    width: 160px;
    height: 160px;
  }
  .shop-catalog-panel {
    max-height: 350px;
  }
}

/* ==========================================================================
   MODAL DE SELECCIÓN DE WALLET (PHANTOM / SOLANA / DEV)
   ========================================================================== */
.wallet-modal-card {
  background: rgba(10, 14, 23, 0.96);
  border: 1px solid var(--border-neon);
  box-shadow: 0 0 40px var(--color-primary-glow);
  border-radius: 20px;
  padding: 24px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(16px);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.wallet-modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  margin: 0;
}

.wallet-modal-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.wallet-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-opt-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.wallet-opt-card.featured {
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  position: relative;
}

.wallet-opt-card.featured-phantom {
  border-color: #ab9ff2;
  box-shadow: 0 0 18px rgba(171, 159, 242, 0.35);
  background: linear-gradient(135deg, rgba(20, 16, 40, 0.9), rgba(30, 20, 60, 0.9));
  position: relative;
}

.wallet-opt-card.featured-phantom .opt-tag {
  color: #ab9ff2;
}

.btn-phantom-1click {
  background: linear-gradient(135deg, #ab9ff2, #7c3aed);
  color: #fff;
  border: none;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-phantom-1click:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.btn-phantom-1click:active {
  transform: translateY(1px);
}

.opt-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #06b6d4;
  letter-spacing: 0.5px;
  margin-bottom: -4px;
}

.opt-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.opt-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.opt-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.opt-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 2px;
}

.opt-input-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.wallet-text-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
}

.wallet-text-input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.opt-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 8px;
  white-space: nowrap;
}

.opt-btn-full {
  width: 100%;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 8px;
}

/* ==========================================================================
   BOTONES DE GUÍA E IDIOMA EN HEADER Y HERO
   ========================================================================== */
.btn-guide-top {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(14, 165, 233, 0.32));
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.18);
}

.btn-guide-top:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.32), rgba(14, 165, 233, 0.5));
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.4);
  border-color: #38bdf8;
}

.btn-lang-top {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-lang-top:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

/* Botones de Redes Sociales Oficiales en Header y Footer */
.btn-social-top {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-x-top:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.btn-tg-top:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.lobby-community-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.community-footer-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.75px;
}

.community-buttons-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-community-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
}

.btn-community-x {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f8fafc;
}

.btn-community-x:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn-community-tg {
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.btn-community-tg:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.community-icon {
  font-size: 0.95rem;
}

.lobby-quick-links {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.hero-guide-pill {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}

.hero-guide-pill:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(168, 85, 247, 0.3));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   BARRA OFICIAL DE CONTRATO $BZONE (ANTI-CLONES & VERIFICACIÓN)
   ========================================================================== */
.token-ca-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(168, 85, 247, 0.38);
  border-radius: 12px;
  padding: 7px 14px;
  margin: 10px auto 4px auto;
  max-width: 580px;
  width: 95%;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(168, 85, 247, 0.08);
  transition: all 0.25s ease;
}

.token-ca-banner:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.25);
}

.token-ca-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
}

.token-ca-icon {
  font-size: 1.1rem;
}

.token-ca-label {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.token-ca-code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  user-select: all;
}

.token-ca-network-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.token-ca-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ca-action {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-ca-copy {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
}

.btn-ca-copy:hover {
  background: rgba(168, 85, 247, 0.38);
  border-color: #c084fc;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-ca-copy.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #a7f3d0;
}

.btn-ca-explorer {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.btn-ca-explorer:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-ca-pump {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-ca-pump:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #10b981;
  color: #a7f3d0;
  transform: translateY(-1px);
}

@media (max-width: 650px) {
  .token-ca-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
    gap: 8px;
  }
  .token-ca-badge {
    justify-content: center;
  }
  .token-ca-code {
    max-width: 140px;
  }
  .token-ca-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   MODAL DE GUÍA Y CÓMO FUNCIONA EL JUEGO
   ========================================================================== */
.guide-modal-card {
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.guide-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guide-content-scroll {
  max-height: calc(88vh - 160px);
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-content-scroll::-webkit-scrollbar {
  width: 6px;
}
.guide-content-scroll::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.guide-view-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-view-section.hidden {
  display: none !important;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.guide-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.guide-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.guide-card-icon {
  font-size: 1.4rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.guide-card-desc {
  font-size: 0.83rem;
  color: #94a3b8;
  line-height: 1.45;
}

.guide-card-desc strong {
  color: #e2e8f0;
}

.guide-highlight-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-highlight-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-split-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.guide-prize-pill {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-prize-rank {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fbbf24;
}

.guide-prize-share {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: #10b981;
}

.guide-prize-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.guide-bounty-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.guide-bounty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.guide-bounty-card {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-bounty-card:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.2);
}

.guide-bounty-tier {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: #38bdf8;
}

.guide-bounty-entry {
  font-size: 0.7rem;
  color: #94a3b8;
}

.guide-bounty-payout {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.guide-bounty-sub {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 600;
}

.guide-faq-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-faq-question {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-faq-answer {
  font-size: 0.83rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.guide-faq-answer strong {
  color: #fbbf24;
}

/* ==========================================================================
   OPTIMIZACIONES MÓVILES (LANDSCAPE & PANTALLAS COMPACTAS)
   Máxima Visibilidad: Carteles Compactos y No Invasivos
   ========================================================================== */
@media (max-width: 900px), (max-height: 520px) {
  /* 1. HUD Superior Compacto */
  .hud-top-center {
    top: 6px;
    gap: 6px;
  }
  .alive-counter, .storm-indicator {
    padding: 3px 8px;
    font-size: 0.8rem;
    border-radius: 6px;
    gap: 4px;
  }
  .hud-top-left {
    top: 6px;
    left: 6px;
  }
  .prize-badge {
    padding: 3px 8px;
    border-radius: 6px;
  }
  .prize-label { font-size: 0.55rem; }
  .prize-value { font-size: 0.78rem; }
  .kill-feed {
    max-width: 170px;
    gap: 2px;
  }
  .kill-feed-item {
    padding: 2px 6px;
    font-size: 0.68rem;
  }
  .hud-top-right {
    top: 6px;
    right: 6px;
    gap: 4px;
  }
  .minimap-container {
    width: 85px;
    height: 85px;
  }
  .hud-audio-quick {
    gap: 4px;
  }
  .hud-audio-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  /* 2. Carteles y Avisos Centrales: Delgados, Translúcidos y no invasivos */
  .announcer-banner {
    top: 10px;
    transform: translateX(-50%) scale(0.68);
    transform-origin: top center;
    pointer-events: none;
    opacity: 0.88;
    z-index: 60;
  }
  .announcer-content {
    padding: 3px 10px;
    border-radius: 8px;
    gap: 6px;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(6px);
  }
  .announcer-title {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
  }
  .announcer-subtitle {
    font-size: 0.65rem;
  }
  .announcer-icon {
    font-size: 1rem;
  }

  .bounty-alert {
    top: 10px;
    padding: 3px 10px;
    border-radius: 8px;
    gap: 6px;
    transform: translateX(-50%) scale(0.72);
    pointer-events: none;
    opacity: 0.88;
  }
  .bounty-alert-icon { font-size: 1rem; }
  .bounty-alert-title { font-size: 0.78rem; }
  .bounty-alert-sub { font-size: 0.65rem; }

  .airdrop-alert {
    top: 10px;
    padding: 3px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    transform: translateX(-50%) scale(0.75);
    pointer-events: none;
    opacity: 0.88;
  }

  .spectator-banner {
    bottom: 12px;
    padding: 5px 12px;
    font-size: 0.78rem;
    gap: 8px;
  }
  .btn-leave-spectator {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  /* 3. Tienda & Armería Web3 Optimizada para Móvil y Scroll Táctil */
  .shop-modal-card {
    padding: 10px 14px;
    max-height: 94vh;
    border-radius: 14px;
  }
  .shop-modal-card .leaderboard-modal-header {
    padding-bottom: 6px;
    margin-bottom: 6px;
  }
  .shop-modal-card .leaderboard-modal-title {
    font-size: 1.05rem;
  }
  .shop-modal-card .leaderboard-modal-sub {
    display: none;
  }
  .shop-user-ribbon {
    padding: 4px 10px;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .shop-burn-badge {
    font-size: 0.7rem;
    gap: 4px;
  }
  .shop-balance-box {
    gap: 6px;
  }
  .shop-balance-label {
    font-size: 0.68rem;
  }
  .shop-balance-val {
    font-size: 0.95rem;
  }
  .shop-tabs-bar {
    gap: 6px;
    margin-bottom: 8px;
  }
  .shop-tabs-bar .lb-tab {
    padding: 4px 10px;
    font-size: 0.72rem;
  }
  .shop-main-layout {
    grid-template-columns: 195px 1fr;
    gap: 12px;
    margin-top: 6px;
  }
  .shop-preview-panel {
    padding: 10px;
    border-radius: 12px;
  }
  .preview-canvas-wrapper {
    width: 120px;
    height: 120px;
    margin-bottom: 6px;
  }
  #shopPreviewCanvas {
    width: 120px;
    height: 120px;
  }
  .shop-preview-name {
    font-size: 0.92rem;
    margin-bottom: 2px;
  }
  .shop-preview-desc {
    font-size: 0.7rem;
    line-height: 1.25;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .shop-action-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
    border-radius: 8px;
  }
  .shop-catalog-panel {
    max-height: calc(92vh - 110px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .shop-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .shop-item-card {
    padding: 8px;
    border-radius: 10px;
  }
  .item-preview-mini {
    height: 65px;
    margin-bottom: 6px;
  }
  .item-name {
    font-size: 0.78rem;
  }
  .item-price {
    font-size: 0.72rem;
  }

  /* 4. Menú y Sala de Espera Ultra-Compactos en Horizontal (Mobile Landscape) */
  .lobby-card {
    padding: 10px 16px;
    max-height: 96vh;
    border-radius: 12px;
  }
  .glitch-title {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  .tagline {
    font-size: 0.72rem;
    margin: 2px 0 6px 0;
  }
  .token-ca-card {
    padding: 3px 8px;
    margin-bottom: 5px;
  }
  .token-ca-code {
    font-size: 0.65rem;
  }
  .wallet-ribbon {
    padding: 4px 10px;
    margin-bottom: 6px;
    gap: 6px;
  }
  .btn-guide-trigger {
    padding: 4px 10px;
    font-size: 0.72rem;
    margin-bottom: 6px;
  }
  .input-group label {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }
  .input-group input {
    padding: 5px 8px;
    font-size: 0.8rem;
  }
  .tier-selector-container {
    margin-bottom: 5px;
  }
  .tier-card {
    padding: 4px 6px;
  }
  .btn-primary.btn-competitive {
    padding: 7px 12px;
  }
  #btnJoinTierText {
    font-size: 0.85rem;
  }
  #btnJoinTierSub {
    font-size: 0.65rem;
  }
  #btnQuickPractice {
    padding: 5px 10px;
    font-size: 0.78rem;
  }

  /* Sala de Espera Matchmaking en Horizontal */
  .lobby-waiting-view {
    gap: 6px;
  }
  .waiting-header {
    padding: 4px 10px;
    border-radius: 8px;
    gap: 8px;
  }
  .waiting-badge {
    font-size: 1.25rem;
  }
  .waiting-title {
    font-size: 0.92rem;
  }
  .waiting-room-id {
    font-size: 0.68rem;
  }
  .waiting-radar-box {
    padding: 6px 10px;
    border-radius: 10px;
  }
  .radar-pulse {
    width: 65px;
    height: 65px;
  }
  .waiting-status-msg {
    font-size: 0.85rem;
  }
  .waiting-player-ratio {
    font-size: 1.1rem;
  }
  .waiting-min-notice {
    font-size: 0.65rem;
  }
  .waiting-countdown-banner {
    padding: 4px 8px;
    font-size: 0.82rem;
    border-radius: 6px;
    margin: 2px 0;
  }
  .waiting-prize-card {
    padding: 4px 8px;
    border-radius: 6px;
    margin: 2px 0;
  }
  .waiting-prize-card .prize-tag {
    font-size: 0.62rem;
  }
  .waiting-prize-card .prize-val {
    font-size: 0.82rem;
  }
  .waiting-roster-box {
    padding: 4px 6px;
    max-height: 55px;
  }
  .waiting-players-grid {
    gap: 4px;
  }
  .waiting-player-chip {
    padding: 2px 6px;
    font-size: 0.68rem;
  }
  .waiting-actions {
    margin-top: 3px;
  }
  .btn-cancel-waiting {
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }
  .controls-guide,
  .lobby-community-footer {
    display: none !important;
  }

  /* Countdown Overlay y Chat en Landscape */
  .countdown-number {
    font-size: 3.4rem;
  }
  .countdown-sub {
    font-size: 0.85rem;
  }
  .lobby-chat-widget {
    bottom: 8px;
    left: 8px;
    transform: scale(0.78);
    transform-origin: bottom left;
  }
}

/* ==========================================
   TOAST DE NOTIFICACIONES ESCROW & REEMBOLSOS
   ========================================== */
.game-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(12px);
  padding: 12px 24px;
  border-radius: 9999px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100000;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.game-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.game-toast.toast-success {
  border-color: #00ff88;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 136, 0.3);
}
.game-toast.toast-warning {
  border-color: #ffd700;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.3);
}
.game-toast.toast-error {
  border-color: #ff3366;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 51, 102, 0.3);
}

/* ========================================================
   WIDGET DE CHAT GLOBAL EN VIVO DEL LOBBY (CYBERPUNK GLOW)
   ======================================================== */
.lobby-chat-widget {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 9999;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: auto;
}

/* Ocultar forzosamente cuando el juego está activo */
#gameHUD:not(.hidden) ~ #lobbyChatWidget,
.in-game #lobbyChatWidget,
#lobbyScreen.hidden .lobby-chat-widget {
  display: none !important;
}

/* Botón Píldora Flotante */
.lobby-chat-toggle-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(168, 85, 247, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  padding: 9px 16px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.lobby-chat-toggle-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: #a855f7;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 24px rgba(168, 85, 247, 0.4);
}

.pill-chat-icon {
  font-size: 1.05rem;
}

.pill-chat-text {
  background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pill-chat-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 7px;
  border-radius: 9999px;
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDotAnim 2s infinite ease-in-out;
}

@keyframes pulseDotAnim {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: 0 0 12px #34d399;
  }
}

.chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  line-height: 19px;
  padding: 0 5px;
  border-radius: 9999px;
  text-align: center;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  border: 1.5px solid #0f172a;
  animation: bounceBadge 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-unread-badge.hidden {
  display: none !important;
}

@keyframes bounceBadge {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Panel Desplegable */
.lobby-chat-panel {
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 420px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.96) 0%, rgba(9, 11, 20, 0.98) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  animation: slideUpChat 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.lobby-chat-panel.hidden {
  display: none !important;
}

@keyframes slideUpChat {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cabecera del Chat */
.lobby-chat-header {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-icon {
  font-size: 1.2rem;
}

.chat-header-text {
  display: flex;
  flex-direction: column;
}

.chat-header-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #f1f5f9;
  text-transform: uppercase;
}

.chat-header-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #34d399;
}

.chat-header-tools {
  display: flex;
  gap: 6px;
}

.btn-chat-min {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.btn-chat-min:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Lista de Mensajes */
.lobby-chat-messages {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scroll-behavior: smooth;
}

.lobby-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.lobby-chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.lobby-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 9999px;
}

.lobby-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

/* Tarjeta individual de mensaje */
.chat-msg-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  transition: background 0.2s ease;
}

.chat-msg-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chat-msg-sender {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.78rem;
}

.chat-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.chat-badge.badge-sol {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.chat-badge.badge-pilot {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.chat-badge.badge-recruit {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.chat-badge.badge-system {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.chat-msg-wallet {
  font-size: 0.66rem;
  color: #64748b;
  font-family: monospace;
}

.chat-msg-time {
  font-size: 0.66rem;
  color: #475569;
  margin-left: auto;
}

.chat-msg-body {
  color: #e2e8f0;
  line-height: 1.38;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Mensajes de Sistema Especiales */
.chat-msg-item.msg-system {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.08);
}

.chat-msg-item.msg-system .chat-msg-sender {
  color: #f59e0b;
}

.chat-msg-item.msg-system .chat-msg-body {
  color: #fef3c7;
  font-weight: 500;
}

/* Input Form */
.lobby-chat-form {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lobby-chat-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
}

.lobby-chat-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.lobby-chat-input::placeholder {
  color: #64748b;
  font-size: 0.78rem;
}

.btn-chat-send {
  background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.45);
}

.btn-chat-send:active {
  transform: scale(0.95);
}

.chat-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: #64748b;
  padding: 0 2px;
}

.chat-rule-hint {
  color: #64748b;
}

.chat-char-counter {
  font-family: monospace;
}

.chat-char-counter.warning {
  color: #fbbf24;
}

.chat-char-counter.limit {
  color: #ef4444;
}

/* Responsividad para móviles */
@media (max-width: 640px) {
  .lobby-chat-widget {
    bottom: 12px;
    left: 12px;
  }
  .lobby-chat-panel {
    width: calc(100vw - 24px);
    height: 320px;
    margin-bottom: 8px;
  }
  .lobby-chat-toggle-pill {
    padding: 7px 12px;
    font-size: 0.76rem;
  }
}


