/* Poke Idle Clone - Hojas de Estilo estilo Poketibia GBA/Retro */

:root {
  /* Colores estilo Tibia / OTClient */
  --tibia-bg-dark: #0a0a0c;
  --tibia-bg-panel: rgba(18, 22, 28, 0.92);
  --tibia-border-window: #3e3f42;
  --tibia-border-gold: #c6a152;
  --tibia-header: #201c18;
  --tibia-header-border: #4d443b;
  --tibia-btn-red: #8f1e1a;
  --tibia-btn-red-hover: #b82d28;
  
  /* Recursos */
  --gold: #ecc94b;
  --diamond: #0bc5ea;
  --text-main: #dfdfdf;
  --text-muted: #8e9095;

  /* Calidades de Pokémon y colores de rareza */
  --quality-fraca: #9ca3af;      /* Gris - Débil */
  --quality-comum: #e2e8f0;      /* Blanco - Común */
  --quality-incomum: #22c55e;    /* Verde - Poco Común */
  --quality-rara: #3b82f6;       /* Azul - Raro */
  --quality-epica: #ec4899;      /* Magenta - Épico */
  --quality-lendaria: #f59e0b;   /* Oro - Legendario */
  --quality-mitica: #ef4444;      /* Rojo - Mítico */
  --quality-ancestral: #a78bfa;  /* Lavanda - Ancestral */
  --quality-divino: #fbbf24;     /* Amarillo brillante - Divino */

  /* Altura de la barra inferior (calculada por JS en móvil) */
  --bottom-bar-height: 55px;

  /* Tipos de Pokémon */
  --grass: #48bb78;
  --fire: #f56565;
  --water: #4299e1;
  --normal: #a0aec0;
  --poison: #9f7aea;
  --electric: #ecc94b;
  --ground: #dd6b20;
  --bug: #b7791f;
  --flying: #667eea;
  --psychic: #ed64a6;
  --rock: #718096;
  --ghost: #805ad5;
  --dragon: #553c9a;
  --ice: #319795;
  --fairy: #ed64a6;
  --steel: #718096;
  --fighting: #c0392b;
}

/* Reset y estructura principal */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--tibia-bg-dark);
  color: var(--text-main);
  font-family: 'Barlow', sans-serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Titulos especiales */
.cinzel-title {
  font-family: 'Cinzel', serif;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.gold-text { color: var(--gold); }
.blue-text { color: #4299e1; }
.red-text { color: #fc8181; }
.diamond-text { color: var(--diamond); }
.green-text { color: #48bb78; }

.mt-10 { margin-top: 10px; }
.mt-25 { margin-top: 25px; }

/* MODALES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 10, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #15181e;
  border: 3px solid var(--tibia-border-gold);
  border-radius: 6px;
  padding: 35px;
  width: 90%;
  max-width: 850px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
}

.modal-subtitle {
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 25px;
}

/* Modal de sesión única: la cuenta se abrió en otra ventana */
.session-modal-content {
  max-width: 440px;
  padding: 30px 34px;
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.25), 0 0 25px rgba(0, 0, 0, 0.8);
}
.session-modal-content h2 {
  color: #fbbf24;
  margin: 0 0 18px 0;
  font-size: 1.35rem;
}
.session-modal-body {
  margin-bottom: 22px;
}
.session-modal-body p {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 8px 0;
}
.session-modal-body p.session-modal-sub {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Modal de límite por IP: se superó el máximo de cuentas por IP */
.ip-blocked-modal-content {
  max-width: 440px;
  padding: 30px 34px;
  border-color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.25), 0 0 25px rgba(0, 0, 0, 0.8);
}
.ip-blocked-modal-content h2 {
  color: #ef4444;
  margin: 0 0 18px 0;
  font-size: 1.35rem;
}

.starter-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.starter-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2d3748;
  border-radius: 4px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.starter-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
}

.starter-card.grass:hover { border-color: var(--grass); }
.starter-card.fire:hover { border-color: var(--fire); }
.starter-card.water:hover { border-color: var(--water); }

.sprite-holder {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.sprite-holder img {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
}

.starter-card h3 {
  font-family: 'Cinzel', serif;
  margin-bottom: 8px;
}

.starter-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  line-height: 1.4;
  flex-grow: 1;
}

.type-badge {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  margin: 2px;
  display: inline-block;
}

.type-badge.grass { background-color: var(--grass); }
.type-badge.fire { background-color: var(--fire); }
.type-badge.water { background-color: var(--water); }
.type-badge.poison { background-color: var(--poison); }
.type-badge.bug { background-color: var(--bug); }
.type-badge.normal { background-color: var(--normal); }
.type-badge.electric { background-color: var(--electric); color: #000; }
.type-badge.ground { background-color: var(--ground); }
.type-badge.fairy { background-color: var(--fairy); }
.type-badge.flying { background-color: var(--flying); }
.type-badge.fighting { background-color: var(--fighting); }
.type-badge.psychic { background-color: var(--psychic); }
.type-badge.rock { background-color: var(--rock); }
.type-badge.steel { background-color: var(--steel); }
.type-badge.ice { background-color: var(--ice); }
.type-badge.ghost { background-color: var(--ghost); }
.type-badge.dragon { background-color: var(--dragon); }

.select-btn {
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  font-weight: bold;
  text-transform: uppercase;
  width: 100%;
  color: #fff;
  cursor: pointer;
}

.select-btn.grass-btn { background-color: var(--grass); }
.select-btn.fire-btn { background-color: var(--fire); }
.select-btn.water-btn { background-color: var(--water); }

/* CONTENEDOR PRINCIPAL DEL JUEGO */
.client-container {
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* móvil: 100vh incluye la zona oculta bajo las barras del navegador,
                     lo que dejaba la barra inferior (Centro/Market/Global) cortada
                     fuera de pantalla. 100dvh = alto realmente visible. */
  position: relative;
  overflow: hidden;
}

/* CANVAS (MAPA DE FONDO) */
#game-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background-color: #0f172a;
}

/* BARRA SUPERIOR (TOP MENU REDISEÑADA Y MÁS GRANDE) */
.top-menu {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 98%;
  height: 48px;
  background: linear-gradient(180deg, rgba(24, 28, 42, 0.95) 0%, rgba(12, 15, 24, 0.97) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  z-index: 100;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(245, 158, 11, 0.15);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.top-menu:hover {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 24px rgba(245, 158, 11, 0.25);
}

@media (max-width: 1100px) {
  .top-menu {
    gap: 8px;
    padding: 0 8px;
    height: 44px;
  }
  .nav-icons {
    gap: 3px;
  }
}
@media (max-width: 900px) {
  .top-menu {
    gap: 4px;
    padding: 0 5px;
  }
  .nav-icons {
    gap: 2px;
  }
  .top-balance {
    display: none;
  }
}

.trainer-info {
  display: none !important;
}

.trainer-name {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--tibia-border-gold);
  line-height: 1.1;
}

.trainer-route {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.trainer-xp-container {
  background: #111;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.trainer-xp-bar {
  background: #4299e1;
  height: 100%;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-icon-btn {
  position: relative;
  background: linear-gradient(180deg, rgba(46, 54, 74, 0.92) 0%, rgba(20, 24, 38, 0.97) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f1f5f9;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1rem;
  flex-shrink: 0;
  overflow: visible;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Espejo de cristal superior (Reflexión) */
.nav-icon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.03) 100%);
  pointer-events: none;
  border-radius: 9px 9px 0 0;
}

.nav-icon-btn:hover {
  background: linear-gradient(180deg, rgba(68, 78, 104, 0.98) 0%, rgba(30, 36, 54, 0.98) 100%);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.nav-icon-btn:active {
  transform: translateY(0px) scale(0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.nav-icon-btn.active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.35) 0%, rgba(180, 83, 9, 0.42) 100%);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.6), inset 0 0 10px rgba(251, 191, 36, 0.3);
}

/* Rotación suave para el ícono de Ajustes (Tuerca) al pasar el cursor */
#icon-settings:hover i {
  transform: rotate(60deg) scale(1.22);
}

/* ─── BATTLE PASS: recompensas disponibles para reclamar ─── */
.nav-icon-btn.has-rewards {
  position: relative;
  border-color: #4ade80;
  animation: bp-nav-glow 1.4s ease-in-out infinite;
}
.nav-icon-btn.has-rewards:hover { border-color: #86efac; }
.nav-bp-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 2;
}
@keyframes bp-nav-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(74,222,128,0.5), 0 0 12px rgba(74,222,128,0.25);
  }
  50% {
    box-shadow: 0 0 14px rgba(74,222,128,0.95), 0 0 28px rgba(74,222,128,0.5), 0 0 40px rgba(74,222,128,0.2);
  }
}

.danger-btn-icon {
  color: #fc8181;
}
.danger-btn-icon:hover {
  background: #4a1d1d;
  border-color: #fc8181;
}

.icon-separator {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  margin: 0 4px;
  flex-shrink: 0;
}

.top-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 0.88rem;
}

.top-res-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 12, 20, 0.7);
  padding: 4px 11px;
  border-radius: 9px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  font-size: 0.85rem;
}
.top-res-item i {
  font-size: 0.88rem;
}

/* VENTANAS FLOTANTES TIPO TIBIA (ESTILO UNIFICADO DE CLANES) */
.tibia-window {
  position: fixed;
  background: linear-gradient(180deg, #0b1120 0%, #070a14 100%) !important;
  border: 2px solid #d97706 !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 25px rgba(217, 119, 6, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  contain: layout style paint;
  flex-direction: column;
  pointer-events: auto;
  animation: winFadeIn 0.2s ease-out forwards;
  opacity: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tibia-window:hover,
.tibia-window:focus-within {
  border-color: #f59e0b !important;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

@keyframes winFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header de la ventana CAPTURA: título + acciones compactas ── */
.capture-win-header {
  gap: 6px;
}

.capture-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.capture-wilds-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}

.capture-wilds-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
  flex-shrink: 0;
}

.capture-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fcd34d;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.capture-shop-btn i {
  font-size: 0.72rem;
  color: #fbbf24;
}

.capture-shop-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(245, 158, 11, 0.28));
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.capture-shop-btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.win-header {
  background: linear-gradient(90deg, #1e1b4b 0%, #2e1065 50%, #1e1b4b 100%) !important;
  border-bottom: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  border-radius: 12px 12px 0 0 !important;
  /* 📱 Touch-action:none es CRÍTICO para que el arrastre táctil funcione:
     sin esto, el navegador intercepta el toque como scroll/zoom y el drag nunca arranca. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  user-select: none;
}

.win-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 10;
}
.win-resize-handle::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(99,102,241,0.3);
  border-bottom: 2px solid rgba(99,102,241,0.3);
}

.win-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--tibia-border-gold);
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 10px rgba(198,161,82,0.3);
}

.win-title i {
  color: #c6a152;
  font-size: 0.85rem;
}

.win-close-btn {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 3px 10px;
  border-radius: 5px;
  transition: all 0.15s ease;
  pointer-events: auto;
  font-weight: 700;
}

.win-close-btn:hover {
  background: linear-gradient(135deg,#ef4444,#dc2626);
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239,68,68,0.4);
  transform: scale(1.05);
}

.win-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* CRÍTICO para scroll interno: sin min-height:0 el body de un flex-column
     se estira a su contenido (no se encoge) y el overflow-y:auto jamás
     dispara → la ventana corta el contenido y no se puede scrollear. */
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

/* --- 1. WINDOW: TEAM (ESTILO POKE IDLE WORLD) --- */
.win-team {
  width: 275px;
  max-height: none;
  height: auto;
  z-index: 105;
  overflow: visible;
}



.team-widget-header {
  padding: 8px 10px 6px 10px;
  background: rgba(8, 12, 18, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.poke-idle-badge {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trainer-header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trainer-name {
  font-family: 'Cinzel', serif, Georgia, sans-serif;
  font-size: 0.98rem;
  font-weight: bold;
  color: #f8fafc;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #000;
  line-height: 1.1;
}

.trainer-sub {
  font-size: 0.75rem;
  font-family: sans-serif;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.team-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.team-member-row {
  background: rgba(18, 22, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.team-heal-btn {
  transition: transform 0.2s, color 0.2s;
}
.team-heal-btn:hover {
  transform: scale(1.25);
  color: #fc8181 !important;
}

.team-member-row:hover {
  border-color: var(--tibia-border-gold);
  background: rgba(255, 255, 255, 0.05);
}

.team-member-row.leader {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.2);
}

.row-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #4a5568;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.row-avatar-ring.active-ring {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.row-sprite {
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
  object-fit: contain;
  transform: scale(1.2);
}

.row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.row-name-lvl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.row-name {
  font-family: sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #000;
}

.row-lvl {
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

/* --- VENTANA TEAM DETAIL (ESTILO EXACTO POKE IDLE WORLD) --- */
.win-team-detail {
  width: 440px;
  max-height: none;
  z-index: 120;
}



.team-modal-slots-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.team-slot {
  width: 58px;
  height: 58px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.team-slot:hover {
  border-color: var(--tibia-border-gold);
  background: rgba(255, 255, 255, 0.05);
}

.team-slot.selected {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.12);
}

.team-slot.empty {
  border-style: dashed;
  opacity: 0.35;
  cursor: default;
}

.team-slot-sprite {
  width: 46px;
  height: 46px;
  image-rendering: pixelated;
  object-fit: contain;
}

.team-slot-leader-icon {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 11px;
  color: #f59e0b;
  text-shadow: 0 0 4px #000;
}

.team-modal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-card-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.team-card-portrait {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-card-portrait img {
  width: 76px;
  height: 76px;
  image-rendering: pixelated;
  object-fit: contain;
  transform: scale(1.15);
}

.team-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-card-name {
  font-family: 'Cinzel', serif, Georgia, sans-serif;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
}

.team-card-lvl-power {
  font-size: 0.88rem;
  font-weight: bold;
  display: flex;
  gap: 10px;
  align-items: center;
}

.team-card-lvl {
  color: #38bdf8;
  font-family: monospace;
}

.team-card-power {
  color: #f59e0b;
  font-family: monospace;
}

.team-card-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.badge-type {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 1px #000;
}

.badge-type.fire { background: #ef4444; }
.badge-type.water { background: #3b82f6; }
.badge-type.grass { background: #22c55e; }
.badge-type.electric { background: #eab308; }
.badge-type.normal { background: #94a3b8; }
.badge-type.flying { background: #38bdf8; }
.badge-type.bug { background: #84cc16; }
.badge-type.poison { background: #a855f7; }
.badge-type.rock { background: #b45309; }
.badge-type.ground { background: #d97706; }
.badge-type.psychic { background: #ec4899; }
.badge-type.dragon { background: #6366f1; }
.badge-type.ghost { background: #8b5cf6; }
.badge-type.ice { background: #06b6d4; }
.badge-type.steel { background: #64748b; }
.badge-type.fighting { background: #ea580c; }
.badge-type.fairy { background: #f472b6; }

.badge-rarity {
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  text-transform: uppercase;
}

.team-active-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  color: #f6e05e;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.team-stat-bars-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: bold;
}

.team-stat-label {
  width: 32px;
  color: #94a3b8;
  font-family: monospace;
}

.team-stat-bar-bg {
  flex: 1;
  height: 10px;
  background: #0f172a;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-stat-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #22c55e, #16a34a);
  border-radius: 5px;
  transition: width 0.2s ease-in-out;
}

.team-stat-val {
  width: 36px;
  text-align: right;
  color: #ffffff;
  font-family: monospace;
}

.team-moves-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moves-title {
  font-size: 0.82rem;
  font-weight: bold;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.moves-priority-hint {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.3;
}

.moves-priority-hint.has {
  color: #fbbf24;
}

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

.move-badge {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.move-badge:hover {
  border-color: rgba(251, 191, 36, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.move-badge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.move-type-pill {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid;
}

.move-badge-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.62rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.move-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.move-stat-power.pow-epic { color: #f87171; font-weight: 800; }
.move-stat-power.pow-high { color: #fb923c; font-weight: 700; }
.move-stat-power.pow-mid { color: #fbbf24; }
.move-stat-power.pow-low { color: #94a3b8; }
.move-stat-cd.cd-fast { color: #4ade80; }
.move-stat-cd.cd-mid { color: #94a3b8; }
.move-stat-cd.cd-slow { color: #f87171; }

.move-preferred-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 6px;
  padding: 1px 6px;
  text-align: center;
}

.move-badge.move-preferred {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(15, 23, 42, 0.92));
  border: 2px solid #fbbf24;
  border-left: 3px solid #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.55), inset 0 0 8px rgba(251, 191, 36, 0.18);
  transform: translateY(-1px);
}

.move-badge-name {
  font-size: 0.8rem;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.move-badge-details {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 10px;
  flex-wrap: wrap;
}

.move-type {
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
}

.move-range {
  color: #94a3b8;
  font-family: monospace;
}

.move-power {
  color: #f59e0b;
  font-family: monospace;
  font-weight: bold;
}

.move-cd {
  color: #38bdf8;
  font-family: monospace;
}

.row-bar-bg {
  position: relative;
  background: #0b0f19;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.row-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 6px;
  transition: width 0.2s ease-in-out;
}

.row-bar-text {
  position: relative;
  z-index: 2;
  font-family: monospace;
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* --- 2. WINDOW: CAPTURE LOG (ESTILO POKE IDLE WORLD) --- */
.win-capture-log {
  width: 510px;
  height: 440px;
  min-width: 360px;
  min-height: 240px;
  max-width: 92vw;
  max-height: 85vh;
  resize: both;
  overflow: hidden;
  z-index: 102;
}

.win-capture-log .win-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100% - 32px);
  overflow: hidden;
  padding: 10px;
}

.log-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.log-filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.filter-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.capture-log-scroll {
  flex: 1;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 4px;
}

/* Card item for Capture Log */
.clog-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 24, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 14px;
  transition: all 0.15s ease;
}

.clog-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(26, 34, 50, 0.95);
}

.clog-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.clog-sprite {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}

.clog-name {
  font-size: 0.88rem;
  font-weight: bold;
  color: #f8fafc;
}

.clog-lvl {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
  min-width: 50px;
}

.clog-quality-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 135px;
}

.clog-quality-text {
  font-size: 0.82rem;
  font-weight: 800;
}

.clog-quality-text.q-fraca { color: #9ca3af; }
.clog-quality-text.q-comum { color: #e2e8f0; }
.clog-quality-text.q-incomum { color: #22c55e; }
.clog-quality-text.q-rara { color: #3b82f6; }
.clog-quality-text.q-epica { color: #ec4899; }
.clog-quality-text.q-lendaria { color: #f59e0b; }
.clog-quality-text.q-mitica { color: #ef4444; }
.clog-quality-text.q-ancestral { color: #a78bfa; }
.clog-quality-text.q-divino { color: #fbbf24; }

.clog-iv {
  font-size: 0.76rem;
  color: #94a3b8;
}

.clog-ball {
  font-size: 0.78rem;
  color: #cbd5e1;
  min-width: 80px;
}

.clog-time {
  font-size: 0.72rem;
  color: #64748b;
}

/* Calidades de rareza de textos */
.q-fraca { color: var(--quality-fraca); }
.q-comum { color: var(--quality-comum); }
.q-incomum { color: var(--quality-incomum); }
.q-rara { color: var(--quality-rara); }
.q-epica { color: var(--quality-epica); }
.q-lendaria { color: var(--quality-lendaria); }
.q-mitica { color: var(--quality-mitica); }
.q-ancestral { color: var(--quality-ancestral); }
.q-divino { color: var(--quality-divino); }

/* --- 3. WINDOW: CHAT --- */
.win-chat {
  width: 320px;
  height: 220px;
  z-index: 101;
}

.chat-tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid #2d313c;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.chat-tab-btn {
  background: #1f232d;
  border: 1px solid #333;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 2px;
  cursor: pointer;
}

.chat-tab-btn.active {
  background: var(--tibia-border-gold);
  color: #000;
  border-color: var(--tibia-border-gold);
  font-weight: bold;
}

.chat-messages-area {
  flex: 1;
  background: #000;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 8px;
  overflow-y: auto;
  border-radius: 3px;
  border: 1px solid #222;
  margin-bottom: 8px;
  max-height: 120px;
}

.chat-messages-area p {
  margin-bottom: 4px;
  line-height: 1.3;
}

.chat-time {
  color: var(--text-muted);
  margin-right: 4px;
}

.chat-world-msg { color: #e2e8f0; }
.chat-trade-msg { color: #f6ad55; }
.chat-help-msg { color: #81e6d9; }
.chat-log-msg { color: #a78bfa; }
.chat-system { color: #4299e1; }

.chat-input-bar {
  display: flex;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════
   CHAT GLASS — diseño flotante transparente (glassmorphism)
   Reemplaza el marco clásico de ventana por una lámina de vidrio
   ═══════════════════════════════════════════════════════════ */
#win-chat.win-chat {
  width: 360px;
  height: 300px;
  background: rgba(10, 14, 26, 0.45) !important;      /* vidrio oscuro translúcido */
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 16px !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(96, 165, 250, 0.08) !important;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  overflow: hidden;
}

#win-chat .win-header {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(139, 92, 246, 0.16), rgba(59, 130, 246, 0.16)) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: none !important;
  border-radius: 15px 15px 0 0 !important;
  height: 32px;
  padding: 0 10px;
}

#win-chat .win-title {
  font-size: 0.66rem;
  color: #93c5fd !important;
  letter-spacing: 1.2px;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.45);
}

#win-chat .win-title i {
  color: #60a5fa;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.7));
}

#win-chat .win-close-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: rgba(252, 165, 165, 0.85);
  border-radius: 8px;
  padding: 2px 8px;
}

#win-chat .win-body {
  padding: 8px;
  gap: 6px;
}

/* ── Pestañas: píldoras glass ── */
#win-chat .chat-tabs {
  gap: 5px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 7px;
  margin-bottom: 7px;
}

#win-chat .chat-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.7);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  backdrop-filter: blur(6px);
  transition: all 0.18s ease;
}

#win-chat .chat-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-1px);
}

#win-chat .chat-tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(139, 92, 246, 0.85));
  color: #fff;
  border-color: rgba(147, 197, 253, 0.6);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.45);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

/* ── Área de mensajes: cristal translúcido ── */
#win-chat .chat-messages-area {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  font-size: 0.72rem;
  padding: 8px 10px;
  max-height: 140px;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.4) transparent;
}

#win-chat .chat-messages-area::-webkit-scrollbar {
  width: 6px;
}
#win-chat .chat-messages-area::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.35);
  border-radius: 6px;
}

#win-chat .chat-messages-area p {
  margin-bottom: 5px;
  animation: chatMsgIn 0.22s ease;
}

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Barra de escritura: input glass + botón glow ── */
#win-chat .chat-input-bar input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-family: inherit;
  padding: 7px 14px;
  outline: none;
  transition: all 0.18s ease;
}

#win-chat .chat-input-bar input:focus {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12), 0 0 12px rgba(96, 165, 250, 0.15);
  background: rgba(255, 255, 255, 0.09);
}

#win-chat .chat-input-bar input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

#win-chat .chat-send-btn,
#win-chat .chat-input-bar button {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.4px;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.35);
  transition: all 0.18s ease;
}

#win-chat .chat-send-btn:hover,
#win-chat .chat-input-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.55);
  filter: brightness(1.1);
}

/* Mensajes por canal: acentos translúcidos */
#win-chat .chat-world-msg { color: rgba(226, 232, 240, 0.95); }
#win-chat .chat-trade-msg { color: rgba(251, 191, 36, 0.95); }
#win-chat .chat-help-msg { color: rgba(94, 234, 212, 0.95); }
#win-chat .chat-log-msg { color: rgba(167, 139, 250, 0.95); }
#win-chat .chat-system { color: rgba(96, 165, 250, 0.95); }
#win-chat .chat-time { color: rgba(148, 163, 184, 0.7); }

.chat-input-bar input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  outline: none;
  border-radius: 2px;
}

.chat-input-bar button {
  background: var(--tibia-border-gold);
  color: #000;
  border: none;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
}

/* --- 4. WINDOW: HUNT ANALYZER --- */
.win-analyzer {
  width: 400px;
  max-height: none;
  height: auto;
  z-index: 104;
  overflow: visible;
}

.analyzer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.analyzer-item {
  background: rgba(18, 24, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.analyzer-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(26, 34, 50, 0.95);
}

.analyzer-item i {
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.analyzer-label {
  display: flex;
  flex-direction: column;
}

.analyzer-label .val-txt {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.analyzer-label .sub-txt {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 1px;
}

.analyzer-balance-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1.5px solid #22c55e;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.1);
}

.balance-title {
  font-size: 0.78rem;
  font-weight: bold;
  color: #4ade80;
}

.balance-val {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.analyzer-rates-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.rate-pill {
  flex: 1;
  background: rgba(18, 24, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.analyzer-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.analyzer-drops {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.9);
  display: flex;
  flex-direction: column;
  max-height: 180px;
  margin-bottom: 10px;
  overflow: hidden;
}

.drops-header {
  background: rgba(15, 23, 42, 0.95);
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.drops-list {
  padding: 4px 6px;
  overflow-y_ auto;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  transition: background 0.15s;
}

.drop-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.no-drops {
  color: #64748b;
  font-size: 0.72rem;
  text-align: center;
  padding: 12px 0;
}

.drop-row {
  display: flex;
  justify-content: space-between;
}

/* --- 5. WINDOW: CAPTURE PANEL --- */
.win-capture {
  width: 318px;
  height: auto;
  max-height: 390px;
  bottom: 20px;
  right: 20px;
  z-index: 103;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.capture-body {
  gap: 8px;
  padding: 10px !important;
}

.capture-wilds-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.capture-wilds-list::-webkit-scrollbar { display: none; }

.capture-wild-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(18, 24, 36, 0.92), rgba(20, 27, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(245, 158, 11, 0.5);
  border-radius: 8px;
  padding: 5px 10px;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.capture-wild-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  border-left-color: rgba(245, 158, 11, 0.9);
  background: linear-gradient(90deg, rgba(26, 34, 50, 0.98), rgba(28, 37, 56, 0.95));
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.12);
}

.capture-wild-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.capture-wild-sprite {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.capture-wild-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.capture-wild-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capture-wild-lvl {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.throw-btn-idle {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1.5px solid #f59e0b;
  font-weight: bold;
  padding: 5px 16px;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.throw-btn-idle:hover {
  background: #f59e0b;
  color: #000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.ball-selector-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.ball-option {
  background: rgba(24, 27, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  flex: 1;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  padding: 3px 0;
  transition: all 0.15s ease;
}

.ball-option:hover {
  border-color: rgba(198, 161, 82, 0.45);
  background: rgba(198, 161, 82, 0.08);
  transform: translateY(-1px);
}

.ball-option img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.ball-qty {
  font-size: 0.6rem;
  font-weight: bold;
  color: var(--text-muted);
  line-height: 1;
}

.ball-option.active {
  border-color: var(--tibia-border-gold);
  background: rgba(198, 161, 82, 0.14);
  box-shadow: 0 0 10px rgba(198, 161, 82, 0.25), inset 0 0 8px rgba(198, 161, 82, 0.12);
}

.ball-option.active img {
  filter: drop-shadow(0 0 4px rgba(198, 161, 82, 0.7));
}

.ball-option.active .ball-qty {
  color: var(--tibia-border-gold);
}

.autocatch-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0 4px;
}

.autocatch-dropdown-row select {
  background: #111;
  border: 1px solid #333;
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  outline: none;
  border-radius: 2px;
}

/* --- 6. WINDOW: PC BOX --- */
.win-pc-box {
  width: 720px;
  height: 520px;
  z-index: 200;
}

.pc-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pc-list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pc-list-container h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--tibia-border-gold);
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.pc-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow-y: auto;
  align-content: start;
}

.pc-slot {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #2d313c;
  border-radius: 6px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pc-slot:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pc-slot img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  transition: transform 0.2s ease;
}

.pc-slot:hover img {
  transform: scale(1.12);
}

.pc-slot span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s;
}

.pc-slot:hover span {
  color: #cbd5e1;
}

.pc-slot.in-team {
  border-color: #4299e1;
}

.pc-slot.selected {
  border-color: #f59e0b;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 20px rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}

.pc-slot.selected::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 7px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  mask-composite: exclude;
  pointer-events: none;
  animation: pcSlotGlow 1.8s ease-in-out infinite;
}

@keyframes pcSlotGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Círculo de rareza del slot (legendarios/míticos brillan pulsando) */
@keyframes pcRarityPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.35); filter: brightness(1.6); }
}

.pc-slot.selected img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
}

.pc-slot.selected span {
  color: #fbbf24;
  font-weight: 700;
}

.pc-slot.selected.in-team {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 20px rgba(245, 158, 11, 0.08), 0 0 8px rgba(66, 153, 225, 0.3);
}

.pc-detail-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
}

.pc-detail-container h4 {
  font-size: 0.9rem;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  color: var(--tibia-border-gold);
}

.pc-detail-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid #222;
  border-radius: 4px;
  padding: 8px;
}

.pc-detail-visual img {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
}

.pc-detail-visual span {
  font-size: 0.75rem;
  font-weight: bold;
}

.quality-text {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.pc-detail-stats {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iv-title {
  border-top: 1px solid #222;
  padding-top: 4px;
  font-weight: bold;
}

.iv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  color: var(--text-muted);
}

.pc-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- 7. WINDOW: SHOP --- */
.win-shop {
  width: 400px;
  height: 380px;
  z-index: 201;
}

.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.shop-tab-btn {
  background: #252830;
  border: 1px solid #4a4e58;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
}

.shop-tab-btn.active {
  background: var(--tibia-border-gold);
  border-color: var(--tibia-border-gold);
  color: #000;
  font-weight: bold;
}

.shop-section-content {
  display: none;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.shop-section-content.active {
  display: flex;
}

.shop-item-row {
  background: rgba(0,0,0,0.25);
  border: 1px solid #2d313c;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-item-row img {
  width: 28px;
  height: 28px;
}

.shop-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-item-info span {
  font-size: 0.85rem;
  font-weight: bold;
}

.shop-item-info small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stone-buy-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.buy-stone-btn {
  background: #333;
  border: 1px solid #555;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 2px;
}

.buy-stone-btn:hover {
  background: var(--tibia-border-gold);
  color: #000;
  border-color: var(--tibia-border-gold);
}

/* --- 8. WINDOW: MAP --- */
.win-map {
  width: 320px;
  height: 300px;
  z-index: 202;
}

.map-routes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.map-route-row {
  background: rgba(0,0,0,0.25);
  border: 1px solid #2d313c;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.map-route-row:hover:not(.locked) {
  border-color: var(--tibia-border-gold);
}

.map-route-row.active {
  border-color: var(--tibia-border-gold);
  background: rgba(198, 161, 82, 0.08);
}

.map-route-row.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.route-name {
  font-weight: bold;
  font-size: 0.85rem;
  color: #ffffff;
}

.route-lvl {
  font-size: 0.7rem;
  font-weight: bold;
  color: #ffffff;
}

.map-route-row.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.route-name {
  font-weight: bold;
  font-size: 0.85rem;
  color: #ffffff;
}

.route-lvl {
  font-size: 0.7rem;
  font-weight: bold;
  color: #ffffff;
}

/* --- 9. WINDOW: POKÉDEX --- */
/* --- PERFIL / CHARACTER WINDOW --- */
.win-profile {
  width: 340px;
  height: auto;
  max-height: none;
  z-index: 203;
  background: linear-gradient(180deg, rgba(18,22,32,0.97) 0%, rgba(12,16,24,0.98) 100%);
  border: 1.5px solid rgba(99,102,241,0.25);
  border-radius: 8px;
}

.win-profile .win-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.15);
  transition: background 0.15s;
}

.profile-row:hover {
  background: rgba(255,255,255,0.04);
}

.profile-row .icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
}

.profile-row .label {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-row .value {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: bold;
  text-align: right;
}

.profile-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 2px 0;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.profile-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.profile-btn .icon {
  width: 22px;
  text-align: center;
  font-size: 0.9rem;
}

.profile-btn .arrow {
  margin-left: auto;
  color: #4a4d54;
  font-size: 0.7rem;
}

/* Brillo animado para todos los iconos de navegación */
.nav-icon-btn i {
  animation: navIconGlow 3s ease-in-out infinite;
  transition: transform 0.2s;
}

.nav-icon-btn:hover i {
  transform: scale(1.25);
}

.nav-icon-btn.active i {
  animation: navIconActive 1.5s ease-in-out infinite;
}

@keyframes navIconGlow {
  0%, 100% { filter: drop-shadow(0 0 3px currentColor); }
  50% { filter: drop-shadow(0 0 9px currentColor); }
}

@keyframes navIconActive {
  0%, 100% { filter: drop-shadow(0 0 5px currentColor); transform: scale(1.1); }
  50% { filter: drop-shadow(0 0 14px currentColor); transform: scale(1.2); }
}

/* VENTANA DE JEFES LEGENDARIOS */
.win-bosses {
  width: 720px;
  height: auto;
  max-height: none;
  z-index: 203;
  background: linear-gradient(180deg, rgba(18,22,32,0.97) 0%, rgba(12,16,24,0.98) 100%);
  border: 1.5px solid rgba(99,102,241,0.25);
  border-radius: 8px;
}

.win-bosses .win-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}

.bosses-header-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 6px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 4px;
}

.bosses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.boss-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s;
  position: relative;
}

.boss-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.boss-card.available {
  border-color: rgba(34,197,94,0.4);
  box-shadow: 0 0 8px rgba(34,197,94,0.15);
}

.boss-card.available:hover {
  border-color: rgba(34,197,94,0.7);
  box-shadow: 0 0 12px rgba(34,197,94,0.3);
}

.boss-card .boss-sprite {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgba(239,68,68,0.3));
}

.boss-card .boss-name {
  font-size: 0.75rem;
  font-weight: bold;
  color: #f1f5f9;
  text-align: center;
  line-height: 1.2;
}

.boss-card .boss-level {
  font-size: 0.65rem;
  color: #ef4444;
  font-weight: 600;
}

.boss-card .boss-status {
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 2px;
}

.boss-status.ready {
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}

.boss-status.cooldown {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}

.boss-card .boss-drops-preview {
  display: flex;
  gap: 3px;
  margin-top: 2px;
  font-size: 0.7rem;
}

.boss-card .boss-drops-preview span {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 3px;
  color: #fbbf24;
}

.boss-fight-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: 1px solid #ef4444;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 5px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  margin-top: 2px;
  width: 100%;
}

.boss-fight-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 10px rgba(239,68,68,0.4);
}

.boss-fight-btn:disabled {
  background: #2d2d2d;
  border-color: #4a4d54;
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

.boss-card .boss-badge-legendary {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #fbbf24;
}

/* VENTANA DE CLANES */
.win-clan {
  width: 420px;
  height: auto;
  max-height: none;
  z-index: 203;
  background: linear-gradient(180deg, rgba(18,22,32,0.97) 0%, rgba(12,16,24,0.98) 100%);
  border: 1.5px solid rgba(99,102,241,0.25);
  border-radius: 8px;
}

.win-clan .win-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  overflow-y: auto;
}

/* 🕯️ ALTAR DE CARTAS SHINY (sección en la ventana de Jefes) */
.altar-section {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.06), rgba(0,0,0,0.12));
  border: 1px solid rgba(244, 114, 182, 0.25);
}

.altar-title {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f472b6;
  text-shadow: 0 0 8px rgba(244, 114, 182, 0.4);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.altar-desc {
  font-size: 0.65rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.35;
  margin-bottom: 6px;
}

.altar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.altar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(244, 114, 182, 0.06);
  border: 1px solid rgba(244, 114, 182, 0.25);
  position: relative;
  transition: all 0.2s;
}

.altar-card:hover {
  background: rgba(244, 114, 182, 0.14);
  border-color: rgba(244, 114, 182, 0.6);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}

.altar-card .altar-qty {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(0,0,0,0.45);
  padding: 0 4px;
  border-radius: 4px;
}

.altar-card .altar-sprite {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
}

.altar-card .altar-name {
  font-size: 0.66rem;
  font-weight: bold;
  color: #f8fafc;
  text-align: center;
  line-height: 1.1;
}

.altar-card .altar-sub {
  font-size: 0.58rem;
  color: #fbbf24;
}

.altar-invoke-btn {
  width: 100%;
  background: linear-gradient(135deg, #be185d, #9d174d);
  color: #fff;
  border: 1px solid #f472b6;
  font-size: 0.62rem;
  font-weight: bold;
  padding: 3px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  margin-top: 2px;
}

.altar-invoke-btn:hover {
  background: linear-gradient(135deg, #ec4899, #be185d);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}

.altar-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(0,0,0,0.15);
  border: 1px dashed rgba(244, 114, 182, 0.3);
  border-radius: 8px;
  line-height: 1.5;
}

.clan-header-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 6px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 4px;
}

.clan-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  margin-bottom: 2px;
}

.clan-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.clan-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clan-header-name {
  font-size: 0.9rem;
  font-weight: bold;
}

.clan-header-type, .clan-header-title {
  font-size: 0.7rem;
  color: #94a3b8;
}

.clan-xp-section {
  padding: 4px 0;
}

.clan-xp-bar {
  height: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 3px;
}

.clan-xp-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s;
}

.clan-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.clan-section-title {
  font-size: 0.72rem;
  font-weight: bold;
  color: #cbd5e0;
  margin-bottom: 4px;
}

.clan-missions-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clan-mission-empty {
  font-size: 0.7rem;
  color: #4a4d54;
  padding: 6px;
  text-align: center;
}

.clan-mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
  gap: 8px;
}

.clan-mission-desc {
  font-size: 0.7rem;
  color: #e2e8f0;
  flex: 1;
}

.clan-mission-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.clan-mission-bar {
  width: 50px;
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  overflow: hidden;
}

.clan-mission-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.clan-bonus-preview {
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 4px 0;
}

.clan-bonus-active {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 8px;
  background: rgba(0,0,0,0.1);
  font-size: 0.75rem;
  font-weight: bold;
}

.clan-bonus-pct {
  font-size: 1rem;
  font-weight: 900;
}

.clan-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  text-align: center;
}

.clan-btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border-color: #fb923c;
}

.clan-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb923c, #f97316);
  box-shadow: 0 0 10px rgba(249,115,22,0.3);
}

.clan-btn-primary:disabled {
  background: #2d2d2d;
  border-color: #4a4d54;
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

.clan-btn-secondary {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #e2e8f0;
}

.clan-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.clan-btn-join {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
  font-size: 0.68rem;
  padding: 4px 10px;
  margin-top: 4px;
}

.clan-btn-join:hover {
  background: rgba(34,197,94,0.25);
}

.clan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 2px;
}

.clan-card-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s;
}

.clan-card-select:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.clan-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.clan-card-name {
  font-size: 0.78rem;
  font-weight: bold;
}

.clan-card-type {
  font-size: 0.62rem;
}

.clan-card-desc {
  font-size: 0.6rem;
  color: #4a4d54;
  text-align: center;
  line-height: 1.3;
}

.clan-card-bonus {
  display: flex;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: bold;
}

/* VENTANA DE PROFESIÓN */
.win-profession {
  width: 420px;
  height: auto;
  max-height: none;
  z-index: 203;
}

.win-profession .win-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  overflow-y: auto;
}

.prof-header-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 6px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 4px;
}

.prof-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  margin-bottom: 2px;
}

.prof-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.prof-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prof-header-name {
  font-size: 0.9rem;
  font-weight: bold;
}

.prof-header-rank {
  font-size: 0.7rem;
  color: #94a3b8;
}

.prof-xp-section {
  padding: 4px 0;
}

.prof-xp-bar {
  height: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 3px;
}

.prof-xp-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s;
}

.prof-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.prof-section-title {
  font-size: 0.72rem;
  font-weight: bold;
  color: #cbd5e0;
  margin-bottom: 4px;
}

.prof-bonus-row {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: bold;
}

.prof-missions-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prof-mission-empty {
  font-size: 0.7rem;
  color: #4a4d54;
  padding: 6px;
  text-align: center;
}

.prof-mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
  gap: 8px;
}

.prof-mission-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.prof-mission-icon {
  flex-shrink: 0;
}

.prof-mission-desc {
  font-size: 0.7rem;
  color: #e2e8f0;
  word-break: break-word;
}

.prof-mission-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.prof-mission-count {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

.prof-mission-bar {
  width: 50px;
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  overflow: hidden;
}

.prof-mission-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.prof-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  text-align: center;
}

.prof-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: #fbbf24;
}

.prof-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(245,158,11,0.3);
}

.prof-btn-primary:disabled {
  background: #2d2d2d;
  border-color: #4a4d54;
  color: #6b7280;
  cursor: not-allowed;
  box-shadow: none;
}

.prof-btn-secondary {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #e2e8f0;
}

.prof-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.prof-btn-sm {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #60a5fa;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.15s;
  margin-left: 4px;
}

.prof-btn-sm:hover {
  background: rgba(59,130,246,0.25);
}

.prof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 2px;
}

.prof-card-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s;
}

.prof-card-select:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.prof-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.prof-card-name {
  font-size: 0.78rem;
  font-weight: bold;
}

.prof-card-desc {
  font-size: 0.6rem;
  color: #4a4d54;
  text-align: center;
  line-height: 1.3;
}

.prof-card-bonus {
  display: flex;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: bold;
}

.prof-btn-choose {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
  font-size: 0.68rem;
  padding: 4px 10px;
  margin-top: 4px;
}

.prof-btn-choose:hover {
  background: rgba(34,197,94,0.25);
}

.prof-album-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prof-album-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 6px;
}

.prof-album-entry img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.prof-album-info {
  font-size: 0.65rem;
  color: #cbd5e0;
  line-height: 1.4;
}

.prof-album-info strong {
  color: #fbbf24;
}

/* ACCIONES DE VENTANA COMUNES */
.tibia-action-btn, .buy-item-btn, .buy-upgrade-btn {
  background: #3a3b3d;
  color: #fff;
  border: 1px solid #585858;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
}

.tibia-action-btn:hover, .buy-item-btn:hover, .buy-upgrade-btn:hover {
  background: var(--tibia-border-gold);
  color: #000;
  border-color: var(--tibia-border-gold);
}

.red-btn {
  background: var(--tibia-btn-red);
  border-color: #b82d28;
}

.red-btn:hover {
  background: var(--tibia-btn-red-hover);
  color: #fff;
  border-color: #ff3333;
}

.gold-btn {
  background: var(--tibia-border-gold);
  color: #000;
  border: none;
  font-weight: bold;
  padding: 6px;
  border-radius: 2px;
  font-size: 0.75rem;
  cursor: pointer;
}

.gold-btn:hover:not(:disabled) {
  background: #ecd59b;
}

.gold-btn:disabled {
  background: #252830;
  color: var(--text-muted);
  cursor: not-allowed;
}

.danger-btn {
  background: var(--tibia-btn-red);
  color: #fff;
  border: none;
  font-weight: bold;
  padding: 6px;
  border-radius: 2px;
  font-size: 0.75rem;
  cursor: pointer;
}

.danger-btn:hover {
  background: var(--tibia-btn-red-hover);
}

/* --- ESTILOS DE CRIATURAS (HTML OVERLAYS) --- */
.creature-node {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--window-scale, 1));
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  contain: layout style; /* Sin 'paint' para que sprites escalados con transform:scale() no se recorten */
  will-change: transform, left, top;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 5;
  transition: left 0.03s linear, top 0.03s linear;
}

/* ── AURAS DE RAREZA (solo desde "Raro") ──
   Mismo color unificado (varColor) que los círculos e insignias. El halo sigue
   la silueta del sprite (drop-shadow) y "respira" suavemente sin tocar la
   opacidad (para no chocar con las animaciones de caminar del sprite). */
.creature-node.aura-q-rara .creature-sprite {
  --aura-c1: rgba(59,130,246,0.85);
  --aura-c2: rgba(59,130,246,0.4);
  filter: drop-shadow(0 0 8px var(--aura-c1)) drop-shadow(0 0 20px var(--aura-c2));
  animation: aura-breathe 2.2s ease-in-out infinite;
}
.creature-node.aura-q-epica .creature-sprite {
  --aura-c1: rgba(236,72,153,0.85);
  --aura-c2: rgba(236,72,153,0.4);
  filter: drop-shadow(0 0 8px var(--aura-c1)) drop-shadow(0 0 20px var(--aura-c2));
  animation: aura-breathe 2.2s ease-in-out infinite;
}
.creature-node.aura-q-lendaria .creature-sprite {
  --aura-c1: rgba(245,158,11,0.9);
  --aura-c2: rgba(245,158,11,0.45);
  filter: drop-shadow(0 0 9px var(--aura-c1)) drop-shadow(0 0 24px var(--aura-c2));
  animation: aura-breathe 1.9s ease-in-out infinite;
}
.creature-node.aura-q-mitica .creature-sprite {
  --aura-c1: rgba(239,68,68,0.85);
  --aura-c2: rgba(239,68,68,0.4);
  filter: drop-shadow(0 0 9px var(--aura-c1)) drop-shadow(0 0 22px var(--aura-c2));
  animation: aura-breathe 1.9s ease-in-out infinite;
}
.creature-node.aura-q-ancestral .creature-sprite {
  position: relative;
  --aura-c1: rgba(167,139,250,0.95);
  --aura-c2: rgba(167,139,250,0.5);
  filter: drop-shadow(0 0 10px var(--aura-c1)) drop-shadow(0 0 24px var(--aura-c2));
  animation: aura-breathe 1.7s ease-in-out infinite;
}
/* Ancestral: rayos eléctricos que chispean a los lados del sprite, para
   diferenciarlo de cualquier otra rareza (solo aura violeta + relámpagos). */
.creature-node.aura-q-ancestral .creature-sprite::before,
.creature-node.aura-q-ancestral .creature-sprite::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 42px;
  --bolt-rotate: 0deg;
  background: rgba(221,214,254,0.95);
  clip-path: polygon(54% 0%, 22% 44%, 42% 44%, 28% 100%, 78% 36%, 48% 36%);
  filter: drop-shadow(0 0 5px rgba(196,181,253,1)) drop-shadow(0 0 12px rgba(167,139,250,0.9));
  opacity: 0;
  pointer-events: none;
  animation: ancestral-bolt-flicker 1.7s steps(1) infinite;
  z-index: 3;
}
.creature-node.aura-q-ancestral .creature-sprite::before {
  --bolt-rotate: -12deg;
  left: -36px;
  top: 8px;
}
.creature-node.aura-q-ancestral .creature-sprite::after {
  --bolt-rotate: 15deg;
  right: -36px;
  top: 34px;
  animation-delay: 0.85s;
}
@keyframes ancestral-bolt-flicker {
  0%, 7%   { opacity: 0; transform: rotate(var(--bolt-rotate)) scale(0.6); }
  9%, 15%  { opacity: 1; transform: rotate(var(--bolt-rotate)) scale(1.08); }
  17%, 38% { opacity: 0; }
  40%, 46% { opacity: 1; transform: rotate(var(--bolt-rotate)) scale(0.95); }
  48%, 100%{ opacity: 0; }
}
.creature-node.aura-q-divino .creature-sprite {
  position: relative;
  --aura-c1: rgba(251,191,36,0.98);
  --aura-c2: rgba(251,191,36,0.55);
  filter: drop-shadow(0 0 11px var(--aura-c1)) drop-shadow(0 0 28px var(--aura-c2));
  animation: aura-breathe 1.5s ease-in-out infinite;
}
/* Divino: RAYOS DORADOS giratorios + anillo pulsante — efecto superior al
   Ancestral (que solo tiene chispas). El Divino es la rareza máxima. */
.creature-node.aura-q-divino .creature-sprite::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(251,191,36,0) 0deg 7deg,
    rgba(251,191,36,0.55) 7deg 13deg,
    rgba(251,191,36,0) 13deg 24deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 36%, black 40%, black 50%, transparent 54%);
  mask-image: radial-gradient(circle, transparent 36%, black 40%, black 50%, transparent 54%);
  filter: drop-shadow(0 0 8px rgba(251,191,36,0.7));
  animation: divino-spin 6s linear infinite;
  pointer-events: none;
  z-index: -1;
}
.creature-node.aura-q-divino .creature-sprite::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 138px;
  height: 138px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(251,191,36,0.7);
  box-shadow: 0 0 12px rgba(251,191,36,0.9), inset 0 0 12px rgba(251,191,36,0.45);
  animation: divino-pulse-ring 1.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes divino-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes divino-pulse-ring {
  0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.55; }
  50%      { transform: translate(-50%, -50%) scale(1.2);  opacity: 1; }
}
@keyframes aura-breathe {
  0%, 100% { filter: drop-shadow(0 0 8px var(--aura-c1)) drop-shadow(0 0 20px var(--aura-c2)); }
  50%      { filter: drop-shadow(0 0 14px var(--aura-c1)) drop-shadow(0 0 30px var(--aura-c2)); }
}

/* ── AURAS DE RAREZA UNIVERSALES (UI: equipo, captura, PC, market, trade, log) ──
   Reutilizan las custom properties y keyframes de aura-breathe.
   Se aplican directamente a <img> con la clase pk-aura-{tier}. */
img.pk-aura-rara {
  --aura-c1: rgba(59,130,246,0.75);
  --aura-c2: rgba(59,130,246,0.3);
  filter: drop-shadow(0 0 5px var(--aura-c1)) drop-shadow(0 0 12px var(--aura-c2));
  animation: aura-breathe 2.2s ease-in-out infinite;
}
img.pk-aura-epica {
  --aura-c1: rgba(236,72,153,0.75);
  --aura-c2: rgba(236,72,153,0.3);
  filter: drop-shadow(0 0 5px var(--aura-c1)) drop-shadow(0 0 12px var(--aura-c2));
  animation: aura-breathe 2.2s ease-in-out infinite;
}
img.pk-aura-lendaria {
  --aura-c1: rgba(245,158,11,0.8);
  --aura-c2: rgba(245,158,11,0.35);
  filter: drop-shadow(0 0 6px var(--aura-c1)) drop-shadow(0 0 14px var(--aura-c2));
  animation: aura-breathe 1.9s ease-in-out infinite;
}
img.pk-aura-mitica {
  --aura-c1: rgba(239,68,68,0.75);
  --aura-c2: rgba(239,68,68,0.3);
  filter: drop-shadow(0 0 6px var(--aura-c1)) drop-shadow(0 0 14px var(--aura-c2));
  animation: aura-breathe 1.9s ease-in-out infinite;
}
img.pk-aura-ancestral {
  --aura-c1: rgba(167,139,250,0.8);
  --aura-c2: rgba(167,139,250,0.35);
  filter: drop-shadow(0 0 7px var(--aura-c1)) drop-shadow(0 0 16px var(--aura-c2));
  animation: aura-breathe 1.7s ease-in-out infinite;
}
img.pk-aura-divino {
  --aura-c1: rgba(251,191,36,0.85);
  --aura-c2: rgba(251,191,36,0.4);
  filter: drop-shadow(0 0 8px var(--aura-c1)) drop-shadow(0 0 18px var(--aura-c2));
  animation: aura-breathe 1.5s ease-in-out infinite;
}

/* Hub mode: animaciones congeladas solo para sprites (NO para transición de posición) */
/* La transición CSS left/top debe estar activa para movimiento suave */
/* El deslizamiento inicial se previene con _posInited en JS */
.creature-node.hub-mode .creature-sprite.creature-overworld-sprite {
  animation: none !important;
  animation-play-state: paused !important;
  background-position: 0px 0px !important;
}

.creature-label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: 'VT323', 'Barlow', monospace, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4ade80; /* Verde retro Poke Idle / Tibia */
  text-shadow: 1px 1px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000, 0px 2px 4px #000;
  white-space: nowrap;
  pointer-events: none;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  line-height: 1;
  z-index: 10;
}

.creature-label.enemy-label {
  color: #4ade80; /* Verde retro Poke Idle */
}

.creature-label.trainer-label {
  color: #38bdf8; /* Azul Cyan Entrenador */
}

.creature-label.leader-label {
  color: #fbbf24; /* Dorado Amarillo Líder */
}

.creature-label.boss-label {
  color: #f87171; /* Rojo Jefe */
}

.creature-lvl-tag {
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 3px #000;
}

/* --- DIRECCIONES Y ANIMACIONES DE MOVIMIENTO DE CRIATURAS --- */

/* Reposo en la última dirección (Static rest frames when not walking) */
/* Popup LVL UP sobre la cabeza del Pokémon */
.lvlup-popup {
  position: absolute;
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 22px;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251,191,36,0.9), 0 2px 0 #000, 0 0 18px rgba(251,191,36,0.5);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  animation: lvlup-float 1.5s ease-out forwards;
}
.lvlup-popup-multi {
  font-size: 26px;
}
@keyframes lvlup-float {
  0%   { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.6); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.15); }
  30%  { transform: translateX(-50%) translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-48px) scale(1); }
}

.creature-node.walk_left .creature-sprite {
  transform: scaleX(-1);
}
.creature-node.walk_right .creature-sprite {
  transform: scaleX(1);
}
.creature-node.walk_down .creature-sprite {
  transform: scaleX(1);
}
.creature-node.walk_up .creature-sprite {
  transform: scaleX(1);
}

/* Animaciones ejecutadas SÓLO durante el movimiento activo (.walking) */
.creature-node.walk_right.walking .creature-sprite {
  animation: walkStepCycleRight 0.32s ease-in-out infinite;
}

.creature-node.walk_left.walking .creature-sprite {
  animation: walkStepCycleLeft 0.32s ease-in-out infinite;
}

.creature-node.walk_up.walking .creature-sprite {
  animation: walkStepCycleUp 0.32s ease-in-out infinite;
}

.creature-node.walk_down.walking .creature-sprite {
  animation: walkStepCycleDown 0.32s ease-in-out infinite;
}

/* --- MOTOR DE SPRITESHEET OVERWORLD (Escalado aumentado a 116px) --- */
/* Pokémon & Trainer overworld sprite sheet: 4 frames × 4 rows (464px × 464px TOTAL AT LARGER SCALE) */
.creature-sprite.creature-overworld-sprite {
  width: 136px;
  height: 136px;
  background-size: 544px 544px;
  background-position-x: 0px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.creature-node.walk_down  .creature-sprite.creature-overworld-sprite { background-position-y: 0px !important; }
.creature-node.walk_left  .creature-sprite.creature-overworld-sprite { background-position-y: -136px !important; }
.creature-node.walk_right .creature-sprite.creature-overworld-sprite { background-position-y: -272px !important; }
.creature-node.walk_up    .creature-sprite.creature-overworld-sprite { background-position-y: -408px !important; }

.creature-node.walking .creature-sprite.creature-overworld-sprite {
  animation: overworldWalkFrames136 0.40s steps(4) infinite !important;
  transform: none !important;
}

@keyframes overworldWalkFrames136 {
  from { background-position-x: 0px; }
  to   { background-position-x: -544px; }
}

.creature-node.walking .creature-shadow {
  animation: shadowStepCycle 0.32s ease-in-out infinite;
}

.creature-name {
  display: none !important;
}

.creature-hp-bg {
  width: 38px;
  height: 4px;
  background-color: #000000;
  border: 1px solid #000000;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.creature-hp-fill {
  height: 100%;
  transition: width 0.15s ease-in-out;
}

.creature-status-icon {
  font-size: 20px;
  position: absolute;
  top: 28px;
  right: -6px;
  z-index: 10;
  filter: drop-shadow(0 0 3px #000);
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  pointer-events: none;
}

.creature-node.status-revive { opacity: 0.5; }

.creature-sprite {
  width: 176px;
  height: 176px;
  image-rendering: pixelated;
  pointer-events: auto;
  cursor: pointer;
  transition: filter 0.15s;
  position: relative;
  z-index: 2;
}

/* Sombra de suelo elíptica debajo de cada criatura */
.creature-shadow {
  width: 90px;
  height: 22px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  border-radius: 50%;
  margin-top: -30px;
  z-index: 1;
  pointer-events: none;
}

.creature-sprite:hover {
  filter: brightness(1.2);
}

/* --- ANIMACIONES DE COMBATE 2D REALISTAS (TIBIA / POKE IDLE) --- */

/* 1. EMBESTIDA DE ATAQUE DIRECCIONAL MELEE & ATAQUE A DISTANCIA */
.creature-node.attack-pulse .creature-sprite {
  animation: attackPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes attackPulse {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.22) translateY(-4px); filter: brightness(1.6) drop-shadow(0 0 12px rgba(255,255,255,0.9)); }
  65% { transform: scale(0.95); }
  100% { transform: scale(1); filter: none; }
}

.creature-node.attack-lunge-right .creature-sprite {
  animation: lungeRight 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.creature-node.attack-lunge-left .creature-sprite {
  animation: lungeLeft 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.creature-node.attack-lunge-up .creature-sprite {
  animation: lungeUp 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.creature-node.attack-lunge-down .creature-sprite {
  animation: lungeDown 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lungeRight {
  0% { transform: translateX(0) scale(1); }
  40% { transform: translateX(35px) translateY(-6px) scale(1.18); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes lungeLeft {
  0% { transform: translateX(0) scale(1); }
  40% { transform: translateX(-35px) translateY(-6px) scale(1.18); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes lungeUp {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-35px) scale(1.18); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes lungeDown {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(35px) scale(1.18); }
  100% { transform: translateY(0) scale(1); }
}

/* 2. EFECTO DE DAÑO RECIBIDO CON RETROCESO (HIT RECOIL) */
.creature-node.hit .creature-sprite {
  animation: hitKnockback 0.35s ease-out;
}

@keyframes hitKnockback {
  0% { filter: brightness(4) sepia(1) hue-rotate(-50deg); transform: translateY(-5px); }
  25% { filter: brightness(3) sepia(0.8) hue-rotate(-40deg); transform: translateX(-8px); }
  50% { filter: brightness(2); transform: translateX(6px); }
  75% { filter: brightness(1.4); transform: translateY(0); }
  100% { filter: none; transform: translateY(0); }
}

/* Objetivo Fijado (Desactivado el cuadro amarillo por preferencia del usuario) */
.creature-node.targeted::before {
  display: none !important;
}

/* --- BARRA RÁPIDA DE RUTAS --- */
/* Una sola fila ancha (como antes): si no cabe, scroll horizontal en vez de
   envolver a varias filas. El padding-top deja hueco para el badge "1" de la
   Ruta 1 (que cuelga por encima del botón). */
#quick-route-bar {
  /* display flex SIN !important: el inline del HTML y el JS (flex/none)
     siguen ganando; este es solo el respaldo por si alguien borra el inline
     (antes caía a block y los botones se apilaban verticalmente tapando la
     pantalla en móvil). */
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-width: calc(100vw - 40px);
  padding-top: 9px !important;
  scrollbar-width: thin;
  scrollbar-color: #4a4e58 transparent;
}
#quick-route-bar::-webkit-scrollbar { height: 5px; }
#quick-route-bar::-webkit-scrollbar-track { background: transparent; }
#quick-route-bar::-webkit-scrollbar-thumb { background: #4a4e58; border-radius: 3px; }

#quick-route-bar button {
  background: #252830;
  border: 1px solid #4a4e58;
  color: #cbd5e1;
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

/* --- BARRA RÁPIDA DE HUBS (Mercado Global / Centro Pokémon / Market) --- */
/* Una sola fila LARGA: los 3 botones juntos sin envolverse a varias filas.
   Si no caben, scroll horizontal en vez de apilarse. */
#quick-hub-bar {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-width: calc(100vw - 40px);
  scrollbar-width: thin;
  scrollbar-color: #4a4e58 transparent;
}
#quick-hub-bar::-webkit-scrollbar { height: 5px; }
#quick-hub-bar::-webkit-scrollbar-track { background: transparent; }
#quick-hub-bar::-webkit-scrollbar-thumb { background: #4a4e58; border-radius: 3px; }
/* Botones elásticos: reparten el ancho de la barra (todo largo) */
#quick-hub-bar button {
  flex: 1 1 auto;
  justify-content: center;
}

/* Durante la pelea del Jefe Legendario solo se ve la barra del Poder Especial:
   los botones de ruta y el buscador se ocultan por completo. */
#quick-route-bar.combat-mode > *:not(#boss-special-bar) {
  display: none !important;
}

/* ── 🌍 ANUNCIO GLOBAL (Jefe Legendario derrotado) ─────────────────────── */
/* Banner épico en la parte superior, visible para TODOS los jugadores.
   Entrada: cae con rebote; brillo dorado; salida suave hacia arriba. */
#global-announce {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-160px);
  z-index: 42000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1.2, 0.36, 1);
}
#global-announce.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#global-announce .ga-inner {
  min-width: 420px;
  max-width: 66vw;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid rgba(251, 191, 36, 0.85);
  background: linear-gradient(135deg, rgba(30, 15, 5, 0.97), rgba(60, 24, 4, 0.94) 55%, rgba(120, 40, 5, 0.9));
  box-shadow:
    0 0 0 3px rgba(120, 53, 15, 0.35),
    0 0 26px rgba(251, 191, 36, 0.55),
    0 12px 34px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}
/* Sprite del ENTRENADOR vencedor (hoja de sprites: se recorta el frame 0,0 = walk_down) */
#global-announce .ga-trainer {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 10px;
  border: 2px solid rgba(251, 191, 36, 0.5);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#global-announce .ga-trainer-sprite {
  width: 76px;
  height: 76px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: scale(0.85);
}
/* Texto central */
#global-announce .ga-mid {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}
/* Sprite del JEFE derrotado */
#global-announce .ga-boss {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 10px;
  border: 2px solid rgba(251, 191, 36, 0.5);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#global-announce .ga-boss-sprite {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}
#global-announce .ga-boss-fallback {
  font-size: 2rem;
}
/* Brillo animado que recorre el banner */
#global-announce .ga-inner::before {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 236, 179, 0.28), transparent);
  animation: ga-shine 2.6s linear infinite;
}
@keyframes ga-shine {
  0% { left: -70%; }
  60%, 100% { left: 120%; }
}
#global-announce .ga-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#global-announce .ga-crown {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.9));
  animation: ga-bounce 1.1s ease-in-out infinite;
}
@keyframes ga-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
#global-announce .ga-title {
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #fff7d6, #fbbf24 65%, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34vw;
}
#global-announce .ga-sub {
  margin-top: 3px;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: bold;
  color: #fde68a;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ── 💀 Variante DERROTA (el Jefe venció al entrenador) ──────────────── */
#global-announce.ga-defeat .ga-inner {
  border: 2px solid rgba(248, 113, 113, 0.85);
  background: linear-gradient(135deg, rgba(40, 8, 8, 0.97), rgba(70, 12, 12, 0.94) 55%, rgba(120, 20, 20, 0.9));
  box-shadow:
    0 0 0 3px rgba(127, 29, 29, 0.35),
    0 0 26px rgba(248, 113, 113, 0.5),
    0 12px 34px rgba(0, 0, 0, 0.7);
}
#global-announce.ga-defeat .ga-title {
  background: linear-gradient(180deg, #fecaca, #f87171 65%, #b91c1c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f87171;
  text-shadow: 0 0 14px rgba(248, 113, 113, 0.45);
}
#global-announce.ga-defeat .ga-sub {
  color: #fca5a5;
}
#global-announce.ga-defeat .ga-crown {
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.9));
}
#global-announce.ga-defeat .ga-trainer,
#global-announce.ga-defeat .ga-boss {
  border-color: rgba(248, 113, 113, 0.5);
}

/* ── ✨ Variante SHINY (captura de un Pokémon Shiny) ─────────────────── */
#global-announce.ga-shiny .ga-inner {
  border: 2px solid rgba(232, 121, 249, 0.9);
  background: linear-gradient(135deg, rgba(34, 8, 46, 0.97), rgba(60, 12, 80, 0.94) 55%, rgba(110, 30, 140, 0.9));
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.35),
    0 0 26px rgba(232, 121, 249, 0.55),
    0 12px 34px rgba(0, 0, 0, 0.7);
}
#global-announce.ga-shiny .ga-title {
  background: linear-gradient(180deg, #fbcfe8, #f472b6 60%, #a21caf);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f472b6;
  text-shadow: 0 0 14px rgba(232, 121, 249, 0.5);
}
#global-announce.ga-shiny .ga-sub {
  color: #f0abfc;
}
#global-announce.ga-shiny .ga-crown {
  filter: drop-shadow(0 0 6px rgba(232, 121, 249, 0.95));
}
#global-announce.ga-shiny .ga-trainer,
#global-announce.ga-shiny .ga-boss {
  border-color: rgba(232, 121, 249, 0.55);
}
#global-announce.ga-shiny .ga-boss-sprite {
  filter: drop-shadow(0 0 10px rgba(232, 121, 249, 0.9));
}

#quick-route-bar button:hover:not(.locked) {
  background: #353945;
  border-color: var(--tibia-border-gold);
  color: #fff;
}

#quick-route-bar button.active {
  background: rgba(198, 161, 82, 0.18);
  border-color: var(--tibia-border-gold);
  color: #fbbf24;
  box-shadow: 0 0 6px rgba(198, 161, 82, 0.4);
}

#quick-route-bar button.locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: #333742;
  color: #788394;
}

/* ─── RUTA 1: guía de inicio (badge "1" + brillo) ──
   Mientras el jugador está en el Centro Pokémon o el Market, la Ruta 1
   brilla en verde con un badge "1" para indicar por dónde empezar.
   Al viajar a la Ruta 1 (o a cualquier ruta) el resaltado desaparece. */
#quick-route-bar button.route-first-highlight {
  position: relative;
  border-color: #4ade80;
  color: #ffffff;
  animation: bp-nav-glow 1.4s ease-in-out infinite;
}
#quick-route-bar button.route-first-highlight::after {
  content: "1";
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 3;
}

/* ── Torneos PvP ─────────────────────────────────────────────── */
.tn-card {
  background: linear-gradient(180deg, rgba(19,23,38,0.9) 0%, rgba(11,14,24,0.9) 100%);
  border: 1px solid rgba(200,170,110,0.35);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.78rem;
}
.tn-card-title {
  font-weight: 800; color: #fbbf24; letter-spacing: 0.4px; margin-bottom: 8px;
  font-size: 0.8rem;
}
.tn-card-line { color: #cbd5e1; margin: 5px 0; line-height: 1.5; }
.tn-btn {
  display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.4); background: rgba(51,65,85,0.35); color: #e2e8f0;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all .15s;
}
.tn-btn:hover { background: rgba(71,85,105,0.5); }
.tn-btn-green { border-color: rgba(74,222,128,0.5); color: #4ade80; }
.tn-btn-green:hover { background: rgba(74,222,128,0.12); }
.tn-btn-danger { border-color: rgba(248,113,113,0.5); color: #f87171; }
.tn-btn-danger:hover { background: rgba(248,113,113,0.12); }
.tn-round {
  background: rgba(15,23,42,0.55); border: 1px solid rgba(148,163,184,0.2); border-radius: 10px;
  padding: 8px; min-width: 200px;
}
.tn-round-title {
  font-size: 0.72rem; font-weight: 800; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.5px; text-align: center; margin-bottom: 8px;
}
.tn-match {
  background: rgba(2,6,23,0.6); border: 1px solid rgba(148,163,184,0.25); border-radius: 8px;
  padding: 6px 8px; margin-bottom: 8px;
}
.tn-my-match { border-color: rgba(244,114,182,0.55); box-shadow: 0 0 10px rgba(244,114,182,0.15); }
.tn-team {
  padding: 3px 6px; border-radius: 6px; color: #e2e8f0; font-size: 0.74rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn-me { color: #f472b6; font-weight: 800; }
.tn-winner { color: #fbbf24; font-weight: 800; }
.tn-loser { color: #64748b; text-decoration: line-through; }
.tn-match-status { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════
   TEMA MODO INACTIVO (compartido): Ajustes + Auto-Helper
   Mismo diseño/colores que la ventana de confirmación del Modo Inactivo
   (degradado índigo oscuro → púrpura, borde y glow púrpura).
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── VENTANA DE AJUSTES ─── */
.win-settings {
  background: linear-gradient(160deg, #1e1b4b 0%, #0f0a21 70%) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 35px rgba(168, 85, 247, 0.25) !important;
}

.win-settings .settings-header {
  background: linear-gradient(135deg, #2e1065, #1e1b4b) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.35) !important;
  border-radius: 16px 16px 0 0 !important;
}

.win-settings .settings-tabs {
  background: rgba(15, 10, 33, 0.65);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.win-settings .settings-tab {
  color: #e2e8f0;
}

.win-settings .settings-tab:hover {
  color: #ffffff;
  border-bottom-color: rgba(192, 132, 252, 0.6);
}

.win-settings .settings-tab.active {
  color: #fde047;
  border-bottom-color: #fde047;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.45);
}

.win-settings .settings-tab.active i {
  color: #fde047;
}

.win-settings .settings-section {
  background: rgba(46, 16, 101, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 10px;
}

.win-settings .settings-section-header {
  background: rgba(30, 27, 75, 0.55);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  color: #e9d5ff;
}

.win-settings .settings-section-header i {
  color: #c084fc;
}

.win-settings .settings-section-desc {
  color: #a78bfa;
}

.win-settings .settings-btn-option {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c4b5fd;
}

.win-settings .settings-btn-option:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
}

.win-settings .settings-btn-option.active {
  background: linear-gradient(135deg, #7e22ce, #9333ea);
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.45);
}

.win-settings .settings-btn-option.active i {
  color: #ffffff;
}

.win-settings .settings-toggle-slider {
  background: rgba(107, 76, 230, 0.3);
}

.win-settings .settings-toggle-slider::after {
  background: #a78bfa;
}

.win-settings .settings-toggle input:checked + .settings-toggle-slider {
  background: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.win-settings .settings-toggle input:checked + .settings-toggle-slider::after {
  background: #e9d5ff;
  box-shadow: 0 0 8px rgba(233, 213, 255, 0.6);
}

.win-settings .settings-toggle-label {
  color: #f1f5f9;
}

.win-settings .settings-slider-val {
  color: #c084fc;
}

.win-settings .settings-range {
  accent-color: #a855f7;
  background: rgba(107, 76, 230, 0.25);
}

.win-settings .settings-range::-webkit-slider-thumb {
  background: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.win-settings .settings-keybind-row,
.win-settings .settings-account-row {
  background: rgba(46, 16, 101, 0.25);
  color: #c4b5fd;
}

.win-settings .settings-key-input {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(168,85,247,0.25);
  color: #e9d5ff;
}

.win-settings .settings-key-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168,85,247,0.3);
}

.win-settings .settings-account-label {
  color: #a78bfa;
}

.win-settings .settings-action-btn {
  background: rgba(46, 16, 101, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.win-settings .settings-action-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
}

.win-settings .settings-footer {
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  color: #7c6ba6;
}

.win-settings .settings-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
}

/* ─── AUTO-HELPER ─── */
#auto-helper-panel {
  background: linear-gradient(160deg, #1e1b4b 0%, #0f0a21 75%);
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 30px rgba(168, 85, 247, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

#auto-helper-panel .ah-panel-header {
  background: linear-gradient(90deg, #2e1065 0%, #4c1d95 50%, #2e1065 100%);
  border-bottom: 1.5px solid rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.5);
}

#auto-helper-panel .ah-panel-header i {
  color: #c084fc;
}

#auto-helper-panel .ah-module {
  background: rgba(46, 16, 101, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
}

#auto-helper-panel .ah-module-name {
  color: #f3e8ff;
}

#auto-helper-panel .ah-module-desc {
  color: #cbd5e1;
}

#auto-helper-panel .ah-toggle-slider {
  background-color: rgba(107, 76, 230, 0.3);
}

#auto-helper-panel .ah-toggle-slider:before {
  background-color: #a78bfa;
}

#auto-helper-panel .ah-toggle-input:checked + .ah-toggle-slider {
  background-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

#auto-helper-panel .ah-toggle-input:checked + .ah-toggle-slider:before {
  background-color: #e9d5ff;
}

#auto-helper-panel .ah-config-row label {
  color: #e2e8f0;
}

#auto-helper-panel .ah-select {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
}

#auto-helper-panel .ah-select:focus {
  border-color: rgba(168, 85, 247, 0.5);
}

#auto-helper-panel .ah-premium-tag {
  background: linear-gradient(135deg, #7e22ce, #9333ea);
}

#auto-helper-panel .ah-buy-premium-btn {
  background: linear-gradient(135deg, #7e22ce, #9333ea);
}

#auto-helper-panel .ah-buy-premium-btn:hover {
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.6);
}

/* Botón flotante del Auto-Helper a juego */
#auto-helper-btn {
  background: linear-gradient(135deg, rgba(46, 16, 101, 0.95), rgba(30, 27, 75, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c4b5fd;
}

#auto-helper-btn:hover {
  color: #f3e8ff;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.98), rgba(46, 16, 101, 0.98));
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: -2px 2px 16px rgba(0,0,0,0.5), 0 0 20px rgba(168, 85, 247, 0.25);
}

#auto-helper-btn.active {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: -2px 2px 16px rgba(0,0,0,0.5), 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Ajustes de starter modal */
.trainer-setup-form input::placeholder {
  color: #4a5568;
}

/* --- ANIMACIONES DE COMBATE MELEE Y MUERTE --- */

/* Animación de ataque (Embestida) - más rápida y agresiva */
.creature-node.attacking-left {
  animation: bumpLeft 0.28s ease-in-out;
}
.creature-node.attacking-right {
  animation: bumpRight 0.28s ease-in-out;
}

@keyframes bumpLeft {
  0% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(0) scaleX(1); }
  30% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(4px) scaleX(1.1); }
  55% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(-28px) scaleX(0.95); }
  80% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(3px); }
  100% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(0) scaleX(1); }
}

@keyframes bumpRight {
  0% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(0) scaleX(1); }
  30% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(-4px) scaleX(1.1); }
  55% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(28px) scaleX(0.95); }
  80% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(-3px); }
  100% { transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateX(0) scaleX(1); }
}

/* Animación de muerte (Caída al piso) */
.creature-node.dying {
  animation: fallToGround 0.7s ease-out forwards;
  pointer-events: none;
  z-index: 1 !important;
}

@keyframes fallToGround {
  0% {
    transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateY(0) rotate(0deg);
    opacity: 1;
    filter: grayscale(0%);
  }
  50% {
    filter: grayscale(100%) brightness(0.6);
  }
  100% {
    transform: translate(-50%, -50%) scale(var(--window-scale, 1)) translateY(35px) rotate(60deg);
    opacity: 0;
    filter: grayscale(100%) brightness(0.2);
  }
}

/* Boss Creature Aura & Animations */
.creature-node.boss-creature {
  filter: drop-shadow(0 0 10px #f59e0b) drop-shadow(0 0 18px #ef4444) !important;
  transform: translate(-50%, -50%) scale(calc(var(--window-scale, 1) * 1.35)) !important;
  animation: bossGlowPulse 1.2s ease-in-out infinite alternate !important;
  z-index: 100 !important;
}

@keyframes bossGlowPulse {
  0% { filter: drop-shadow(0 0 8px #f59e0b) drop-shadow(0 0 12px #ef4444); }
  100% { filter: drop-shadow(0 0 18px #fbbf24) drop-shadow(0 0 26px #dc2626); }
}

.boss-badge-tag {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
  margin-right: 4px;
}

/* Animaciones para Overlay de Evolución */
@keyframes evoSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.evo-sprite-pulsing {
  animation: evoEpicPulse 0.4s ease-in-out infinite alternate;
}

@keyframes evoEpicPulse {
  0% { filter: brightness(1) drop-shadow(0 0 8px rgba(168, 85, 247, 0.4)); transform: scale(1) rotate(0deg); }
  33% { filter: brightness(2.5) drop-shadow(0 0 20px rgba(251, 191, 36, 0.9)); transform: scale(1.12) rotate(-3deg); }
  66% { filter: brightness(3.5) drop-shadow(0 0 35px rgba(255, 255, 255, 1)); transform: scale(1.2) rotate(3deg); }
  100% { filter: brightness(4) drop-shadow(0 0 50px rgba(168, 85, 247, 1)); transform: scale(1.25) rotate(0deg); }
}

.evo-sprite-burst {
  animation: evoEpicBurst 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes evoEpicBurst {
  0% { filter: brightness(6) saturate(2) drop-shadow(0 0 40px rgba(255,255,255,1)); transform: scale(0.05) rotate(-45deg); opacity: 0.3; }
  15% { filter: brightness(8) saturate(3) drop-shadow(0 0 60px rgba(251,191,36,1)); transform: scale(0.3) rotate(-30deg); opacity: 0.6; }
  30% { filter: brightness(5) saturate(2) drop-shadow(0 0 50px rgba(168,85,247,1)); transform: scale(1.5) rotate(15deg); opacity: 1; }
  50% { filter: brightness(3) saturate(1.5) drop-shadow(0 0 30px rgba(255,255,255,0.8)); transform: scale(1.8) rotate(-10deg); }
  70% { filter: brightness(2) drop-shadow(0 0 20px rgba(74,222,128,0.6)); transform: scale(1.1) rotate(5deg); }
  85% { filter: brightness(1.3) drop-shadow(0 0 15px rgba(74,222,128,0.4)); transform: scale(1.05) rotate(-2deg); }
  100% { filter: brightness(1) drop-shadow(0 0 20px rgba(74,222,128,0.5)); transform: scale(1) rotate(0deg); opacity: 1; }
}

.evo-glow-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, 0.6);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: evoRingExpand 2s ease-out infinite;
  pointer-events: none;
}

@keyframes evoRingExpand {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; border-color: rgba(168, 85, 247, 0.8); }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; border-color: rgba(251, 191, 36, 0.6); }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; border-color: rgba(74, 222, 128, 0.3); }
}

/* Pestañas PC Box */
.pc-tab-btn.active {
  background: rgba(198, 161, 82, 0.3) !important;
  border-color: rgba(198, 161, 82, 0.6) !important;
  color: #fff !important;
}

.pc-slot.bag-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: default;
  padding: 6px 4px;
}

.pc-slot.bag-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Tooltip personalizado */
.custom-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: rgba(8, 12, 22, 0.96);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.72rem;
  font-family: 'Barlow', sans-serif;
  color: #e2e8f0;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 20px rgba(245, 158, 11, 0.15);
  max-width: 340px;
  min-width: 240px;
  backdrop-filter: blur(12px);
  animation: tooltipFadeIn 0.2s ease-out;
  will-change: transform, opacity;
  overflow: hidden;
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 11px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--type-color, rgba(245,158,11,0.6)), rgba(255,255,255,0.08), var(--type-color, rgba(245,158,11,0.6))) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: tooltipBorderPulse 2s ease-in-out infinite;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tooltipBorderPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ─── BATTLE PASS ANIMATIONS ──────────────────────────────────────── */
@keyframes bp-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes bp-claim-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(34,197,94,0.5), 0 0 14px rgba(34,197,94,0.3);
    border-color: #4ade80;
  }
  50% {
    box-shadow: 0 0 14px rgba(34,197,94,0.95), 0 0 30px rgba(34,197,94,0.55), 0 0 44px rgba(34,197,94,0.25);
    border-color: #86efac;
  }
}
@keyframes bp-card-glow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.2);
  }
  50% {
    box-shadow: 0 0 10px rgba(34,197,94,0.35), 0 0 20px rgba(34,197,94,0.15);
    border-color: rgba(134,239,172,0.45);
  }
}

/* Battle Pass scrollbar styles */
[data-bp-pass-scroll]::-webkit-scrollbar { height: 4px; }
[data-bp-pass-scroll]::-webkit-scrollbar-track { background: transparent; }
[data-bp-pass-scroll]::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 2px; }
[data-bp-missions]::-webkit-scrollbar { width: 4px; }
[data-bp-missions]::-webkit-scrollbar-track { background: transparent; }
[data-bp-missions]::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.2); border-radius: 2px; }

/* ─── AUTO HELPER SYSTEM ──────────────────────────────────────────── */
/* Contenedor de los botones flotantes (toggle de notificaciones + Auto-Helper) */
#ah-btn-wrap {
  position: fixed;
  top: 48px;
  right: 0;
  z-index: 8000;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}
#ah-btn-wrap > * {
  pointer-events: auto;
}
#ah-btn-wrap #auto-helper-btn {
  position: static;
  border-radius: 6px 0 0 6px;
}

/* Botón toggle de notificaciones de combate (a la izquierda del Auto-Helper) */
#combat-notif-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(30, 32, 42, 0.95), rgba(20, 22, 30, 0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-right: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  transition: all 0.2s ease;
}
#combat-notif-btn:hover {
  color: #f1f5f9;
  background: linear-gradient(135deg, rgba(40, 42, 55, 0.98), rgba(30, 32, 42, 0.98));
  border-color: rgba(255,255,255,0.15);
}
#combat-notif-btn i {
  font-size: 14px;
}
#combat-notif-btn.off {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(50, 24, 28, 0.95), rgba(34, 18, 22, 0.95));
  box-shadow: inset 0 0 12px rgba(248, 113, 113, 0.15);
}
#combat-notif-btn.off:hover {
  color: #fca5a5;
}

#auto-helper-btn {
  position: fixed;
  top: 48px;
  right: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: linear-gradient(135deg, rgba(30, 32, 42, 0.95), rgba(20, 22, 30, 0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-right: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  box-shadow: -2px 2px 12px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  pointer-events: auto;
}

#auto-helper-btn:hover {
  color: #f1f5f9;
  background: linear-gradient(135deg, rgba(40, 42, 55, 0.98), rgba(30, 32, 42, 0.98));
  border-color: rgba(255,255,255,0.15);
  box-shadow: -2px 2px 16px rgba(0,0,0,0.5), 0 0 20px rgba(59,130,246,0.1);
}

#auto-helper-btn.active {
  color: #60a5fa;
  border-color: rgba(96,165,250,0.3);
  box-shadow: -2px 2px 16px rgba(0,0,0,0.5), 0 0 20px rgba(59,130,246,0.15);
}

#auto-helper-btn i {
  font-size: 14px;
}

/* ─── AUTO-HELPER: atención primera vez (cuenta nueva) ─── */
#auto-helper-btn.ah-attention {
  color: #fbbf24;
  border-color: rgba(251,191,36,0.65);
  animation: ah-attention-pulse 1.2s ease-in-out infinite;
}
#auto-helper-btn.ah-attention:hover {
  color: #fde68a;
  border-color: rgba(251,191,36,0.85);
}
@keyframes ah-attention-pulse {
  0%, 100% {
    box-shadow: -2px 2px 12px rgba(0,0,0,0.4), 0 0 8px rgba(251,191,36,0.35);
  }
  50% {
    box-shadow: -2px 2px 18px rgba(0,0,0,0.55), 0 0 24px rgba(251,191,36,0.9), 0 0 40px rgba(251,191,36,0.4);
  }
}

/* Módulo Auto Potion resaltado (primera vez) */
.ah-module.ah-module-attention {
  border: 1.5px solid rgba(74,222,128,0.7);
  animation: ah-module-glow 1.3s ease-in-out infinite;
  background: rgba(74,222,128,0.06);
}
@keyframes ah-module-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(74,222,128,0.25);
  }
  50% {
    box-shadow: 0 0 18px rgba(74,222,128,0.65), 0 0 30px rgba(74,222,128,0.25);
  }
}

/* Sección Premium (Comprar Premium) resaltada (primera vez) */
.ah-premium-locked.ah-premium-attention {
  opacity: 1;
  border: 1.5px solid rgba(251,191,36,0.7);
  animation: ah-premium-glow 1.3s ease-in-out infinite;
  background: rgba(251,191,36,0.05);
}
@keyframes ah-premium-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(251,191,36,0.25);
  }
  50% {
    box-shadow: 0 0 18px rgba(251,191,36,0.65), 0 0 30px rgba(251,191,36,0.25);
  }
}

/* Badge de temporizadores de Boosters (debajo del botón Auto-Helper) */
#booster-timer-badge {
  position: fixed;
  top: 80px;
  right: 8px;
  z-index: 500;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(18,22,28,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  font-size: 0.72rem;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.2s ease;
  pointer-events: auto;
  contain: layout style;
}

#booster-timer-badge:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(22,26,34,0.95);
}

/* Toasts de progreso de misiones del Battle Pass (matar Pokémon) */
#bp-kill-toasts {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  contain: layout style;
}

.bp-kill-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18,22,28,0.96);
  border: 1.5px solid rgba(248,113,113,0.55);
  border-radius: 8px;
  padding: 7px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55), 0 0 12px rgba(248,113,113,0.15);
  font-size: 0.78rem;
  font-weight: 700;
  color: #f87171;
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  animation: bpToastIn 0.25s ease-out;
}

.bp-kill-toast .bp-toast-ico {
  font-size: 0.85rem;
}

.bp-kill-toast .bp-toast-name {
  color: #fca5a5;
}

.bp-kill-toast .bp-toast-prog {
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(248,113,113,0.3);
  padding: 1px 7px;
  border-radius: 6px;
  color: #fecaca;
  font-variant-numeric: tabular-nums;
}

.bp-kill-toast.done {
  border-color: rgba(74,222,128,0.65);
  color: #4ade80;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55), 0 0 14px rgba(74,222,128,0.25);
}

.bp-kill-toast.done .bp-toast-name {
  color: #86efac;
}

.bp-kill-toast.done .bp-toast-prog {
  background: rgba(74,222,128,0.18);
  border-color: rgba(74,222,128,0.4);
  color: #bbf7d0;
}

.bp-kill-toast.leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
}

@keyframes bpToastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Panel */
/* ─── VENTANA AUTO-HELPER (estilo de las ventanas del juego) ─────────── */
#auto-helper-panel {
  position: fixed;
  z-index: 8001;
  width: 340px;
  max-height: 85vh;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #0b1120 0%, #070a14 100%);
  border: 2px solid #d97706;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 25px rgba(217, 119, 6, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.ah-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #1e1b4b 0%, #2e1065 50%, #1e1b4b 100%);
  border-bottom: 1.5px solid rgba(168, 85, 247, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 10px rgba(0, 0, 0, 0.5);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #c6a152;
  text-shadow: 0 0 10px rgba(198, 161, 82, 0.3);
  cursor: grab;
  user-select: none;
}

.ah-panel-header i {
  color: #c6a152;
  font-size: 0.85rem;
}

.ah-close-btn {
  margin-left: auto;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 3px 10px;
  border-radius: 5px;
  transition: all 0.15s ease;
  font-weight: 700;
}

.ah-close-btn:hover {
  background: linear-gradient(135deg,#ef4444,#dc2626);
  color: #fff;
}

.ah-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Módulo */
.ah-module {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.ah-module-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.ah-module-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.ah-module-info {
  flex: 1;
  min-width: 0;
}

.ah-module-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.ah-module-desc {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
  line-height: 1.3;
}

/* Toggle switch */
.ah-toggle {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

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

.ah-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: 0.3s;
  border-radius: 18px;
}

.ah-toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #64748b;
  transition: 0.3s;
  border-radius: 50%;
}

.ah-toggle-input:checked + .ah-toggle-slider {
  background-color: rgba(59,130,246,0.4);
}

.ah-toggle-input:checked + .ah-toggle-slider:before {
  transform: translateX(14px);
  background-color: #60a5fa;
}

/* Config */
.ah-module-config {
  padding: 6px 10px 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.ah-config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ah-config-row label {
  font-size: 11px;
  color: #94a3b8;
  min-width: 90px;
  flex-shrink: 0;
}

.ah-select {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: #e2e8f0;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  outline: none;
}

.ah-select:focus {
  border-color: rgba(96,165,250,0.4);
}

/* Premium */
.ah-premium-tag {
  font-size: 9px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.ah-premium-locked {
  opacity: 0.7;
}

.ah-premium-locked .ah-module-header {
  cursor: default;
}

.ah-premium-badge {
  font-size: 16px;
}

.ah-premium-msg {
  padding: 6px 10px 10px;
  font-size: 11px;
  color: #f87171;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ah-buy-premium-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.ah-buy-premium-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(245,158,11,0.4);
}

.ah-no-items-msg {
  font-size: 11px;
  color: #f87171;
  padding: 4px 0;
}

/* ─── COMBAT RESULT POPUP ───────────────────────────────────────────── */
#combat-popup-container {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  contain: layout style;
}

.combat-popup {
  width: 280px;
  background: rgba(12, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.cpopup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(30, 32, 42, 0.98), rgba(20, 22, 30, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cpopup-header-icon {
  font-size: 14px;
}

.cpopup-header-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cpopup-body {
  padding: 10px 12px 12px;
}

.cpopup-pokemon-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cpopup-lvl-tag {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-left: 4px;
}

.cpopup-section {
  margin-bottom: 6px;
  padding: 4px 0;
}

.cpopup-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  margin-bottom: 4px;
}

.cpopup-section-title.bp-title {
  color: #3b82f6;
}

.cpopup-exp-row,
.cpopup-bonus-row,
.cpopup-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 12px;
}

.cpopup-exp-row .cpopup-label {
  color: #94a3b8;
}

.cpopup-exp-val {
  color: #60a5fa;
  font-weight: 600;
}

.cpopup-bonus-row .cpopup-label {
  color: #94a3b8;
}

.cpopup-bonus-val {
  color: #fb923c;
  font-weight: 600;
}

.cpopup-total-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
  padding-top: 4px;
}

.cpopup-total-val {
  color: #4ade80;
  font-weight: 700;
  font-size: 13px;
}

.cpopup-loot-section .cpopup-loot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
}

.cpopup-loot-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.cpopup-loot-name {
  flex: 1;
  color: #e2e8f0;
}

.cpopup-loot-qty {
  color: #fbbf24;
  font-weight: 600;
}

.cpopup-no-loot {
  color: #64748b;
  font-size: 11px;
  font-style: italic;
}

.cpopup-gold-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 0;
}

.cpopup-gold-val {
  color: #fbbf24;
  font-weight: 600;
}

.cpopup-bonuses-section {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px 0;
}

.cpopup-bonus-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cpopup-missions-section,
.cpopup-bp-section {
  margin-top: 4px;
}

.cpopup-mission-row {
  padding: 3px 0;
}

.cpopup-mission-name {
  font-size: 11px;
  color: #cbd5e0;
  display: block;
}

.cpopup-mission-progress {
  font-size: 10px;
  color: #94a3b8;
  display: block;
  margin-top: 1px;
}

.cpopup-mission-bar-bg {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}

.cpopup-mission-bar-fill {
  height: 100%;
  background: #a78bfa;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.cpopup-mission-bar-bg.bp-bar .cpopup-mission-bar-fill.bp-fill {
  background: #3b82f6;
}

.cpopup-bp-points {
  font-size: 11px;
  color: #60a5fa;
  font-weight: 600;
  margin-left: 4px;
}

.cpopup-bp-points-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 0;
}

.cpopup-bp-val {
  color: #3b82f6;
  font-weight: 600;
}

/* Tooltip para config */
.cpopup-config-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e0;
  cursor: pointer;
  padding: 4px 0;
}

.cpopup-config-label input[type="checkbox"] {
  accent-color: var(--tibia-border-gold, #d4a853);
  cursor: pointer;
}

.cpopup-config-label:hover {
  color: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════
   SETTINGS WINDOW - TABBED DESIGN
   ═══════════════════════════════════════════════════════ */

.win-settings {
  position: fixed;
  top: calc(50% - 250px);
  left: calc(50% - 340px);
  width: 680px;
  max-width: 92vw;
  max-height: 90vh;
  z-index: 1000;
  background: rgba(12, 14, 20, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7);
  display: none;
  flex-direction: column;
}

.settings-header {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  border-bottom: 1px solid rgba(148,163,184,0.12) !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 12px 16px !important;
  cursor: grab;
  flex-shrink: 0;
}

.settings-subtitle {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: normal;
  margin-left: 6px;
}

.settings-body {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

/* ─── PESTAÑAS ─── */
.settings-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 12px 0;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(148,163,184,0.1);
  flex-shrink: 0;
  overflow-x: auto;
}

.settings-tab {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.settings-tab i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.settings-tab:hover {
  color: #94a3b8;
  border-bottom-color: rgba(148,163,184,0.3);
}

.settings-tab.active {
  color: #fbbf24;
  border-bottom-color: #fbbf24;
}

.settings-tab.active i {
  opacity: 1;
  color: #fbbf24;
}

/* ─── CONTENIDO ─── */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.settings-pane.active {
  display: flex;
}

/* ─── SECCIONES ─── */
.settings-section {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  font-weight: 700;
  font-size: 0.78rem;
  color: #e2e8f0;
}

.settings-section-header i {
  font-size: 0.85rem;
  color: #94a3b8;
  width: 18px;
  text-align: center;
}

.settings-section-desc {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: normal;
  margin-left: auto;
}

.settings-section-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── BOTONES DE OPCIÓN ─── */
.settings-btn-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.settings-btn-option {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}

.settings-btn-option:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.settings-btn-option.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.settings-btn-option.active i {
  color: #fbbf24;
}

/* ─── TOGGLES ─── */
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.settings-toggle input[type="checkbox"] {
  display: none;
}

.settings-toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(71, 85, 105, 0.5);
  border-radius: 10px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.settings-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #94a3b8;
  border-radius: 50%;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.settings-toggle input:checked + .settings-toggle-slider {
  background: rgba(251, 191, 36, 0.4);
}

.settings-toggle input:checked + .settings-toggle-slider::after {
  left: 18px;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.settings-toggle-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 500;
}

.premium-lock {
  opacity: 0.6;
}

/* ─── CHECKBOX GROUP ─── */
.settings-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ─── SLIDER RANGE ─── */
.settings-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-slider-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  min-width: 40px;
  text-align: right;
}

.settings-range {
  flex: 1;
  height: 4px;
  cursor: pointer;
  accent-color: #fbbf24;
  background: rgba(71, 85, 105, 0.3);
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fbbf24;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

/* ─── KEYBINDS ─── */
.settings-keybinds {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.settings-key-input {
  width: 120px;
  text-align: center;
  padding: 4px 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: monospace;
  outline: none;
  transition: border-color 0.2s;
}

.settings-key-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 6px rgba(251,191,36,0.2);
}

/* ─── ACCOUNT ─── */
.settings-account-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}

.settings-account-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.settings-account-value {
  font-size: 0.75rem;
  color: #e2e8f0;
  font-weight: 700;
}

.settings-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.settings-action-btn:hover {
  background: rgba(148,163,184,0.08);
  border-color: rgba(148,163,184,0.2);
}

.settings-action-btn.danger {
  color: #f87171;
  border-color: rgba(248,113,113,0.2);
}

.settings-action-btn.danger:hover {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.3);
}

/* ─── FOOTER ─── */
.settings-footer {
  text-align: center;
  padding: 8px;
  border-top: 1px solid rgba(148,163,184,0.06);
  font-size: 0.6rem;
  color: #475569;
  flex-shrink: 0;
}

.settings-footer i {
  margin-right: 4px;
  color: #22c55e;
}

/* ─── SCROLLBAR ─── */
.settings-content::-webkit-scrollbar {
  width: 4px;
}

.settings-content::-webkit-scrollbar-track {
  background: transparent;
}

.settings-content::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.2);
  border-radius: 2px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .win-settings {
    width: 96vw !important;
    max-height: calc(100dvh - var(--bottom-bar-height) - 10px) !important;
  }
  
  .settings-tab {
    font-size: 0.65rem;
    padding: 6px 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   POKÉDEX REDISEÑADO - Buscador + Filtro Tipo + Diseño Moderno
   ═══════════════════════════════════════════════════════ */

/* ─── POKÉDEX (DISEÑO PREMIUM MODERNO TIPO TIBIA / GLASSMORPHIC 7 COLUMNAS) ─── */
.win-pokedex {
  width: 740px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  z-index: 203;
  background: linear-gradient(180deg, rgba(12, 16, 26, 0.98) 0%, rgba(8, 11, 20, 0.99) 100%) !important;
  border: 1.5px solid rgba(198, 161, 82, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(198, 161, 82, 0.15) !important;
}

.pokedex-win-header {
  background: linear-gradient(180deg, rgba(24, 30, 48, 0.98) 0%, rgba(14, 18, 30, 0.95) 100%) !important;
  border-bottom: 1.5px solid rgba(198, 161, 82, 0.4) !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 10px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.pokedex-win-header .win-title {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #c6a152 !important;
  letter-spacing: 1px !important;
  text-shadow: 0 0 10px rgba(198, 161, 82, 0.4) !important;
}

.pokedex-win-header .win-close-btn {
  position: absolute;
  right: 12px;
  top: 8px;
}

.pokedex-body {
  padding: 12px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* ─── PESTAÑAS POKÉDEX (Normal / Shiny) ─── */
.pokedex-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.dex-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 24, 38, 0.7);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.dex-tab:hover {
  border-color: rgba(251, 191, 36, 0.45);
  color: #f8fafc;
}
.dex-tab.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.06));
  border-color: rgba(251, 191, 36, 0.55);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

/* ─── VISTA SHINY ─── */
.dex-shiny-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}
.dex-shiny-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.3);
  flex-shrink: 0;
}
.dex-shiny-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dex-shiny-count {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 3px 12px;
  border-radius: 12px;
}

/* ─── TOP STAT CARDS ─── */
.pokedex-top-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.dex-stat-card {
  background: rgba(18, 24, 38, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.dex-stat-card:hover {
  background: rgba(30, 41, 62, 0.9);
  border-color: rgba(198, 161, 82, 0.4);
  transform: translateY(-1px);
}

.dex-stat-card.active {
  border-color: #fbbf24 !important;
  background: rgba(30, 41, 62, 0.95) !important;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.3) !important;
}

.dex-card-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.dex-card-num.gold {
  color: #fbbf24;
}

.dex-card-num.grey {
  color: #94a3b8;
}

.dex-card-total {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 2px;
}

.dex-card-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.6px;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ─── CONTROLES: BUSCADOR & DROPDOWN ─── */
.pokedex-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.pokedex-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 12px;
  transition: all 0.2s ease;
}

.pokedex-search-box:focus-within {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.15);
}

.pokedex-search-box i {
  color: #64748b;
  font-size: 0.85rem;
}

.pokedex-search-box input {
  flex: 1;
  background: none;
  border: none;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 500;
  outline: none;
  font-family: inherit;
}

.pokedex-search-box input::placeholder {
  color: #475569;
}

/* Custom Dropdown Tipos */
.pokedex-custom-dropdown {
  position: relative;
  width: 160px;
  flex-shrink: 0;
}

.dex-dropdown-btn {
  width: 100%;
  background: rgba(15, 22, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 7px 12px;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dex-dropdown-btn:hover {
  background: rgba(30, 41, 62, 0.9);
  border-color: rgba(56, 189, 248, 0.6);
}

.dex-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 170px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(10, 15, 26, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 500;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dex-dropdown-menu::-webkit-scrollbar { width: 4px; }
.dex-dropdown-menu::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 2px; }

.dex-dropdown-item {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.dex-dropdown-item:hover,
.dex-dropdown-item.active {
  background: rgba(56, 189, 248, 0.18);
}

/* ─── GRILLA DE 7 COLUMNAS Y SLOTS ─── */
.pokedex-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  max-height: none;
}

.pokedex-grid-7col {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 2px 0;
}

@media (max-width: 768px) {
  .pokedex-grid-7col {
    grid-template-columns: repeat(4, 1fr);
  }
  .pokedex-top-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dex-slot {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9) 0%, rgba(11, 17, 29, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 94px;
  user-select: none;
}

.dex-slot:hover {
  border-color: rgba(198, 161, 82, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(198, 161, 82, 0.2);
  transform: translateY(-2px);
}

/* Top-left status icon (lock or yellow exclamation badge) */
.dex-top-left-icon {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 0.65rem;
  z-index: 2;
}

.dex-lock-icon {
  color: #fbbf24;
  font-size: 0.62rem;
}

.dex-seen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #facc15;
  color: #000;
  font-weight: 900;
  font-size: 0.65rem;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.8);
}

/* Sprite styling */
.dex-slot-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin: 4px 0;
  transition: filter 0.2s ease;
}

/* Locked (dark silhouette) */
.dex-slot.locked .dex-slot-img {
  filter: brightness(0.12) grayscale(1);
  opacity: 0.75;
}

/* Streak Points Dark Neon Theme */
#win-streak ::-webkit-scrollbar {
  width: 6px;
}
#win-streak ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
#win-streak ::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}
#win-streak ::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.8);
}
.streak-upgrade-card:hover {
  border-color: #a855f7 !important;
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-2px);
}

/* Seen (semi-dark preview) */
.dex-slot.seen .dex-slot-img {
  filter: brightness(0.35) grayscale(0.5);
  opacity: 0.85;
}

/* Caught (vibrant color) */
.dex-slot.caught {
  border-color: rgba(198, 161, 82, 0.3);
  background: linear-gradient(180deg, rgba(24, 32, 50, 0.95) 0%, rgba(14, 20, 34, 0.98) 100%);
}

.dex-slot.caught .dex-slot-img {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* Bottom number + name label */
.dex-slot-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  line-height: 1.1;
}

.dex-slot-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
}

.dex-slot-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
}

.dex-sparkle {
  color: #fbbf24;
  font-size: 0.6rem;
}

/* ─── SPRITE ─── */
.dex-slot img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  object-fit: contain;
  transition: transform 0.2s;
  margin-bottom: 1px;
}
.dex-slot:hover img {
  transform: scale(1.2);
}
.dex-slot .dex-img-shadow {
  filter: brightness(0.4) contrast(0.3);
  opacity: 0.7;
}
.dex-slot .dex-img-hidden {
  display: none;
}

/* ─── NÚMERO ─── */
.dex-num {
  font-size: 0.5rem;
  font-weight: 700;
  color: #475569;
  font-family: monospace;
  line-height: 1;
  margin-bottom: 1px;
}
.dex-slot.caught .dex-num {
  color: #60a5fa;
}
.dex-slot.seen .dex-num {
  color: #475569;
}

/* ─── NOMBRE ─── */
.dex-name {
  font-size: 0.55rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  line-height: 1;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dex-slot.caught .dex-name {
  color: #e2e8f0;
}
.dex-slot.locked .dex-name {
  color: #475569;
}

/* ─── ICONO DE ESTADO ─── */
.dex-status-icon {
  font-size: 0.6rem;
  line-height: 1;
  margin-bottom: 1px;
}
.locked-icon { color: #64748b; font-size: 0.65rem; }
.seen-icon { color: #94a3b8; font-size: 0.65rem; }
.caught-icon { font-size: 0.7rem; }
.dex-pokeball-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 15%, #ef4444 40%, #dc2626 100%);
  box-shadow: 0 0 3px rgba(239,68,68,0.3);
  line-height: 1;
  font-size: 0.01rem;
  color: transparent;
  vertical-align: middle;
}

/* ─── TOOLTIP ─── */
.dex-tooltip-content {
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: 240px;
}

.dex-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dex-tooltip-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  font-family: monospace;
}

.dex-tooltip-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fbbf24;
}

.dex-tooltip-caught {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
}

.dex-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dex-tooltip-types {
  display: flex;
  gap: 4px;
}

.dex-tooltip-type {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dex-tooltip-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.dex-tt-stat {
  display: flex;
  justify-content: space-between;
  padding: 2px 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  font-size: 0.7rem;
}

.dex-tt-stat-label {
  color: #94a3b8;
  font-weight: 600;
}

.dex-tt-stat-val {
  color: #e2e8f0;
  font-weight: 700;
  font-family: monospace;
}

.dex-tooltip-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dex-tt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* ─── MENSAJE VACÍO ─── */
.dex-empty-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.dex-empty-msg i {
  font-size: 2rem;
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════
   POKÉDEX DETALLE - Ficha de Pokémon
   ═══════════════════════════════════════════════════════ */

.win-pokedex-detail {
  position: fixed;
  top: calc(50% - 340px);
  left: calc(50% - 280px);
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  z-index: 210;
  background: rgba(8, 10, 18, 0.98) !important;
  border: 1px solid rgba(198, 161, 82, 0.2) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.8), 0 0 40px rgba(198,161,82,0.05) !important;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pkd-win-header {
  background: linear-gradient(135deg, rgba(30,27,20,0.95), rgba(15,12,8,0.98)) !important;
  border-bottom: 1px solid rgba(198,161,82,0.15) !important;
  padding: 10px 16px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.pkd-win-header .win-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
}

.pkd-back-btn {
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.2);
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: inherit;
  transition: all 0.15s;
}

.pkd-back-btn:hover {
  background: rgba(96,165,250,0.2);
  transform: scale(1.05);
}

.pkd-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.pkd-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
}

.pkd-scroll::-webkit-scrollbar { width: 4px; }
.pkd-scroll::-webkit-scrollbar-track { background: transparent; }
.pkd-scroll::-webkit-scrollbar-thumb { background: rgba(198,161,82,0.15); border-radius: 2px; }

.pkd-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.pkd-error {
  padding: 40px;
  text-align: center;
  color: #f87171;
  font-size: 0.85rem;
}

/* ─── ENCABEZADO ─── */
.pkd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(198,161,82,0.08);
}

.pkd-header-left { flex: 1; }

.pkd-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.pkd-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 2px 0 6px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.pkd-types-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.pkd-type-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.pkd-rarity-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pkd-status-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid;
}

.pkd-price-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  color: #fbbf24;
}

.pkd-header-right { flex-shrink: 0; }

.pkd-sprite-box {
  width: 96px;
  height: 96px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(198,161,82,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pkd-sprite {
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
}

/* ─── SECCIONES ─── */
.pkd-section {
  margin-bottom: 14px;
}

.pkd-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pkd-desc {
  font-size: 0.75rem;
  color: #c8cbd0;
  line-height: 1.6;
  font-style: italic;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(96,165,250,0.2);
  border-radius: 4px;
}

/* ─── STATS ─── */
.pkd-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pkd-stat-label {
  width: 72px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  flex-shrink: 0;
}

.pkd-stat-bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  overflow: hidden;
}

.pkd-stat-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}

.pkd-stat-val {
  width: 28px;
  text-align: right;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e2e8f0;
  font-family: monospace;
}

/* ─── INFO GRID ─── */
.pkd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.pkd-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.03);
}

.pkd-info-label {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 500;
}

.pkd-info-val {
  font-size: 0.7rem;
  color: #e2e8f0;
  font-weight: 600;
}

/* ─── CADENA EVOLUTIVA ─── */
.pkd-evo-chain {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pkd-evo-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  transition: all 0.15s;
  min-width: 60px;
}

.pkd-evo-node:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(198,161,82,0.2);
}

.pkd-evo-current {
  border-color: rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.05);
}

.pkd-evo-node img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.pkd-evo-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
}

.pkd-evo-num {
  font-size: 0.5rem;
  color: #64748b;
  font-family: monospace;
}

.pkd-evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #475569;
  font-size: 0.7rem;
}

.pkd-evo-req {
  font-size: 0.55rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── PROGRESO ─── */
.pkd-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.pkd-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.pkd-reward-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  margin-top: 4px;
}

.pkd-reward-ready {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  cursor: pointer;
  transition: all 0.15s;
}

.pkd-reward-ready:hover {
  background: rgba(34,197,94,0.15);
}

.pkd-reward-locked {
  background: rgba(100,116,139,0.05);
  border: 1px solid rgba(100,116,139,0.1);
}

/* ─── HITOS ─── */
.pkd-milestone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 3px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
}

.pkd-milestone-done {
  background: rgba(34,197,94,0.04);
  border-color: rgba(34,197,94,0.1);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .win-pokedex-detail {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .pkd-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .pkd-types-row,
  .pkd-meta-row {
    justify-content: center;
  }
  .pkd-info-grid {
    grid-template-columns: 1fr;
  }
  .pkd-evo-chain {
    justify-content: center;
  }
}

/* ─── LIGHT THEME ─── */
.theme-light {
  --bg-primary: #f0f2f5;
  --bg-secondary: #e2e4e8;
  --text-main: #1a1a2e;
  --text-muted: #64748b;
  --tibia-bg: #e8eaf0;
  --tibia-border-window: #c0c4cc;
  --tibia-border-gold: #c6a152;
}
.theme-light .tibia-window {
  background: rgba(240,242,245,0.95);
  color: #1a1a2e;
}
.theme-light .win-header {
  background: linear-gradient(90deg,#c0a050,#a08030);
}
.theme-light .top-menu {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.95) 0%, rgba(240, 238, 230, 0.97) 100%);
  border-color: rgba(150, 130, 70, 0.6);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.theme-light .nav-icon-btn {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(150, 150, 160, 0.55);
  color: #333;
}
.theme-light .nav-icon-btn:hover {
  background: #fff;
  border-color: var(--tibia-border-gold);
}
.theme-light .top-res-item {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(170, 170, 180, 0.6);
}
.theme-light .icon-separator {
  background: linear-gradient(180deg, transparent, #b0b0b8, transparent);
}

/* ─── MODO DALTÓNICO (corrección real) ───
   El ajuste de Accesibilidad elige el tipo de daltonismo y se aplica una
   corrección de colores (matrices Machado 2009 vía SVG feColorMatrix) al
   mundo, los sprites, las barras de HP y los colores de calidad/tipo.
   Se aplica SOLO a estos elementos y NO a html/body: un filter en un
   ancestro crearía un containing block y rompería las ventanas position:fixed
   del juego (ventanas, HUD, modales). */
html.cvd-protanopia #game-canvas,
html.cvd-protanopia .creature-node,
html.cvd-protanopia .creature-hp-fill,
html.cvd-protanopia .type-badge,
html.cvd-protanopia .badge-type,
html.cvd-protanopia .move-type-pill,
html.cvd-protanopia .quality-text,
html.cvd-protanopia .q-fraca, html.cvd-protanopia .q-comum, html.cvd-protanopia .q-incomum,
html.cvd-protanopia .q-rara, html.cvd-protanopia .q-epica, html.cvd-protanopia .q-lendaria,
html.cvd-protanopia .q-mitica, html.cvd-protanopia .q-ancestral, html.cvd-protanopia .q-divino {
  filter: url(#cvd-protanopia);
}
html.cvd-deuteranopia #game-canvas,
html.cvd-deuteranopia .creature-node,
html.cvd-deuteranopia .creature-hp-fill,
html.cvd-deuteranopia .type-badge,
html.cvd-deuteranopia .badge-type,
html.cvd-deuteranopia .move-type-pill,
html.cvd-deuteranopia .quality-text,
html.cvd-deuteranopia .q-fraca, html.cvd-deuteranopia .q-comum, html.cvd-deuteranopia .q-incomum,
html.cvd-deuteranopia .q-rara, html.cvd-deuteranopia .q-epica, html.cvd-deuteranopia .q-lendaria,
html.cvd-deuteranopia .q-mitica, html.cvd-deuteranopia .q-ancestral, html.cvd-deuteranopia .q-divino {
  filter: url(#cvd-deuteranopia);
}
html.cvd-tritanopia #game-canvas,
html.cvd-tritanopia .creature-node,
html.cvd-tritanopia .creature-hp-fill,
html.cvd-tritanopia .type-badge,
html.cvd-tritanopia .badge-type,
html.cvd-tritanopia .move-type-pill,
html.cvd-tritanopia .quality-text,
html.cvd-tritanopia .q-fraca, html.cvd-tritanopia .q-comum, html.cvd-tritanopia .q-incomum,
html.cvd-tritanopia .q-rara, html.cvd-tritanopia .q-epica, html.cvd-tritanopia .q-lendaria,
html.cvd-tritanopia .q-mitica, html.cvd-tritanopia .q-ancestral, html.cvd-tritanopia .q-divino {
  filter: url(#cvd-tritanopia);
}

/* ─── MODO STREAMER (oculta información sensible en pantalla) ───
   - Oculta los nombres de los demás jugadores en el mundo (etiquetas flotantes
     sobre los personajes online).
   - El correo se enmascara en la pestaña Cuenta (lo hace game.js). */
.streamer-mode .online-label {
  display: none !important;
}

/* ─── LITE MODE (reduce efectos) ───
   Modo Lite = Render Mode BAJO + sombras ocultas: sin partículas ni glow de
   combate (lo fuerza game.js con _effectiveRenderQuality), sin sombras del
   suelo, sin auras de rareza, sin iconos de estado y sin animaciones de
   evolución. */
.lite-mode .creature-shadow {
  display: none !important;
}
.lite-mode .creature-status-icon {
  display: none !important;
}
.lite-mode .evo-sprite-pulsing,
.lite-mode .evo-sprite-burst,
.lite-mode .evo-glow-ring {
  display: none !important;
  animation: none !important;
}
/* Auras de rareza apagadas en Lite (sprite sin halo ni animación) */
.lite-mode .creature-node .creature-sprite {
  filter: none !important;
  animation: none !important;
}
/* Excepción: el Pokémon líder SÍ debe poder caminar (animación funcional, no decorativa) */
.lite-mode .creature-node.walking .creature-sprite.creature-overworld-sprite {
  animation: overworldWalkFrames136 0.40s steps(4) infinite !important;
}
.lite-mode .creature-node.aura-q-ancestral .creature-sprite::before,
.lite-mode .creature-node.aura-q-ancestral .creature-sprite::after,
.lite-mode .creature-node.aura-q-divino .creature-sprite::before,
.lite-mode .creature-node.aura-q-divino .creature-sprite::after {
  display: none !important;
}
.lite-mode img.pk-aura-rara,
.lite-mode img.pk-aura-epica,
.lite-mode img.pk-aura-lendaria,
.lite-mode img.pk-aura-mitica,
.lite-mode img.pk-aura-ancestral,
.lite-mode img.pk-aura-divino {
  filter: none !important;
  animation: none !important;
}

/* ═══════════════════════════════════════════════════
   🌟 MARKET SHOP — Tienda del NPC Vendedor (3 pestañas)
   ═══════════════════════════════════════════════════ */
.market-shop-window {
  position: fixed;
  top: 0;
  left: 0;
  width: 500px;
  max-width: 92vw;
  max-height: 80vh;
  background: linear-gradient(145deg, #1a1d25 0%, #12151c 100%);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(251, 191, 36, 0.05) inset;
  z-index: 210;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: marketShopFadeIn 0.25s ease-out;
  cursor: default;
  user-select: none;
}

@keyframes marketShopFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── HEADER ─── */
.market-shop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.02));
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
  cursor: move; flex-shrink: 0;
}
.market-shop-header-left { display: flex; align-items: center; gap: 12px; }
.market-shop-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fbbf24; flex-shrink: 0;
}
.market-shop-title-group { display: flex; flex-direction: column; }
.market-shop-title { font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 700; color: #fbbf24; letter-spacing: 1px; text-transform: uppercase; }
.market-shop-subtitle { font-size: 0.65rem; color: #94a3b8; letter-spacing: 0.5px; }
.market-shop-close-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  color: #94a3b8; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all 0.2s; flex-shrink: 0;
}
.market-shop-close-btn:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #ef4444; transform: rotate(90deg); }

/* ─── TABS ─── */
.market-shop-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 16px 0 16px;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.market-tab-btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.market-tab-btn:hover {
  color: #cbd5e1;
  background: rgba(255,255,255,0.03);
}
.market-tab-btn.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.15);
  box-shadow: 0 -2px 6px rgba(251, 191, 36, 0.06);
}
.market-tab-btn i { font-size: 0.8rem; }

/* ─── BODY ─── */
.market-shop-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.market-tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.market-tab-content.active { display: flex; }
.market-shop-scroll {
  flex: 1; overflow-y: auto; padding: 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.15) transparent;
}
.market-shop-scroll::-webkit-scrollbar { width: 4px; }
.market-shop-scroll::-webkit-scrollbar-thumb { background: rgba(251, 191, 36, 0.25); border-radius: 4px; }

.market-shop-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 40px; color: #64748b; font-size: 0.85rem;
}

/* ─── BALANCE DISPLAY ─── */
.market-shop-balance {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0.02));
  border: 1px solid rgba(251, 191, 36, 0.1); border-radius: 10px;
}
.market-shop-balance span:last-child { margin-left: auto; }

/* ─── ITEM ROW (Comprar y Vender) ─── */
.market-shop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: all 0.2s;
  margin-bottom: 4px;
}
.market-shop-item:hover { background: rgba(251,191,36,0.04); border-color: rgba(251,191,36,0.15); transform: translateX(2px); }
.market-shop-item.locked { cursor: default; opacity: 0.6; filter: saturate(0.65); }
.market-shop-item.locked:hover { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.05); transform: none; }
.market-shop-item img { width: 28px; height: 28px; image-rendering: pixelated; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.market-sell-lock {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: #f87171;
}
.market-item-desc.locked-desc { color: #f87171 !important; }
.market-lock-note {
  flex-shrink: 0; font-size: 0.58rem; font-weight: 700; color: #f87171;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px; padding: 2px 6px; white-space: nowrap;
}
.market-shop-item-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.market-item-name { font-size: 0.78rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-item-desc { font-size: 0.62rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-item-price {
  display: flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: 0.75rem; color: #fbbf24;
  white-space: nowrap; flex-shrink: 0;
}
.market-item-price i { font-size: 0.7rem; }

/* ─── BUY TAB: SLIDER + CONTROLS ─── */
.market-buy-item {
  flex-wrap: wrap;
  gap: 6px 10px;
}
.market-buy-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  width: 180px;
}
.market-qty-slider {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, rgba(251,191,36,0.15), rgba(251,191,36,0.3));
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 0;
  transition: background 0.2s;
}
.market-qty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 2px solid rgba(0,0,0,0.3);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(251,191,36,0.3);
  transition: transform 0.15s;
}
.market-qty-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.market-qty-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 2px solid rgba(0,0,0,0.3);
  cursor: pointer;
}
.market-qty-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.market-qty-label {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}
.market-qty-label strong {
  color: #fbbf24;
  font-size: 0.75rem;
}
.market-buy-controls .market-item-price {
  font-size: 0.72rem;
}
.market-buy-controls .market-buy-btn {
  width: 100%;
  padding: 5px 0;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
}

/* ─── BUY / SELL BUTTONS ─── */
.market-buy-btn-locked {
  width: 100%;
  padding: 5px 0;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(30,41,59,0.6), rgba(15,23,42,0.7)) !important;
  border: 1px dashed rgba(148,163,184,0.45) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  text-transform: uppercase;
  opacity: 0.9;
}
.market-buy-btn-locked:hover {
  background: linear-gradient(135deg, rgba(30,41,59,0.6), rgba(15,23,42,0.7)) !important;
  border-color: rgba(148,163,184,0.45) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  transform: none !important;
}
.market-shop-locked .market-item-name {
  color: #cbd5e1;
}
.market-buy-btn, .market-sell-btn {
  padding: 5px 12px; border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04));
  color: #fbbf24; font-size: 0.65rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; flex-shrink: 0;
  font-family: inherit; letter-spacing: 0.3px;
}
.market-buy-btn:hover, .market-sell-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000; border-color: #fbbf24;
  transform: scale(1.04); box-shadow: 0 4px 12px rgba(251,191,36,0.25);
}
.market-buy-btn:active, .market-sell-btn:active { transform: scale(0.96); }

.market-sell-btn { background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04)); border-color: rgba(34,197,94,0.25); color: #4ade80; }
.market-sell-btn:hover { background: linear-gradient(135deg, #22c55e, #16a34a); color: #000; border-color: #22c55e; }

/* ─── SELL TAB ─── */
.market-sell-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.market-sell-all-btn {
  padding: 5px 14px; border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.25);
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
  color: #f87171; font-size: 0.68rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.market-sell-all-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; border-color: #ef4444;
  transform: scale(1.04); box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}

.market-sell-empty {
  padding: 30px; text-align: center; color: #64748b; font-size: 0.8rem;
}

/* Barra de total de venta (oro que darían los items seleccionados) */
.market-sell-total-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
  border-bottom: 1px solid rgba(251,191,36,0.15);
  border-top: 1px solid rgba(251,191,36,0.08);
}

/* ─── SELL TAB: SELECTION CHECKBOXES ─── */
.market-sell-checkbox {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.market-sell-checkbox:hover { border-color: rgba(74,222,128,0.5); }
.market-sell-checkbox.checked {
  background: rgba(34,197,94,0.15);
  border-color: #4ade80;
}
.market-sell-checkbox.checked::after {
  content: '✓';
  color: #4ade80;
  font-size: 0.7rem;
  font-weight: 900;
}
.market-shop-item.sell-item-selected {
  border-color: rgba(34,197,94,0.4);
  background: rgba(34,197,94,0.06);
  box-shadow: 0 0 10px rgba(34,197,94,0.08);
}

/* ─── POKÉMON TAB ─── */
.market-poke-header {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.market-poke-filters {
  display: flex; gap: 3px; flex-wrap: wrap;
}
.market-poke-filter-btn {
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #64748b; font-size: 0.62rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.market-poke-filter-btn:hover { background: rgba(255,255,255,0.04); color: #cbd5e1; }
.market-poke-filter-btn.active { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.25); color: #fbbf24; }
/* Estado EXCLUIDO: el filtro ahora OCULTA esa calidad (clic = quitar de la venta) */
.market-poke-filter-btn.excluded {
  background: rgba(239,68,68,0.12) !important;
  border-color: rgba(239,68,68,0.4) !important;
  color: #f87171 !important;
  text-decoration: line-through;
}
.market-poke-filter-btn.excluded:hover { background: rgba(239,68,68,0.18) !important; color: #fca5a5 !important; }
.market-poke-filter-hint {
  font-size: 0.6rem;
  color: #94a3b8;
  padding: 2px 2px 6px;
  line-height: 1.4;
}
.market-poke-filter-hint b { color: #fbbf24; }

.market-poke-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.market-poke-total {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid rgba(251,191,36,0.35);
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
  color: #fbbf24; font-size: 0.75rem; font-weight: 700;
  font-family: inherit;
}
.market-poke-action-btn {
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid rgba(59,130,246,0.25);
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.04));
  color: #60a5fa; font-size: 0.65rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: inherit;
}
.market-poke-action-btn:hover { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); transform: scale(1.02); }
.market-poke-action-btn.sell-btn {
  border-color: rgba(34,197,94,0.25);
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.04));
  color: #4ade80;
}
.market-poke-action-btn.sell-btn:hover { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); }

/* ─── POKÉMON CARD IN SELL LIST ─── */
.market-poke-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: all 0.2s;
  margin-bottom: 4px;
}
.market-poke-card:hover { background: rgba(251,191,36,0.04); border-color: rgba(251,191,36,0.15); }
.market-poke-card.selected {
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.06);
  box-shadow: 0 0 12px rgba(251,191,36,0.06);
}

.market-poke-checkbox {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

/* ─── POKÉMON INICIAL (no vendible) ─── */
.market-poke-card.starter-locked {
  border-color: rgba(251,191,36,0.25);
  background: linear-gradient(135deg, rgba(251,191,36,0.05), rgba(255,255,255,0.01));
  opacity: 0.85;
  cursor: default;
}
.market-poke-card.starter-locked:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(255,255,255,0.02));
  border-color: rgba(251,191,36,0.35);
  transform: none;
}
.market-poke-checkbox.locked {
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.1);
  color: #fbbf24;
  cursor: not-allowed;
}
.market-poke-checkbox.checked {
  background: #fbbf24;
  border-color: #fbbf24;
}
.market-poke-checkbox.checked::after {
  content: "✓";
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
}

.market-poke-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.market-poke-card-name { font-size: 0.78rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-poke-card-sub {
  font-size: 0.6rem; color: #64748b;
  display: flex; gap: 6px; align-items: center;
}
.market-poke-card-price { font-weight: 700; font-size: 0.72rem; color: #4ade80; white-space: nowrap; flex-shrink: 0; }

/* ─── ERROR ─── */
.market-shop-error {
  padding: 6px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  animation: marketShopShake 0.3s ease;
}
@keyframes marketShopShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

/* ─── FOOTER ─── */
.market-shop-footer {
  padding: 6px 20px;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.15);
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   WELCOME POPUP (Primera vez)
   ══════════════════════════════════════════════ */
#welcome-popup .modal-content {
  max-width: 520px;
  background: linear-gradient(145deg, #1a1e2e, #0f1222);
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 16px;
  padding: 28px;
}
.welcome-popup-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.welcome-popup-body {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.welcome-gift-box {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.welcome-gift-items {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}
.welcome-gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.welcome-gift-item img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.welcome-gift-qty {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fbbf24;
}
.welcome-gift-name {
  font-size: 0.75rem;
  color: #94a3b8;
}
.welcome-tips-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  padding: 16px 18px;
}
.welcome-tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.welcome-tip-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.2s;
}
.welcome-tip-card:hover {
  border-color: rgba(255,255,255,0.15);
}
.welcome-tip-icon {
  font-size: 1.2rem;
  min-width: 22px;
  text-align: center;
  margin-top: 1px;
}
.welcome-tip-text {
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.4;
}
.welcome-tip-text strong {
  color: #fbbf24;
}
.welcome-popup-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ═══════════ MARKET ONLINE — JUGADORES REMOTOS ═══════════ */
.online-remote-node {
  z-index: 6;
  contain: layout style;
  pointer-events: none !important;
}
.online-remote-node .online-trainer-sprite {
  width: 96px;
  height: 96px;
  background-repeat: no-repeat;
  background-size: 384px 384px;
  background-position: 0px 0px;
  image-rendering: pixelated;
  position: relative;
  z-index: 2;
}
.online-remote-node .online-label {
  color: #38bdf8;
  font-weight: 700;
  text-shadow: 1px 1px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000, 0px 2px 4px #000;
}
.online-remote-node.walking .online-trainer-sprite {
  animation: onlineWalkBob 0.4s linear infinite;
}
@keyframes onlineWalkBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Globo de chat sobre jugadores remotos (Market) — MISMO estilo que el globo local
   (showPokeCenterSpeech en game.js): fondo blanco, texto oscuro, borde morado. */
.online-speech-bubble {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 15;
  max-width: 240px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: monospace;
  color: #1a202c;
  background: #ffffff;
  border: 2px solid #a78bfa;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  white-space: pre-wrap;
  word-break: break-word;
  animation: onlineBubbleIn 0.2s ease-out;
}
@keyframes onlineBubbleIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Badge de estado online (Market) */
#online-status-badge {
  user-select: none;
  animation: onlineBadgePulse 2s ease-in-out infinite;
}
@keyframes onlineBadgePulse {
  0%, 100% { box-shadow: 0 0 6px rgba(34,197,94,0.3), 0 4px 10px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 16px rgba(34,197,94,0.7), 0 4px 10px rgba(0,0,0,0.5); }
}

/* ─────────────────────────────────────────────
   Tarjeta de perfil del jugador (doble clic en el Market)
   ───────────────────────────────────────────── */
.profile-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s ease;
  font-family: inherit;
}
.profile-card-backdrop.visible { opacity: 1; }

.profile-card {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(160deg, #101a2e 0%, #0b1220 70%, #0a0f1c 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 42px rgba(59, 130, 246, 0.14);
  padding: 18px 16px 14px;
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s ease;
  user-select: none;
}
.profile-card-backdrop.visible .profile-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.profile-card::-webkit-scrollbar { width: 6px; }
.profile-card::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 3px; }

.pc-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.pc-close:hover { background: rgba(248, 113, 113, 0.25); color: #f87171; transform: rotate(90deg); }

.pc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 12px;
}
.pc-avatar {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.55), 0 6px 16px rgba(0, 0, 0, 0.5);
}
.pc-avatar-img {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  /* Sprite sheet 4×4 del entrenador: mostramos SOLO el frame 1 (caminar
     hacia abajo) recortado en círculo — mismo patrón que el juego. */
  background-size: 400% 400%;
  background-position: 0% 0%;
  image-rendering: pixelated;
}
.pc-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.pc-head-info { min-width: 0; flex: 1; }
.pc-name {
  font-weight: 800;
  color: #f8fafc;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-sub { color: #94a3b8; font-size: 0.72rem; margin-top: 2px; }
.pc-ranking {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  padding: 2px 9px;
}
.pc-ranking b { color: #fbbf24; }
.pc-rank-total { font-size: 0.6rem; color: #64748b; }
.pc-rank-sub { font-size: 0.6rem; color: #475569; font-weight: 400; }

.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
  margin-bottom: 12px;
}
.pc-row {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 7px 9px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.pc-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.pc-row-icon { font-size: 0.85rem; }
.pc-row-label {
  flex: 1;
  color: #94a3b8;
  font-size: 0.68rem;
  white-space: nowrap;
}
.pc-row-val {
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.pc-row-sub { font-size: 0.6rem; color: #4a4d54; }

.pc-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 9px;
  padding: 6px 10px;
  margin-bottom: 12px;
}
.pc-badges-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fbbf24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-tags {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}
.pc-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid;
  border-radius: 9px;
  padding: 7px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-tag-sub { font-weight: 400; font-size: 0.68rem; opacity: 0.85; }
.pc-tag-empty { color: #64748b; border-color: rgba(100, 116, 139, 0.3); }

.pc-leader {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 12px;
}
.pc-leader-icon {
  font-size: 0.72rem;
  color: #86efac;
  white-space: nowrap;
}
.pc-leader-img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  /* Sprite sheet overworld 4×4 (128×128): mostramos SOLO el frame 1
     (caminar hacia abajo, 32×32) ampliado a 42px. */
  background-size: 168px 168px;
  background-position: 0% 0%;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.pc-leader-img.pc-leader-fallback {
  /* Fallback (showdown): imagen estática de una sola celda */
  background-size: cover;
  background-position: center;
}
.pc-leader-name {
  flex: 1;
  font-weight: 700;
  color: #e2e8f0;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-leader-lvl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.pc-leader-img-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: help;
}
/* Tooltip de stats del Pokémon líder: solo visible al pasar el cursor sobre el sprite */
.pc-leader-stats {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 7px 9px;
  min-width: 210px;
  background: rgba(10, 14, 22, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.pc-leader-img-wrap:hover .pc-leader-stats {
  opacity: 1;
  visibility: visible;
}
/* Overlay FIJO: el tooltip de stats se muestra POR ENCIMA de la ventana del
   perfil (fuera de la tarjeta, que recorta su contenido con overflow),
   flotando junto al cursor. La posición la setea PlayerSync vía JS. */
.pc-leader-stats-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 24px));
}
.pc-ls-head {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
/* Rejilla con TODAS las stats del Pokémon líder (PS/Ataque/Defensa/At.Esp/Def.Esp/Vel) */
.pc-ls-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 4px 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}
.pc-ls-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.62rem;
  color: #cbd5e1;
}
.pc-ls-stat b {
  color: #f8fafc;
  font-size: 0.7rem;
}
.pc-ls-k {
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.58rem;
}
.pc-ls-stat-na {
  opacity: 0.5;
}
.pc-ls-pill {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.pc-ls-item {
  font-size: 0.64rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.pc-ls-item b {
  color: #e2e8f0;
}

.pc-hint {
  text-align: center;
  color: #475569;
  font-size: 0.62rem;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────
   Centro de Mensajes (win-msc)
   ───────────────────────────────────────────── */
.nav-msc-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}
#icon-msc.has-unread {
  animation: mscBtnPulse 1.6s ease-in-out infinite;
}
@keyframes mscBtnPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(56, 189, 248, 0.25); }
  50% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.8); }
}

.win-msc .win-body { height: calc(100% - 40px); }
.msc-layout {
  display: flex;
  height: 100%;
  min-height: 0;
}
.msc-sidebar {
  width: 168px;
  flex-shrink: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}
.msc-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: left;
}
.msc-cat-btn i { width: 16px; text-align: center; }
.msc-cat-btn:hover { background: rgba(255, 255, 255, 0.05); color: #e2e8f0; }
.msc-cat-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.msc-cat-unread {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msc-claim-all-btn {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(217, 119, 6, 0.18));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.msc-claim-all-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}
.msc-claim-all-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.msc-claim-all-btn.glow { animation: mscBtnPulse 1.6s ease-in-out infinite; }

.msc-list-col {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.msc-list-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.msc-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.msc-search-box i {
  position: absolute;
  left: 9px;
  color: #64748b;
  font-size: 0.7rem;
}
.msc-search-box input {
  width: 100%;
  padding: 6px 8px 6px 26px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.72rem;
  outline: none;
}
.msc-tool-btn {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.msc-tool-btn:hover, .msc-tool-btn.on { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.msc-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.msc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.75rem;
  padding: 30px 10px;
  text-align: center;
}
.msc-empty.small { padding: 14px 6px; font-size: 0.68rem; }

.msc-msg-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  color: #e2e8f0;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.msc-msg-item:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.msc-msg-item.selected {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
}
.msc-msg-item.unread { border-left: 3px solid #38bdf8; }
.msc-msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
}
.msc-msg-cat {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.msc-msg-gift { font-size: 0.75rem; }
.msc-msg-gift.msc-claimed { color: #4ade80; }
.msc-star { margin-left: auto; font-size: 0.7rem; }
.msc-msg-date { margin-left: auto; color: #64748b; }
.msc-msg-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}
.msc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8);
}
.msc-msg-from { font-size: 0.64rem; color: #64748b; }

.msc-reader {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.1);
}
.msc-reader-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #64748b;
  font-size: 0.78rem;
}
.msc-reader-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.msc-reader-actions { margin-left: auto; display: flex; gap: 5px; }
.msc-act-btn {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.msc-act-btn:hover { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; }
.msc-act-btn.on { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.msc-act-btn.danger:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.msc-reader-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
  line-height: 1.3;
}
.msc-reader-meta { font-size: 0.68rem; color: #64748b; margin-bottom: 12px; }
.msc-reader-body {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.msc-rewards-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #fbbf24;
  margin-bottom: 8px;
}
.msc-rewards { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.msc-reward {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 7px 10px;
}
.msc-reward img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.msc-reward-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  flex-shrink: 0;
}
.msc-reward-ico.gold { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.msc-reward-ico.purple { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.msc-reward > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msc-reward b { font-size: 0.8rem; color: #e2e8f0; }
.msc-reward small { font-size: 0.62rem; color: #64748b; }
.msc-reward-qty {
  font-size: 0.72rem;
  font-weight: 800;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.msc-claim-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.25));
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fbbf24;
  border-radius: 9px;
  padding: 11px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-bottom: 10px;
}
.msc-claim-btn:hover { transform: translateY(-1px); box-shadow: 0 0 16px rgba(251, 191, 36, 0.35); }
.msc-claimed-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 10px;
}
.msc-reply-btn {
  width: 100%;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 9px;
  padding: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}
.msc-reply-btn:hover { transform: translateY(-1px); }

.msc-compose-open-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 6px;
  padding: 4px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.msc-compose-open-btn:hover { background: rgba(56, 189, 248, 0.22); }

.msc-compose-row { margin-bottom: 10px; }
.msc-compose-row label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.msc-compose-row input, .msc-compose-row textarea {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.78rem;
  outline: none;
  box-sizing: border-box;
}
.msc-compose-row textarea { resize: vertical; }
.msc-att-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  margin: 4px 0 6px;
}
.msc-att-label small { font-weight: 400; color: #64748b; margin-left: 4px; }
.msc-att-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.msc-att-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 0.68rem;
}
.msc-att-item img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.msc-att-item i { width: 24px; text-align: center; color: #fbbf24; }
.msc-att-item span { flex: 1; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msc-att-item small { color: #64748b; }
.msc-att-item button {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  font-weight: 900;
  cursor: pointer;
}
.msc-att-item.added { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.08); }
.msc-att-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
  min-height: 20px;
}
.msc-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 600;
}
.msc-att-chip b { cursor: pointer; color: #f87171; }
.msc-compose-actions { display: flex; gap: 8px; }
.msc-compose-actions .msc-act-btn { width: auto; padding: 0 16px; font-size: 0.75rem; }
.msc-compose-actions .msc-claim-btn { width: auto; flex: 1; margin-bottom: 0; }
.win-msc-compose .win-body { max-height: calc(85vh - 40px); overflow-y: auto; }

/* ═══════════════════════════════════════════════════════════
   RANKINGS — tema oscuro con detalles dorados
   ═══════════════════════════════════════════════════════════ */
.win-ranking { background: linear-gradient(180deg, #131726 0%, #0b0e18 60%); }
.win-ranking .win-header { background: linear-gradient(90deg, #221a08 0%, #3a2c14 40%, #131726 100%); border-bottom: 1px solid rgba(200,170,110,0.45); }
.rk-countdown {
  font-family: 'Consolas', monospace; font-size: 0.72rem; color: #fbbf24;
  background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.35);
  padding: 3px 10px; border-radius: 6px; white-space: nowrap;
}
.rk-tool-btn {
  background: linear-gradient(135deg, #3b2f14, #241d0c); color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.4); border-radius: 6px; cursor: pointer;
  padding: 5px 12px; font-size: 0.74rem; font-weight: bold;
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.rk-tool-btn:hover { background: linear-gradient(135deg, #4a3b18, #2e2510); box-shadow: 0 0 10px rgba(251,191,36,0.35); }
.rk-tool-btn.spinning i { animation: rk-spin 0.9s linear infinite; }
@keyframes rk-spin { to { transform: rotate(360deg); } }

.rk-layout { display: flex; height: 100%; min-height: 0; }
.rk-side {
  width: 200px; min-width: 200px; border-right: 1px solid rgba(200,170,110,0.22);
  display: flex; flex-direction: column; overflow-y: auto; padding: 10px; gap: 6px;
  background: rgba(11,14,24,0.55);
}
.rk-search-box {
  display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(200,170,110,0.3); border-radius: 10px; padding: 6px 10px;
}
.rk-search-box i { color: #64748b; font-size: 0.8rem; }
.rk-search-box input {
  background: transparent; border: none; outline: none; color: #e2e8f0;
  font-size: 0.78rem; width: 100%;
}
.rk-cats { display: flex; flex-direction: column; gap: 4px; }
.rk-cat {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(200,170,110,0.3);
  color: #e2e8f0; border-radius: 10px; padding: 8px 10px; font-size: 0.78rem;
  font-weight: bold; cursor: pointer; text-align: left; transition: all .2s;
  display: flex; align-items: center; gap: 8px;
}
.rk-cat i { color: #fbbf24; }
.rk-cat:hover { border-color: #c8a24e; background: rgba(200,170,110,0.12); }
.rk-cat.active {
  background: linear-gradient(135deg, rgba(200,170,110,0.25), rgba(200,170,110,0.08));
  border-color: #c8a24e; color: #ffe9a8; box-shadow: 0 0 12px rgba(200,170,110,0.25);
}
.rk-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px;
  border-top: 1px dashed rgba(148,163,184,0.15); padding-top: 8px;
}
.rk-tab {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(200,170,110,0.22);
  color: #94a3b8; border-radius: 8px; padding: 5px 6px; font-size: 0.68rem;
  cursor: pointer; transition: all .15s; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rk-tab i { font-size: 0.65rem; margin-right: 3px; }
.rk-tab:hover { color: #f1f5f9; border-color: rgba(200,170,110,0.5); }
.rk-tab.active {
  background: linear-gradient(135deg, rgba(200,170,110,0.22), rgba(200,170,110,0.06));
  border-color: #c8a24e; color: #ffe9a8;
}
.rk-tabs-hint { grid-column: 1 / -1; font-size: 0.72rem; color: #64748b; line-height: 1.5; padding: 4px; }

.rk-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rk-podium {
  display: flex; justify-content: center; align-items: flex-end; gap: 14px;
  padding: 14px 10px 10px; border-bottom: 1px solid rgba(200,170,110,0.15);
  background: radial-gradient(ellipse at 50% 0%, rgba(200,170,110,0.1), transparent 70%);
}
.rk-podium-item {
  position: relative; width: 150px; border-radius: 14px; padding: 12px 8px 10px;
  text-align: center; background: rgba(13,16,26,0.85); border: 1px solid rgba(200,170,110,0.3);
  transition: transform .2s, box-shadow .2s;
}
.rk-podium-item:hover { transform: translateY(-3px); }
.rk-podium-item.gold    { border-color: #fbbf24; box-shadow: 0 0 18px rgba(251,191,36,0.35); order: 1; }
.rk-podium-item.silver  { border-color: #cbd5e1; box-shadow: 0 0 12px rgba(203,213,225,0.25); order: 0; opacity: .95; }
.rk-podium-item.bronze  { border-color: #d97706; box-shadow: 0 0 10px rgba(217,119,6,0.25); order: 2; opacity: .9; }
.rk-podium-first { animation: rk-glow 2.2s ease-in-out infinite; }
@keyframes rk-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(251,191,36,0.35); }
  50%      { box-shadow: 0 0 34px rgba(251,191,36,0.75); }
}
.rk-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.rk-status-badge.rk-online {
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.25);
}
.rk-status-badge.rk-online .rk-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 5px #22c55e;
  animation: rkPulseOnline 1.8s infinite;
}
.rk-status-badge.rk-offline {
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.08);
}
.rk-status-badge.rk-offline .rk-status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #64748b;
}
@keyframes rkPulseOnline {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.5; }
}
.rk-me {
  background: rgba(251,191,36,0.25); color: #fbbf24; font-size: 0.62rem;
  border: 1px solid rgba(251,191,36,0.5); border-radius: 4px; padding: 1px 5px; margin-left: 5px;
}
.rk-crown { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 1.6rem; animation: rk-bounce 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(251,191,36,0.8)); }
@keyframes rk-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
.rk-pod-medal { font-size: 1.3rem; margin-bottom: 4px; }
.rk-pod-avatar, .rk-pod-poke {
  width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%;
  background-size: 256px 256px; background-position: 0 0; image-rendering: pixelated;
  border: 2px solid rgba(200,170,110,0.5);
}
.rk-pod-poke { border-radius: 12px; background-size: 256px 256px; background-position: 0 0; background-repeat: no-repeat; background-color: rgba(15,23,42,0.8); }
.rk-pod-name { font-weight: bold; color: #f8fafc; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod-sub { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }
.rk-pod-clan { font-weight: bold; }
.rk-pod-nocl { color: #64748b; }
.rk-pod-value { margin-top: 5px; color: #fbbf24; font-weight: bold; font-size: 0.8rem; }

.rk-list { flex: 1; overflow-y: auto; padding: 8px 10px; min-height: 0; }
.rk-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
.rk-table thead th {
  position: sticky; top: 0; background: rgba(11,14,24,0.97); color: #fbbf24;
  text-align: left; padding: 7px 8px; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid rgba(200,170,110,0.35); z-index: 2;
}
.rk-table tbody tr {
  border-bottom: 1px solid rgba(200,170,110,0.1); cursor: pointer; transition: background .15s;
}
.rk-table tbody tr:hover { background: rgba(200,170,110,0.07); }
.rk-table tbody tr.rk-me-row { background: rgba(200,170,110,0.12); box-shadow: inset 2px 0 0 #c8a24e; }
.rk-table tbody tr.rk-search-hit { background: rgba(96,165,250,0.15); animation: rk-hit 1.6s ease-in-out 2; }
@keyframes rk-hit { 0%, 100% { background: rgba(96,165,250,0.15); } 50% { background: rgba(96,165,250,0.4); } }
.rk-table td { padding: 6px 8px; color: #cbd5e1; vertical-align: middle; }
.rk-rank { color: #fbbf24; font-weight: bold; white-space: nowrap; }
.rk-avatar-cell { width: 40px; }
/* Avatares de entrenador: muestran el PRIMER sprite de la hoja (mirando hacia abajo) */
.rk-avatar {
  width: 34px; height: 34px; border-radius: 50%; background-size: 136px 136px;
  background-position: 0 0; image-rendering: pixelated;
  border: 1px solid rgba(200,170,110,0.4);
}
.rk-poke-avatar { border-radius: 8px; background-repeat: no-repeat; background-color: rgba(15,23,42,0.8); }
.rk-name { font-weight: bold; color: #f1f5f9; }
.rk-dim { color: #64748b; font-weight: normal; font-size: 0.72rem; }
.rk-lvl { color: #a5f3fc; white-space: nowrap; }
.rk-clan { white-space: nowrap; }
.rk-val { color: #fde68a; font-weight: bold; white-space: nowrap; text-align: right; }
.rk-extra { text-align: right; white-space: nowrap; }
.rk-actions { width: 30px; text-align: right; }
.rk-mini-btn {
  background: transparent; border: none; color: #64748b; cursor: pointer;
  font-size: 0.8rem; opacity: 0; transition: all .15s; padding: 3px;
}
.rk-table tbody tr:hover .rk-mini-btn { opacity: 1; color: #fbbf24; }
.rk-mini-btn:hover { transform: scale(1.2); }
.rk-badge {
  display: inline-block; margin-left: 4px; font-size: 0.72rem; border-radius: 4px; padding: 0 4px;
}
.rk-badge-vip { color: #fbbf24; }
.rk-badge-gp { color: #38bdf8; }
.rk-badge-staff { color: #f87171; }
.rk-badge-shiny { color: #f0abfc; }
.rk-rarity { font-size: 0.66rem; border-radius: 4px; padding: 2px 6px; margin-left: 4px; font-weight: bold; }
.rk-q-comum { background: rgba(148,163,184,0.2); color: #cbd5e1; }
.rk-q-incomum { background: rgba(74,222,128,0.15); color: #4ade80; }
.rk-q-rara { background: rgba(59,130,246,0.18); color: #60a5fa; }
.rk-q-epica { background: rgba(168,85,247,0.18); color: #c084fc; }
.rk-q-lendaria { background: rgba(251,191,36,0.2); color: #fbbf24; }
.rk-q-mitica { background: rgba(239,68,68,0.18); color: #f87171; }
.rk-q-ancestral { background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(239,68,68,0.2)); color: #fde68a; }
.rk-q-divino { background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(251,191,36,0.25)); color: #7dd3fc; }
.rk-me {
  background: rgba(251,191,36,0.25); color: #fbbf24; font-size: 0.62rem;
  border: 1px solid rgba(251,191,36,0.5); border-radius: 4px; padding: 1px 5px; margin-left: 5px;
}
.rk-pos { padding: 8px 12px; }
.rk-pos-card {
  background: linear-gradient(135deg, rgba(200,170,110,0.18), rgba(200,170,110,0.05));
  border: 1px solid rgba(200,170,110,0.5); border-radius: 12px; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px;
}
.rk-pos-title { color: #94a3b8; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.rk-pos-rank { color: #fbbf24; font-size: 1.6rem; font-weight: bold; text-shadow: 0 0 12px rgba(251,191,36,0.5); }
.rk-pos-val { color: #fde68a; font-size: 0.85rem; margin-left: auto; }

.rk-highlights-col { width: 220px; min-width: 220px; border-left: 1px solid rgba(200,170,110,0.2); overflow-y: auto; background: rgba(11,14,24,0.5); }
.rk-highlights { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.rk-hl-title {
  color: #fbbf24; font-weight: bold; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 6px; text-align: center;
}
.rk-hl-row {
  display: flex; flex-direction: column; gap: 2px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(200,170,110,0.2); border-radius: 10px; padding: 7px 10px;
  transition: border-color .15s;
}
.rk-hl-row:hover { border-color: #c8a24e; }
.rk-hl-label { color: #94a3b8; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.4px; }
.rk-hl-val { color: #e2e8f0; font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-hl-val b { color: #fbbf24; }

.rk-error { color: #f87171; font-size: 0.78rem; padding: 16px; text-align: center; }

/* Modal de perfil en ranking */
.rk-profile-backdrop {
  position: fixed; inset: 0; z-index: 13000; display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,23,0.72); backdrop-filter: blur(4px);
}
.rk-profile-card {
  position: relative; width: 460px; max-width: calc(100vw - 40px); max-height: 82vh; overflow-y: auto;
  background: linear-gradient(180deg, #131726 0%, #0b0e18 60%);
  border: 1px solid rgba(200,170,110,0.45); border-radius: 16px; padding: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.7), 0 0 40px rgba(200,170,110,0.15); animation: rk-pop .25s ease-out;
}
@keyframes rk-pop { from { transform: scale(0.92) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.rk-profile-close {
  position: absolute; top: 8px; right: 10px; background: transparent; border: none;
  color: #94a3b8; font-size: 1.3rem; cursor: pointer; transition: color .15s;
}
.rk-profile-close:hover { color: #f87171; }
.rk-pro-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rk-pro-avatar {
  width: 72px; height: 72px; border-radius: 50%; background-size: 288px 288px; background-position: 0 0;
  image-rendering: pixelated; border: 2px solid #fbbf24; box-shadow: 0 0 14px rgba(251,191,36,0.4);
}
.rk-pro-id { flex: 1; min-width: 0; }
.rk-pro-nick { color: #f8fafc; font-weight: bold; font-size: 1.1rem; }
.rk-pro-lvl { color: #a5f3fc; font-size: 0.78rem; margin-top: 2px; }
.rk-pro-clan { font-size: 0.78rem; margin-top: 3px; font-weight: bold; }
.rk-pro-copy {
  background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.4); color: #fbbf24;
  border-radius: 6px; cursor: pointer; padding: 6px 10px; font-size: 0.72rem; font-weight: bold;
  transition: all .15s; white-space: nowrap;
}
.rk-pro-copy:hover { background: rgba(251,191,36,0.3); }
.rk-pro-sec-title { color: #fbbf24; font-weight: bold; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; margin: 12px 0 6px; }
.rk-pro-positions { display: flex; flex-direction: column; gap: 4px; }
.rk-pro-pos-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(200,170,110,0.2);
  border-radius: 10px; padding: 6px 10px; font-size: 0.76rem; color: #cbd5e1;
}
.rk-pro-pos-rank { color: #fde68a; font-weight: bold; }
.rk-pro-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rk-pro-poke {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(200,170,110,0.25);
  border-radius: 12px; padding: 8px; text-align: center;
}
.rk-pro-poke-name { font-size: 0.72rem; color: #f1f5f9; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pro-poke-lvl { font-size: 0.68rem; color: #a5f3fc; margin-top: 2px; }
.rk-pro-poke-power { font-size: 0.68rem; color: #fbbf24; margin-top: 1px; }

.rk-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(15,23,42,0.95); border: 1px solid rgba(251,191,36,0.5); color: #fde68a;
  padding: 10px 18px; border-radius: 10px; font-size: 0.8rem; font-weight: bold;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 14000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.rk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Scrollbar del ranking */
.rk-list::-webkit-scrollbar, .rk-side::-webkit-scrollbar, .rk-highlights-col::-webkit-scrollbar, .rk-profile-card::-webkit-scrollbar { width: 8px; }
.rk-list::-webkit-scrollbar-thumb, .rk-side::-webkit-scrollbar-thumb, .rk-highlights-col::-webkit-scrollbar-thumb, .rk-profile-card::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 4px; }
.rk-list::-webkit-scrollbar-track, .rk-side::-webkit-scrollbar-track, .rk-highlights-col::-webkit-scrollbar-track { background: rgba(15,23,42,0.4); }

/* ══════════════════════════════════════════════════════════════
   CAPTURE MANAGEMENT — Sistema de estadísticas de capturas
   ══════════════════════════════════════════════════════════════ */
.win-captures .win-body { display: flex; }
.cm-layout { display: flex; flex-direction: column; height: 100%; min-height: 0; width: 100%; }

.cm-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid rgba(148,163,184,0.15);
  background: rgba(15,23,42,0.35);
}
.cm-tabs { display: flex; gap: 6px; }
.cm-tab {
  background: rgba(56,189,248,0.08); color: #94a3b8;
  border: 1px solid rgba(56,189,248,0.25); border-radius: 6px;
  padding: 6px 14px; font-size: 0.74rem; font-weight: bold; cursor: pointer;
  transition: all .2s;
}
.cm-tab:hover { background: rgba(56,189,248,0.16); color: #7dd3fc; }
.cm-tab.active {
  background: linear-gradient(135deg, #155e75, #0e3a52); color: #a5f3fc;
  border-color: rgba(56,189,248,0.6); box-shadow: 0 0 10px rgba(56,189,248,0.25);
}
.cm-search-box {
  flex: 1; min-width: 180px; display: flex; align-items: center; gap: 6px;
  background: rgba(15,23,42,0.6); border: 1px solid rgba(148,163,184,0.2);
  border-radius: 6px; padding: 5px 10px; color: #64748b;
}
.cm-search-box input {
  background: transparent; border: none; outline: none; color: #e2e8f0;
  width: 100%; font-size: 0.74rem;
}
.cm-showall {
  display: flex; align-items: center; gap: 6px; color: #94a3b8;
  font-size: 0.7rem; cursor: pointer; user-select: none; white-space: nowrap;
}
.cm-showall input { accent-color: #38bdf8; cursor: pointer; }

.cm-filters {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 12px;
  border-bottom: 1px solid rgba(148,163,184,0.12); background: rgba(15,23,42,0.2);
}
.cm-chip {
  background: rgba(148,163,184,0.08); color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.2); border-radius: 20px;
  padding: 3px 12px; font-size: 0.68rem; cursor: pointer; transition: all .2s;
}
.cm-chip:hover { background: rgba(148,163,184,0.16); color: #cbd5e1; }
.cm-chip.active {
  background: linear-gradient(135deg, #155e75, #0e3a52); color: #a5f3fc;
  border-color: rgba(56,189,248,0.6);
}

.cm-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
.cm-stat-card {
  background: rgba(15,23,42,0.45); border: 1px solid rgba(148,163,184,0.15);
  border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px;
}
.cm-stat-icon { font-size: 1rem; width: 26px; text-align: center; }
.cm-stat-val { font-size: 0.85rem; font-weight: bold; color: #e2e8f0; }
.cm-stat-label { font-size: 0.62rem; color: #64748b; }

/* El scroll real ocurre en .cm-body. Si el wrapper tiene overflow-x:auto,
   también se convierte en contenedor de scroll vertical (spec CSS) y el
   sticky del thead se ancla a él (que nunca scrollea) → la cabecera se
   pierde al bajar. Por eso el scroll horizontal vive en .cm-body. */
.cm-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px; }
.cm-table-wrap { min-width: 100%; }
.cm-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.cm-table thead th {
  position: sticky; top: 0; background: #0f172a; z-index: 2;
  color: #94a3b8; font-weight: bold; text-align: left;
  padding: 6px 8px; border-bottom: 1px solid rgba(148,163,184,0.2);
  white-space: nowrap;
}
.cm-table thead th::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px; background: rgba(148,163,184,0.25);
}
.cm-table thead th.cm-sortable { cursor: pointer; user-select: none; }
.cm-table thead th.cm-sortable:hover { color: #7dd3fc; }
.cm-table thead th.cm-ball-th { text-align: center; min-width: 40px; }
.cm-table tbody tr { border-bottom: 1px solid rgba(148,163,184,0.07); cursor: pointer; transition: background .15s; }
.cm-table tbody tr:hover { background: rgba(56,189,248,0.08); }
.cm-table tbody tr.cm-hard { background: rgba(248,113,113,0.06); }
.cm-table tbody td { padding: 5px 8px; white-space: nowrap; }
.cm-num { text-align: center; color: #94a3b8; font-variant-numeric: tabular-nums; }
.cm-num-on { color: #e2e8f0; font-weight: bold; }
.cm-caught { color: #4ade80; font-weight: bold; }
.cm-date { color: #64748b; }
.cm-sprite-cell { text-align: center; }
.cm-sprite { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; }
.cm-name { color: #e2e8f0; font-weight: 600; }
.cm-badge { margin-left: 4px; font-size: 0.7rem; }
.cm-badge-shiny { color: #fbbf24; }
.cm-badge-leg { color: #f59e0b; }
.cm-badge-myth { color: #a855f7; }
.cm-badge-event { color: #f87171; }
.cm-hard-tag { color: #f87171; font-size: 0.7rem; }
.cm-error {
  padding: 24px; text-align: center; color: #64748b; font-size: 0.78rem;
}
.cm-dim { color: #64748b; font-size: 0.7rem; padding: 6px 0; }

/* Tooltip */
.cm-tooltip {
  position: fixed; z-index: 1200; background: rgba(15,23,42,0.97);
  border: 1px solid rgba(56,189,248,0.35); border-radius: 8px;
  padding: 10px 12px; font-size: 0.7rem; color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6); pointer-events: none; min-width: 230px;
}
.cm-tip-title { color: #7dd3fc; font-weight: bold; font-size: 0.76rem; margin-bottom: 6px; }
.cm-tip-row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.cm-tip-row span { color: #64748b; }
.cm-tip-row b { color: #e2e8f0; }

/* Gráficos */
.cm-charts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(148,163,184,0.12);
  max-height: 240px; overflow-y: auto;
}
.cm-chart-card {
  background: rgba(15,23,42,0.45); border: 1px solid rgba(148,163,184,0.15);
  border-radius: 8px; padding: 10px;
}
.cm-chart-title { font-size: 0.72rem; color: #94a3b8; font-weight: bold; margin-bottom: 8px; }
.cm-chart-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.cm-chart-bar-row.small { font-size: 0.64rem; }
.cm-chart-bar-label { width: 110px; color: #cbd5e1; font-size: 0.66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-chart-bar-track { flex: 1; height: 10px; background: rgba(148,163,184,0.12); border-radius: 5px; overflow: hidden; }
.cm-chart-bar-fill { height: 100%; border-radius: 5px; transition: width .4s; }
.cm-chart-bar-val { width: 78px; text-align: right; color: #94a3b8; font-size: 0.64rem; }
.cm-chart-cols { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.cm-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.cm-chart-col-fill { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; }
.cm-chart-col-val { font-size: 0.56rem; color: #94a3b8; margin-bottom: 2px; }
.cm-chart-col-label { font-size: 0.52rem; color: #64748b; margin-top: 3px; transform: rotate(-45deg); white-space: nowrap; }

/* Historial (modal reutiliza rk-profile-card) */
.cm-hist-card { max-width: 520px; width: 90vw; max-height: 80vh; overflow-y: auto; }
.cm-hist-head {
  font-size: 0.82rem; font-weight: bold; color: #e2e8f0;
  border-bottom: 1px solid rgba(148,163,184,0.15); padding-bottom: 8px; margin-bottom: 10px;
}
.cm-hist-head span { color: #7dd3fc; }
.cm-history-body { display: flex; flex-direction: column; gap: 8px; }
.cm-hist-item {
  background: rgba(15,23,42,0.5); border: 1px solid rgba(148,163,184,0.15);
  border-radius: 8px; padding: 8px 10px;
}
.cm-hist-num { color: #38bdf8; font-weight: bold; font-size: 0.72rem; margin-bottom: 4px; }
.cm-hist-info { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.68rem; color: #cbd5e1; }
.cm-hist-row { display: inline-flex; align-items: center; gap: 4px; }
.cm-hist-date { color: #64748b; margin-left: auto; font-size: 0.62rem; }
.cm-hist-empty { color: #64748b; font-size: 0.74rem; text-align: center; padding: 20px; }

/* Toast */
.cm-toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,0.97); color: #e2e8f0; border: 1px solid rgba(56,189,248,0.4);
  border-radius: 8px; padding: 10px 18px; font-size: 0.76rem; z-index: 1300;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.cm-toast.show { opacity: 1; }

/* Scrollbar */
.cm-body::-webkit-scrollbar, .cm-charts::-webkit-scrollbar, .cm-history-body::-webkit-scrollbar { width: 8px; }

/* Scrollbar del Capture Management */
.cm-body::-webkit-scrollbar-thumb, .cm-charts::-webkit-scrollbar-thumb, .cm-history-body::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.3); border-radius: 4px; }
.cm-body::-webkit-scrollbar-track, .cm-charts::-webkit-scrollbar-track, .cm-history-body::-webkit-scrollbar-track { background: rgba(15,23,42,0.4); }


/* ============ SISTEMA DE NOTICIAS (win-news) ============ */
.win-news .win-body {
  display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: hidden;
}
.news-body { background: linear-gradient(180deg, rgba(15,23,42,0.97), rgba(10,15,28,0.98)); }
.news-hero {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(74,222,128,0.12), rgba(74,222,128,0.03));
  border: 1px solid rgba(74,222,128,0.25); border-radius: 10px;
  padding: 10px 14px; flex-shrink: 0;
}
.news-hero i { font-size: 1.5rem; color: #4ade80; text-shadow: 0 0 12px rgba(74,222,128,0.6); }
.news-hero-txt { display: flex; flex-direction: column; gap: 2px; }
.news-hero-txt strong { color: #e2e8f0; font-size: 0.9rem; letter-spacing: 0.5px; }
.news-hero-txt span { color: #94a3b8; font-size: 0.72rem; }
.news-count { color: #94a3b8; font-size: 0.7rem; font-weight: bold; padding: 2px 8px; background: rgba(255,255,255,0.06); border-radius: 10px; }
.news-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px;
}
.news-list::-webkit-scrollbar { width: 8px; }
.news-list::-webkit-scrollbar-thumb { background: rgba(74,222,128,0.3); border-radius: 4px; }
.news-list::-webkit-scrollbar-track { background: rgba(15,23,42,0.4); }
.news-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 20px; color: #64748b; font-size: 0.8rem; text-align: center;
}
.news-empty i { font-size: 2.2rem; opacity: 0.5; }
.news-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  overflow: hidden; transition: border-color 0.2s, background 0.2s;
}
.news-item:hover { border-color: rgba(74,222,128,0.3); background: rgba(255,255,255,0.05); }
.news-item-latest {
  border-color: rgba(251,191,36,0.35);
  box-shadow: 0 0 0 1px rgba(251,191,36,0.15), 0 4px 18px rgba(251,191,36,0.08);
}
.news-summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  list-style: none; user-select: none;
}
.news-summary::-webkit-details-marker { display: none; }
.news-summary::marker { content: ''; }
.news-date {
  color: #fbbf24; font-size: 0.68rem; font-weight: bold; white-space: nowrap;
  font-family: monospace; background: rgba(251,191,36,0.1); padding: 2px 7px; border-radius: 5px;
}
.news-title { flex: 1; color: #e2e8f0; font-size: 0.82rem; font-weight: 700; line-height: 1.3; }
.news-tag-new      { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.35); }
.news-tag-fix      { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.35); }
.news-tag-improve  { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid rgba(56,189,248,0.35); }
.news-tag-balance  { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.35); }
.news-tag-system   { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.35); }
.news-tag-new, .news-tag-fix, .news-tag-improve, .news-tag-balance, .news-tag-system {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.8px; padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.news-chevron { color: #64748b; font-size: 0.7rem; transition: transform 0.2s; }
.news-item[open] .news-chevron { transform: rotate(180deg); color: #fbbf24; }
.news-changes {
  list-style: none; margin: 0; padding: 4px 14px 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.news-change {
  display: flex; align-items: flex-start; gap: 8px;
  color: #cbd5e1; font-size: 0.76rem; line-height: 1.45;
}
.news-bullet { color: #4ade80; font-size: 0.68rem; margin-top: 3px; flex-shrink: 0; }
.news-item-latest .news-title { background: linear-gradient(90deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
/* Badge de noticia no leída en el botón nav */
.news-nav-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  background: #ef4444; color: #fff; border-radius: 9px;
  font-size: 0.65rem; font-weight: 900; align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 0 10px rgba(239,68,68,0.9); z-index: 25; pointer-events: none;
  border: 1.5px solid #0f172a;
}
.news-btn-attention { animation: news-glow 2s ease-in-out infinite; }
@keyframes news-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(74,222,128,0); }
  50% { box-shadow: 0 0 14px rgba(74,222,128,0.6); }
}
#icon-news { position: relative; }


/* ============ TAMAÑOS DE VENTANAS (DESKTOP) ============ */
#win-quests { top: 50px; left: 120px; width: 1060px; height: 640px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); }
#win-bosses { top: 60px; left: calc(50% - 400px); width: 800px; height: 560px; }
#win-clan { top: calc(50vh - 320px); left: calc(50vw - 460px); width: 920px; height: 640px; }
#win-profession { top: calc(50vh - 350px); left: calc(50vw - 480px); width: 960px; height: 700px; }
#win-breeding { top: calc(50vh - 345px); left: calc(50vw - 490px); width: 980px; height: 690px; }
#win-mazmorras { top: 40px; left: 120px; width: 820px; max-height: 90vh; }
#win-gym-badges { top: 30px; left: 100px; width: 1060px; height: 680px; max-width: calc(100vw - 30px); max-height: calc(100vh - 40px); }
#win-tournament { top: 60px; left: 150px; width: 1060px; height: 600px; max-width: calc(100vw - 40px); }
#win-ranking { top: 60px; left: 140px; width: 1060px; height: 600px; max-width: calc(100vw - 40px); }
#win-captures { top: 60px; left: 140px; width: 1180px; height: 640px; max-width: calc(100vw - 40px); }
#win-marketplace { top: 40px; left: 60px; width: 1280px; height: 760px; max-width: calc(100vw - 30px); max-height: calc(100vh - 40px); }
#win-battlepass { top: 40px; left: 140px; width: 780px; max-height: 85vh; }
#win-msc { top: 70px; left: 200px; width: 920px; height: 560px; max-width: calc(100vw - 40px); }
#win-news { top: 60px; left: 140px; width: 720px; height: 560px; max-width: calc(100vw - 40px); max-height: calc(100vh - 80px); }
#win-daily-gift { top: 50px; left: 140px; width: 840px; height: 620px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); }
#win-hall-of-fame { top: 60px; left: 120px; width: 650px; height: 500px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); }
#win-diamond-shop { width: 860px; height: 680px; min-width: 640px; min-height: 420px; max-width: 96vw; max-height: 92vh; }

/* ============ SISTEMA DE QUESTS & TASKS (win-quests) ============ */
.win-quests .win-body { display: flex; flex-direction: column; gap: 10px; padding: 0; overflow: hidden; }
.quests-body { background: linear-gradient(180deg, rgba(15,23,42,0.97), rgba(10,15,28,0.98)); }
.quests-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 0 12px; flex-shrink: 0; }
.quests-search-box { flex: 1; display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.35); border: 1px solid rgba(251,191,36,0.25); border-radius: 8px; padding: 6px 10px; }
.quests-search-box i { color: #fbbf24; font-size: 0.8rem; }
.quests-search-box input { flex: 1; background: transparent; border: none; outline: none; color: #e2e8f0; font-size: 0.75rem; font-family: inherit; }
.quests-filters { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.quests-sort { background: rgba(0,0,0,0.35); border: 1px solid rgba(251,191,36,0.25); border-radius: 8px; color: #e2e8f0; font-size: 0.72rem; font-weight: 600; padding: 6px 8px; font-family: inherit; outline: none; cursor: pointer; }
.quests-sort:hover, .quests-sort:focus { border-color: rgba(251,191,36,0.5); }
.quests-sort option { background: #0f172a; color: #e2e8f0; }
.quests-countdown { font-size: 0.66rem; color: #94a3b8; font-weight: 700; white-space: nowrap; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 6px 10px; }
.quests-filter-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #94a3b8; border-radius: 6px; padding: 4px 9px; font-size: 0.66rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.quests-filter-btn:hover { border-color: rgba(251,191,36,0.4); color: #fbbf24; }
.quests-filter-btn.active { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.5); color: #fbbf24; }
/* Pestañas de regiones del mundo (Kanto abierta, el resto bloqueadas) */
.quests-regions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px; flex-shrink: 0; }
.quests-region-btn { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #cbd5e1; border-radius: 8px; padding: 6px 12px; font-size: 0.72rem; font-weight: 700; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.quests-region-btn:hover { border-color: rgba(251,191,36,0.4); color: #fbbf24; transform: translateY(-1px); }
.quests-region-btn.active { background: linear-gradient(135deg, rgba(251,191,36,0.22), rgba(245,158,11,0.08)); border-color: rgba(251,191,36,0.6); color: #fbbf24; box-shadow: 0 0 14px rgba(251,191,36,0.22); }
.quests-region-btn.locked { opacity: 0.55; }
.quests-region-btn.locked:hover { opacity: 1; }
.quests-region-locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 60px 20px; text-align: center; color: #94a3b8; }
.quests-region-lock-icon { font-size: 3.4rem; filter: drop-shadow(0 0 18px rgba(251,191,36,0.35)); animation: quests-lock-float 3s ease-in-out infinite; }
@keyframes quests-lock-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.quests-region-locked h3 { margin: 4px 0 0 0; font-size: 1.1rem; color: #f8fafc; letter-spacing: -0.01em; }
.quests-region-locked p { margin: 0; font-size: 0.8rem; line-height: 1.6; }
.quests-region-lock-route { margin-top: 12px; font-size: 0.68rem; font-weight: 800; color: #fbbf24; background: rgba(251,191,36,0.08); border: 1px dashed rgba(251,191,36,0.35); padding: 8px 16px; border-radius: 8px; }
.quests-layout { flex: 1; display: flex; gap: 0; min-height: 0; }
.quests-side { width: 200px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,0.07); padding: 10px 8px; flex-shrink: 0; }
.quests-side::-webkit-scrollbar { width: 6px; }
.quests-side::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 3px; }
.quests-zone { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 0.72rem; color: #cbd5e1; font-weight: 600; transition: all 0.15s; border: 1px solid transparent; }
.quests-zone:hover { background: rgba(255,255,255,0.05); }
.quests-zone.active { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3); color: #fbbf24; }
.quests-zone-claim { border-color: rgba(74,222,128,0.4); animation: quests-zone-glow 1.8s ease-in-out infinite; }
@keyframes quests-zone-glow { 0%,100% { box-shadow: 0 0 0 rgba(74,222,128,0); } 50% { box-shadow: 0 0 10px rgba(74,222,128,0.45); } }
.quests-zone-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quests-zone-pct { font-size: 0.62rem; color: #64748b; font-weight: 800; background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 6px; }
.quests-main { flex: 1; overflow-y: auto; padding: 12px; min-width: 0; }
.quests-main::-webkit-scrollbar { width: 8px; }
.quests-main::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 4px; }
.quests-main::-webkit-scrollbar-track { background: rgba(15,23,42,0.4); }
.quests-list { display: flex; flex-direction: column; gap: 12px; }
.quests-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 50px 20px; color: #64748b; font-size: 0.8rem; text-align: center; }
.quests-empty i { font-size: 2.4rem; opacity: 0.5; }
.quest-card { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.quest-card:hover { border-color: rgba(251,191,36,0.35); transform: translateY(-1px); }
.quest-card-ready { border-color: rgba(74,222,128,0.5); box-shadow: 0 0 0 1px rgba(74,222,128,0.2), 0 0 22px rgba(74,222,128,0.12); animation: quest-card-ready-glow 2s ease-in-out infinite; }
@keyframes quest-card-ready-glow { 0%,100% { box-shadow: 0 0 0 1px rgba(74,222,128,0.2), 0 0 14px rgba(74,222,128,0.08); } 50% { box-shadow: 0 0 0 1px rgba(74,222,128,0.35), 0 0 26px rgba(74,222,128,0.2); } }
.quest-card-claimed { opacity: 0.65; }
.quest-card-locked { opacity: 0.55; }
.quest-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quest-diff-badge { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.4px; padding: 3px 8px; border-radius: 6px; border: 1px solid; }
.quest-zone-tag { font-size: 0.6rem; font-weight: 700; color: #94a3b8; background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 5px; }
.quest-status { margin-left: auto; font-size: 0.66rem; font-weight: 800; color: #94a3b8; }
.quest-status.ready { color: #4ade80; }
.quest-status.claimed { color: #38bdf8; }
.quest-status.locked { color: #ef4444; }
.quest-card-title { font-size: 0.85rem; font-weight: 800; color: #f1f5f9; }
.quest-card-title small { color: #64748b; font-weight: 600; }
.quest-lock-note { font-size: 0.72rem; color: #ef4444; background: rgba(239,68,68,0.08); border: 1px dashed rgba(239,68,68,0.3); padding: 8px 10px; border-radius: 8px; }
.quest-obs { display: flex; flex-direction: column; gap: 7px; }
.quest-obj { display: flex; flex-direction: column; gap: 4px; }
.quest-obj-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; color: #cbd5e1; }
.quest-obj-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; }
.quest-obj-sprite { width: 26px; height: 26px; image-rendering: pixelated; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); padding: 2px; flex: none; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.quest-obj:hover .quest-obj-sprite { transform: scale(1.15); }
.quest-obj-sprite.done { border-color: rgba(74,222,128,0.5); box-shadow: 0 0 8px rgba(74,222,128,0.35); }
.quest-obj-ico { font-size: 0.8rem; flex: none; }
.quest-obj-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quest-obj-count { font-weight: 800; color: #94a3b8; font-family: monospace; }
.quest-obj-count.done { color: #4ade80; }
.quest-bar { height: 6px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.quest-bar-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24); border-radius: 4px; transition: width 0.6s cubic-bezier(0.22,1,0.36,1); box-shadow: 0 0 8px rgba(251,191,36,0.4); }
.quest-total-bar { display: flex; align-items: center; gap: 8px; font-size: 0.66rem; color: #94a3b8; }
.quest-total-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.quest-total-pct { font-weight: 800; color: #fbbf24; font-family: monospace; }
.quest-bar.big { flex: 1; height: 8px; }
.quest-rewards { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.15); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.quest-rewards-title { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: #fbbf24; }
.quest-rewards-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.quest-reward-chip { font-size: 0.66rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.quest-reward-chip.xp { background: rgba(96,165,250,0.14); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.quest-reward-chip.pxp { background: rgba(251,191,36,0.14); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.quest-reward-chip.gold { background: rgba(251,191,36,0.14); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.quest-reward-chip.dia { background: rgba(56,189,248,0.14); color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }
.quest-reward-chip.item { background: rgba(167,139,250,0.14); color: #c084fc; border: 1px solid rgba(167,139,250,0.3); }
.quest-reward-chip.idleball { background: rgba(56,189,248,0.14); color: #22d3ee; border: 1px solid rgba(56,189,248,0.35); text-shadow: 0 0 6px rgba(34,211,238,0.35); }
.quest-card-actions { display: flex; justify-content: flex-end; }
.quest-claim-btn { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1a1205; border: none; border-radius: 8px; padding: 8px 16px; font-size: 0.76rem; font-weight: 800; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 12px rgba(251,191,36,0.4); }
.quest-claim-btn:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 4px 20px rgba(251,191,36,0.6); }
.quest-claim-btn:active { transform: scale(0.97); }
/* Badge de quests reclamables en el botón nav */
.quests-nav-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; background: #4ade80; color: #06250f; border-radius: 8px; font-size: 0.6rem; font-weight: 900; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 0 8px rgba(74,222,128,0.9); }
.quests-btn-attention { animation: quests-btn-glow 2s ease-in-out infinite; }
@keyframes quests-btn-glow { 0%,100% { box-shadow: 0 0 0 rgba(74,222,128,0); } 50% { box-shadow: 0 0 14px rgba(74,222,128,0.65); } }
#icon-quests { position: relative; }
/* Colores de dificultad en borde de tarjeta */
.q-diff-easy { border-left: 3px solid #22c55e; }
.q-diff-normal { border-left: 3px solid #3b82f6; }
.q-diff-hard { border-left: 3px solid #f59e0b; }
.q-diff-epic { border-left: 3px solid #a855f7; }
.q-diff-legendary { border-left: 3px solid #ef4444; }

/* ============ DAILY GIFT (win-daily-gift) ============ */
.win-daily-gift .win-body { padding: 0; overflow: hidden; }
.dg-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px !important; background: linear-gradient(180deg, rgba(15,23,42,0.97), rgba(10,15,28,0.98)); overflow-y: auto; }
.dg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dg-heading { display: flex; flex-direction: column; gap: 6px; }
.dg-title { font-size: 0.78rem; color: #94a3b8; font-weight: 600; }
.dg-progress { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dg-day-counter { font-size: 1.05rem; font-weight: 900; color: #f1f5f9; }
.dg-day-counter b { color: #f472b6; }
.dg-countdown { font-size: 0.72rem; color: #64748b; background: rgba(0,0,0,0.3); border: 1px solid rgba(244,114,182,0.25); border-radius: 8px; padding: 5px 10px; }
.dg-countdown b { color: #f472b6; font-family: monospace; letter-spacing: 1px; }
.dg-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dg-stat-chip { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 700; color: #cbd5e1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 6px 10px; }
.dg-stat-chip b { color: #fbbf24; font-size: 0.8rem; }
.dg-mode-chip { color: #94a3b8; }
.dg-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; flex: 1; min-height: 0; align-content: start; }
.dg-cell { position: relative; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); padding: 8px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s; overflow: hidden; }
.dg-cell:hover { transform: translateY(-2px); }
.dg-cell-day { font-size: 0.6rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.dg-cell-icon { height: 30px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.dg-cell-icons { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; min-height: 30px; max-width: 100%; }
.dg-cell-icons .dg-cell-icon { height: 26px; min-width: 26px; }
.dg-cell-icons .dg-cell-icon img { width: 24px; height: 24px; }
.dg-cell-reward { font-size: 0.58rem; color: #cbd5e1; line-height: 1.2; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-cell-claimed { opacity: 0.55; border-color: rgba(74,222,128,0.2); background: rgba(74,222,128,0.04); }
.dg-cell-claimed .dg-cell-day { color: #4ade80; }
.dg-cell-check { position: absolute; top: 4px; right: 6px; color: #4ade80; font-size: 0.7rem; font-weight: 900; }
.dg-cell-available { border-color: rgba(244,114,182,0.6); background: rgba(244,114,182,0.08); box-shadow: 0 0 12px rgba(244,114,182,0.25); animation: dg-available-pulse 2s ease-in-out infinite; }
.dg-cell-available .dg-cell-day { color: #f472b6; }
@keyframes dg-available-pulse { 0%,100% { box-shadow: 0 0 8px rgba(244,114,182,0.2); } 50% { box-shadow: 0 0 18px rgba(244,114,182,0.5); } }
.dg-cell-locked { opacity: 0.45; }
.dg-cell-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 20%, rgba(244,114,182,0.25), transparent 65%); pointer-events: none; }
.dg-bottom { display: flex; justify-content: center; padding-top: 6px; }
.dg-claim-btn { background: linear-gradient(135deg, #ec4899, #f472b6); color: #1c0813; border: none; border-radius: 10px; padding: 12px 28px; font-size: 0.85rem; font-weight: 900; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 18px rgba(244,114,182,0.4); letter-spacing: 0.4px; }
.dg-claim-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 26px rgba(244,114,182,0.6); }
.dg-claim-btn:active:not(:disabled) { transform: scale(0.97); }
.dg-claim-btn:disabled { background: rgba(255,255,255,0.08); color: #64748b; box-shadow: none; cursor: not-allowed; }
/* Modal de recompensa */
.dg-modal-box { background: linear-gradient(180deg, #1e1b2e, #14121f); border: 1px solid rgba(244,114,182,0.45); border-radius: 16px; padding: 22px 24px; width: min(420px, 92vw); max-height: 80vh; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.7); position: relative; }
.dg-modal-box.dg-pop { animation: dg-pop 0.35s cubic-bezier(0.22,1,0.36,1); }
@keyframes dg-pop { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.dg-modal-title { font-size: 1.15rem; font-weight: 900; color: #f472b6; margin-bottom: 4px; }
.dg-modal-sub { display: flex; justify-content: center; gap: 14px; font-size: 0.7rem; color: #94a3b8; font-weight: 700; margin-bottom: 12px; }
.dg-modal-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dg-modal-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 8px 12px; text-align: left; }
.dg-modal-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.dg-modal-name { font-size: 0.78rem; font-weight: 700; color: #e2e8f0; }
.dg-modal-bonus { background: rgba(251,191,36,0.12); border: 1px dashed rgba(251,191,36,0.5); border-radius: 9px; padding: 8px 12px; font-size: 0.72rem; font-weight: 800; color: #fbbf24; margin-bottom: 4px; }
.dg-modal-ok { background: linear-gradient(135deg, #ec4899, #f472b6); color: #1c0813; border: none; border-radius: 10px; padding: 10px 30px; font-size: 0.82rem; font-weight: 900; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 16px rgba(244,114,182,0.4); }
.dg-modal-ok:hover { transform: translateY(-1px) scale(1.03); }
/* Badge nav del Daily Gift */
.daily-gift-nav-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; background: #f472b6; color: #1c0813; border-radius: 8px; font-size: 0.6rem; font-weight: 900; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 0 8px rgba(244,114,182,0.9); }
.daily-gift-btn-attention { animation: daily-gift-btn-glow 2s ease-in-out infinite; }
@keyframes daily-gift-btn-glow { 0%,100% { box-shadow: 0 0 0 rgba(244,114,182,0); } 50% { box-shadow: 0 0 14px rgba(244,114,182,0.7); } }
#icon-daily-gift { position: relative; }
/* Scrollbar de la ventana */
.win-daily-gift .dg-body::-webkit-scrollbar { width: 8px; }
.win-daily-gift .dg-body::-webkit-scrollbar-thumb { background: rgba(244,114,182,0.3); border-radius: 4px; }

/* ============ SLEEP MODE / OFFLINE FARM ============ */
.off-eff-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.eff-excelente { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.eff-buena { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.eff-regular { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.eff-mala { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.off-history-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}
.off-hist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.off-hist-date { font-size: 0.75rem; color: #94a3b8; font-weight: 600; }
.off-hist-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  font-size: 0.72rem;
  color: #cbd5e1;
}

/* 🔮 ESTILO MORADO OSCURO NEÓN: MOCHILA (#win-pc-box) */
#win-pc-box {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.95), rgba(15, 10, 33, 0.97)) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 85, 247, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  overflow: hidden !important;
}

#win-pc-box .win-header {
  background: linear-gradient(90deg, #1e1b4b, #2e1065) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.35) !important;
  padding: 10px 16px !important;
}

#win-pc-box .win-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#win-pc-box .win-title i {
  color: #c084fc !important;
  filter: drop-shadow(0 0 8px #c084fc) !important;
}

#win-pc-box .win-close-btn {
  color: #94a3b8 !important;
  transition: color 0.2s, transform 0.2s !important;
}
#win-pc-box .win-close-btn:hover {
  color: #c084fc !important;
  transform: scale(1.15) !important;
}

#win-pc-box .pc-box-tabs {
  border-bottom: 1px solid rgba(168, 85, 247, 0.25) !important;
  padding-bottom: 8px !important;
}

#win-pc-box .pc-tab-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

#win-pc-box .pc-tab-btn:hover {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  color: #ffffff !important;
}

#win-pc-box .pc-tab-btn.active {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

#win-pc-box #pc-btn-pokedex {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #c084fc !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
#win-pc-box #pc-btn-pokedex:hover {
  background: rgba(168, 85, 247, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

#win-pc-box .pc-list-container h4 {
  color: #c084fc !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

#win-pc-box .pc-slot {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

#win-pc-box .pc-slot:hover {
  background: rgba(168, 85, 247, 0.14) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3) !important;
  transform: translateY(-2px) !important;
}

#win-pc-box .pc-slot.selected {
  border-color: #c084fc !important;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.3) 0%, rgba(15, 10, 33, 0.2) 100%) !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.5), inset 0 0 15px rgba(168, 85, 247, 0.15) !important;
}

/* Pokémon en el equipo: marco azul brillante + insignia "EQUIPO"/"★ LÍDER" */
#win-pc-box .pc-slot.in-team {
  border-color: rgba(66, 153, 225, 0.95) !important;
  background: linear-gradient(180deg, rgba(66, 153, 225, 0.22) 0%, rgba(66, 153, 225, 0.06) 100%) !important;
  box-shadow: 0 0 14px rgba(66, 153, 225, 0.4), inset 0 0 14px rgba(66, 153, 225, 0.08) !important;
}

.pc-team-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 3;
  background: linear-gradient(135deg, #4299e1, #2b6cb0);
  color: #fff;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.5;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.pc-team-badge.leader {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1e293b;
  text-shadow: none;
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.7), 0 1px 4px rgba(0, 0, 0, 0.4);
}

#win-pc-box #pc-search-input {
  background: rgba(15, 10, 33, 0.6) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  color: #f1f5f9 !important;
  border-radius: 6px !important;
}
#win-pc-box #pc-search-input:focus {
  border-color: #c084fc !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   🔮 DARK PURPLE GLASSMORPHISM: SHARED BASE FOR ALL NAV WINDOWS
   ═══════════════════════════════════════════════════════════════════ */

/* --- Container Shell --- */
#win-profile,
#win-bosses,
#win-clan,
#win-profession,
#win-gym-badges,
#win-hall-of-fame,
#win-pokedex,
#win-pokedex-detail {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.95), rgba(15, 10, 33, 0.97)) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(168, 85, 247, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  overflow: hidden !important;
}

/* --- Header Bar --- */
#win-profile .win-header,
#win-bosses .win-header,
#win-clan .win-header,
#win-profession .win-header,
#win-gym-badges .win-header,
#win-hall-of-fame .win-header {
  background: linear-gradient(90deg, #1e1b4b, #2e1065) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.35) !important;
  padding: 10px 16px !important;
}

/* --- Title Text --- */
#win-profile .win-title,
#win-bosses .win-title,
#win-clan .win-title,
#win-profession .win-title,
#win-gym-badges .win-title,
#win-hall-of-fame .win-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* --- Title Icon Glow --- */
#win-profile .win-title i,
#win-bosses .win-title i,
#win-clan .win-title i,
#win-profession .win-title i,
#win-gym-badges .win-title i,
#win-hall-of-fame .win-title i {
  color: #c084fc !important;
  filter: drop-shadow(0 0 8px #c084fc) !important;
}

/* --- Close Button --- */
#win-profile .win-close-btn,
#win-bosses .win-close-btn,
#win-clan .win-close-btn,
#win-profession .win-close-btn,
#win-gym-badges .win-close-btn,
#win-hall-of-fame .win-close-btn {
  color: #94a3b8 !important;
  transition: color 0.2s, transform 0.2s !important;
}
#win-profile .win-close-btn:hover,
#win-bosses .win-close-btn:hover,
#win-clan .win-close-btn:hover,
#win-profession .win-close-btn:hover,
#win-gym-badges .win-close-btn:hover,
#win-hall-of-fame .win-close-btn:hover {
  color: #c084fc !important;
  transform: scale(1.15) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔮 MI PERSONAJE (#win-profile)
   ═══════════════════════════════════════════════════════════════════ */

#win-profile .profile-row {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.15) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
#win-profile .profile-row:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
#win-profile .profile-row .icon {
  color: #c084fc !important;
  filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.5)) !important;
}
#win-profile .profile-row .label {
  color: #a5b4c8 !important;
}
#win-profile .profile-row .value {
  color: #f1f5f9 !important;
}

#win-profile .profile-divider {
  background: rgba(168, 85, 247, 0.25) !important;
}

#win-profile .profile-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 8px !important;
  color: #e2e8f0 !important;
  transition: all 0.2s ease !important;
}
#win-profile .profile-btn:hover {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25) !important;
}
#win-profile .profile-btn .icon {
  color: #c084fc !important;
}
#win-profile .profile-btn .arrow {
  color: rgba(192, 132, 252, 0.5) !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔮 JEFES LEGENDARIOS (#win-bosses)
   ═══════════════════════════════════════════════════════════════════ */

#win-bosses .bosses-header-desc {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #c4b5d4 !important;
}

#win-bosses .boss-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
  transition: all 0.25s ease !important;
}
#win-bosses .boss-card:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-2px) !important;
}
#win-bosses .boss-card.available {
  border-color: rgba(168, 85, 247, 0.55) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2) !important;
}
#win-bosses .boss-card.available:hover {
  border-color: rgba(192, 132, 252, 0.7) !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.4) !important;
}

#win-bosses .boss-card .boss-sprite {
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.4)) !important;
}
#win-bosses .boss-card .boss-name {
  color: #f1f5f9 !important;
}
#win-bosses .boss-card .boss-level {
  color: #c084fc !important;
}

#win-bosses .boss-status.ready {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
}
#win-bosses .boss-status.cooldown {
  background: rgba(100, 60, 140, 0.2) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(139, 92, 246, 0.25) !important;
}

#win-bosses .boss-card .boss-drops-preview span {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 4px !important;
}

#win-bosses .boss-fight-btn {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border: 1px solid rgba(192, 132, 252, 0.6) !important;
  color: #fff !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}
#win-bosses .boss-fight-btn:hover {
  background: linear-gradient(135deg, #9333ea, #a855f7) !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5) !important;
}
#win-bosses .boss-fight-btn:disabled {
  background: rgba(30, 27, 75, 0.6) !important;
  border-color: rgba(168, 85, 247, 0.15) !important;
  color: #6b5b8a !important;
}

#win-bosses .boss-card .boss-badge-legendary {
  background: linear-gradient(135deg, #a855f7, #7e22ce) !important;
  border: 1px solid #c084fc !important;
  color: #fff !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔮 CLANES (#win-clan)
   ═══════════════════════════════════════════════════════════════════ */

#win-clan .clan-header-desc {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #c4b5d4 !important;
}

#win-clan .clan-header {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
}
#win-clan .clan-header-icon {
  border: 2px solid rgba(192, 132, 252, 0.4) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}
#win-clan .clan-header-name {
  color: #f1f5f9 !important;
}
#win-clan .clan-header-type,
#win-clan .clan-header-title {
  color: #a5b4c8 !important;
}

#win-clan .clan-xp-bar {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
}
#win-clan .clan-xp-fill {
  background: linear-gradient(90deg, #7e22ce, #a855f7) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5) !important;
}

#win-clan .clan-divider {
  background: rgba(168, 85, 247, 0.25) !important;
}

#win-clan .clan-section-title {
  color: #c084fc !important;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.3) !important;
}

#win-clan .clan-mission-row {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.15) !important;
  border-radius: 8px !important;
}
#win-clan .clan-mission-desc {
  color: #e2e8f0 !important;
}
#win-clan .clan-mission-bar {
  background: rgba(168, 85, 247, 0.15) !important;
}
#win-clan .clan-mission-fill {
  background: linear-gradient(90deg, #7e22ce, #a855f7) !important;
}

#win-clan .clan-bonus-active {
  background: rgba(168, 85, 247, 0.1) !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
  border-radius: 10px !important;
}
#win-clan .clan-bonus-pct {
  color: #c084fc !important;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.5) !important;
}

#win-clan .clan-btn-primary {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #fff !important;
}
#win-clan .clan-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #9333ea, #a855f7) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
}
#win-clan .clan-btn-primary:disabled {
  background: rgba(30, 27, 75, 0.6) !important;
  border-color: rgba(168, 85, 247, 0.15) !important;
  color: #6b5b8a !important;
}

#win-clan .clan-btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(168, 85, 247, 0.2) !important;
  color: #d8b4fe !important;
}
#win-clan .clan-btn-secondary:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}

#win-clan .clan-btn-join {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
  color: #d8b4fe !important;
}
#win-clan .clan-btn-join:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}

#win-clan .clan-card-select {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
  transition: all 0.25s ease !important;
}
#win-clan .clan-card-select:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-2px) !important;
}
#win-clan .clan-card-name {
  color: #f1f5f9 !important;
}
#win-clan .clan-card-desc {
  color: #a5b4c8 !important;
}
#win-clan .clan-card-icon {
  border: 2px solid rgba(192, 132, 252, 0.35) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25) !important;
}
#win-clan .clan-mission-empty {
  color: #6b5b8a !important;
}
#win-clan .clan-bonus-preview {
  color: #a5b4c8 !important;
}


/* ═══════════════════════════════════════════════════════════════════
   🔮 PROFESIONES (#win-profession)
   ═══════════════════════════════════════════════════════════════════ */

#win-profession .prof-header-desc {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #c4b5d4 !important;
}

#win-profession .prof-header {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
}
#win-profession .prof-header-icon {
  border: 2px solid rgba(192, 132, 252, 0.4) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}
#win-profession .prof-header-name {
  color: #f1f5f9 !important;
}
#win-profession .prof-header-rank {
  color: #a5b4c8 !important;
}

#win-profession .prof-xp-bar {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
}
#win-profession .prof-xp-fill {
  background: linear-gradient(90deg, #7e22ce, #a855f7) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5) !important;
}

#win-profession .prof-divider {
  background: rgba(168, 85, 247, 0.25) !important;
}

#win-profession .prof-section-title {
  color: #c084fc !important;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.3) !important;
}

#win-profession .prof-bonus-row {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.15) !important;
  border-radius: 8px !important;
}

#win-profession .prof-mission-row {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.15) !important;
  border-radius: 8px !important;
}
#win-profession .prof-mission-desc {
  color: #e2e8f0 !important;
}
#win-profession .prof-mission-count {
  color: #a5b4c8 !important;
}
#win-profession .prof-mission-bar {
  background: rgba(168, 85, 247, 0.15) !important;
}
#win-profession .prof-mission-fill {
  background: linear-gradient(90deg, #7e22ce, #a855f7) !important;
}
#win-profession .prof-mission-empty {
  color: #6b5b8a !important;
}

#win-profession .prof-btn-primary {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #fff !important;
}
#win-profession .prof-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #9333ea, #a855f7) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
}
#win-profession .prof-btn-primary:disabled {
  background: rgba(30, 27, 75, 0.6) !important;
  border-color: rgba(168, 85, 247, 0.15) !important;
  color: #6b5b8a !important;
}

#win-profession .prof-btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(168, 85, 247, 0.2) !important;
  color: #d8b4fe !important;
}
#win-profession .prof-btn-secondary:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}

#win-profession .prof-btn-sm {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  color: #c084fc !important;
}
#win-profession .prof-btn-sm:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3) !important;
}

#win-profession .prof-btn-choose {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
  color: #d8b4fe !important;
}
#win-profession .prof-btn-choose:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3) !important;
}

#win-profession .prof-card-select {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
  transition: all 0.25s ease !important;
}
#win-profession .prof-card-select:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-2px) !important;
}
#win-profession .prof-card-icon {
  border: 2px solid rgba(192, 132, 252, 0.35) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25) !important;
}
#win-profession .prof-card-name {
  color: #f1f5f9 !important;
}
#win-profession .prof-card-desc {
  color: #a5b4c8 !important;
}

#win-profession .prof-album-entry {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.15) !important;
  border-radius: 8px !important;
}
#win-profession .prof-album-info {
  color: #c4b5d4 !important;
}
#win-profession .prof-album-info strong {
  color: #c084fc !important;
}

/* ═══════════════════════════════════════════════════════════════════
   🔮 ESTILO MORADO OSCURO NEÓN: POKÉDEX (#win-pokedex & #win-pokedex-detail)
   Mismo estilo estético de Mochila (#win-pc-box) y Turn ON / OFF (Auto-Helper)
   ═══════════════════════════════════════════════════════════════════ */

#win-pokedex .win-header,
#win-pokedex-detail .win-header,
#win-pokedex-detail .pkd-win-header {
  background: linear-gradient(90deg, #1e1b4b, #2e1065) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.35) !important;
  padding: 10px 16px !important;
}

#win-pokedex .win-title,
#win-pokedex-detail .win-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#win-pokedex .win-title i,
#win-pokedex-detail .win-title i {
  color: #c084fc !important;
  filter: drop-shadow(0 0 8px #c084fc) !important;
}

#win-pokedex .win-close-btn,
#win-pokedex-detail .win-close-btn {
  color: #94a3b8 !important;
  transition: color 0.2s, transform 0.2s !important;
}
#win-pokedex .win-close-btn:hover,
#win-pokedex-detail .win-close-btn:hover {
  color: #c084fc !important;
  transform: scale(1.15) !important;
}

/* Completion Badge */
#win-pokedex #dex-completion-badge {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border: 1px solid rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  padding: 2px 9px !important;
  font-size: 0.65rem !important;
}

/* Top Bar Stats & Progress */
#win-pokedex .pokedex-top-bar {
  background: rgba(15, 10, 33, 0.6) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2) !important;
  padding: 10px 16px !important;
  gap: 12px !important;
}

#win-pokedex .pokedex-stat-box {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  border-radius: 8px !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}
#win-pokedex .pokedex-stat-box strong {
  color: #c084fc !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
}
#win-pokedex .pokedex-stat-box.caught-box strong {
  color: #4ade80 !important;
}

#win-pokedex .pokedex-progress-container {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  border-radius: 6px !important;
  height: 8px !important;
}

#win-pokedex .pokedex-progress-bar {
  background: linear-gradient(90deg, #7e22ce, #a855f7, #c084fc) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6) !important;
  border-radius: 5px !important;
}

/* Controls: Search & Type Filter */
#win-pokedex .pokedex-controls {
  background: rgba(15, 10, 33, 0.4) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2) !important;
  padding: 10px 16px !important;
  gap: 10px !important;
}

#win-pokedex .pokedex-search-box {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  transition: all 0.2s ease !important;
}
#win-pokedex .pokedex-search-box:focus-within {
  border-color: #c084fc !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}
#win-pokedex .pokedex-search-box i {
  color: #c084fc !important;
}
#win-pokedex .pokedex-search-box input {
  color: #f8fafc !important;
}
#win-pokedex .pokedex-search-box input::placeholder {
  color: #64748b !important;
}

#win-pokedex .dex-type-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 4px 11px !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
#win-pokedex .dex-type-btn:hover {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
  color: #ffffff !important;
}
#win-pokedex .dex-type-btn.active {
  background: linear-gradient(135deg, #7e22ce, #9333ea) !important;
  border-color: rgba(192, 132, 252, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

/* Slots de Pokémon (Grilla) */
#win-pokedex .pokedex-list-scroll {
  padding: 14px 16px !important;
}

#win-pokedex .dex-slot {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#win-pokedex .dex-slot:hover {
  background: rgba(168, 85, 247, 0.14) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3) !important;
  transform: translateY(-2px) !important;
}

#win-pokedex .dex-slot.caught {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.25) 0%, rgba(15, 10, 33, 0.45) 100%) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
#win-pokedex .dex-slot.caught:hover {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: #c084fc !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45) !important;
  transform: translateY(-3px) !important;
}
#win-pokedex .dex-slot.caught .dex-num {
  color: #c084fc !important;
  font-weight: 800 !important;
}
#win-pokedex .dex-slot.caught .dex-name {
  color: #f8fafc !important;
  font-weight: 700 !important;
}

#win-pokedex .dex-slot.seen {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(148, 163, 184, 0.15) !important;
}
#win-pokedex .dex-slot.seen:hover {
  background: rgba(168, 85, 247, 0.1) !important;
  border-color: rgba(192, 132, 252, 0.3) !important;
  transform: translateY(-2px) !important;
}

#win-pokedex .dex-slot.locked {
  background: rgba(0, 0, 0, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
  opacity: 0.35 !important;
}

#win-pokedex .dex-pokeball-dot {
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.8), 0 0 3px rgba(239, 68, 68, 0.5) !important;
}

/* Ficha Detallada (#win-pokedex-detail) */
#win-pokedex-detail .pkd-back-btn {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #c084fc !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
#win-pokedex-detail .pkd-back-btn:hover {
  background: rgba(168, 85, 247, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
  transform: scale(1.05) !important;
}

#win-pokedex-detail .pkd-section {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  margin-bottom: 12px !important;
}

#win-pokedex-detail .pkd-section-title {
  color: #c084fc !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2) !important;
  padding-bottom: 6px !important;
  margin-bottom: 10px !important;
}

#win-pokedex-detail .pkd-stat-bar-bg {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  border-radius: 6px !important;
}

#win-pokedex-detail .pkd-info-item {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(168, 85, 247, 0.18) !important;
  border-radius: 8px !important;
}



/* ═══════════ ANIMACIÓN DE NACIMIENTO (CRIANZA) ═══════════ */
#hatch-overlay.hatch-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 17, 0.82);
  backdrop-filter: blur(6px);
  animation: hatch-fadein 0.35s ease-out both;
  font-family: 'Cinzel', serif;
}
@keyframes hatch-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hatch-card {
  width: min(420px, 92vw);
  background: linear-gradient(180deg, #101527, #0a0e1c);
  border: 2px solid rgba(251, 191, 36, 0.55);
  border-radius: 18px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.25), 0 24px 60px rgba(0,0,0,0.85);
  animation: hatch-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes hatch-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.hatch-stage {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.hatch-egg-wrap {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.hatch-egg {
  font-size: 84px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.6));
  animation: hatch-shake 0.5s ease-in-out infinite;
}
@keyframes hatch-shake {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  20%      { transform: rotate(-8deg) translateX(-4px); }
  40%      { transform: rotate(8deg) translateX(4px); }
  60%      { transform: rotate(-6deg) translateX(-3px); }
  80%      { transform: rotate(6deg) translateX(3px); }
}
.hatch-egg-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.35) 0%, transparent 70%);
  animation: hatch-pulse 1.1s ease-in-out infinite;
}
@keyframes hatch-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50%      { transform: scale(1.15); opacity: 1; }
}
.hatch-sprite {
  display: none;
  width: 110px;
  height: 110px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.85));
  animation: hatch-rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes hatch-rise {
  0%   { transform: translateY(34px) scale(0.3); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.hatch-broken .hatch-egg-wrap { opacity: 0; transform: scale(0.5); }
.hatch-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fef08a;
  text-shadow: 0 0 14px rgba(251,191,36,0.8);
  margin-bottom: 4px;
}
.hatch-shiny-tag {
  display: inline-block;
  margin: 4px auto;
  padding: 3px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e1b0a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: 0 0 18px rgba(251,191,36,0.7);
  animation: hatch-shiny-blink 1s ease-in-out infinite;
}
@keyframes hatch-shiny-blink {
  0%, 100% { box-shadow: 0 0 8px rgba(251,191,36,0.5); }
  50%      { box-shadow: 0 0 26px rgba(251,191,36,1); }
}
.hatch-name {
  font-size: 26px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,0.6);
  margin: 2px 0 10px;
}
.hatch-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hatch-badge {
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  color: #cbd5e1;
  background: rgba(255,255,255,0.05);
}
.hatch-badge-pot { border-color: #c084fc; color: #d8b4fe; }
.hatch-note {
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
}
.hatch-btn {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #1e1b0a;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border: none;
  border-radius: 10px;
  padding: 11px 34px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(251,191,36,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hatch-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 30px rgba(251,191,36,0.65);
}

/* ─── STARTER MODAL: botones activos durante la creación de cuenta ──
   El modal de inicio (z-index 10000) tapaba el menú superior (z-100), la
   barra de rutas (z-99) y las ventanas (z-200): los botones se veían
   difuminados detrás del overlay pero NO se podían pulsar. Mientras el
   modal está abierto, el jugador puede abrir Clanes, Profesiones, la Ruta 1
   y las ventanas encima del overlay (los handlers ya existen; solo faltaba
   el stacking). Al elegir el inicial (display:none) todo vuelve a la normalidad. */
#starter-modal[style*="display: flex"] ~ .client-container .top-menu,
#starter-modal[style*="display: flex"] ~ .client-container #quick-route-bar {
  z-index: 10001 !important;
}
#starter-modal[style*="display: flex"] ~ .client-container .tibia-window {
  z-index: 10002 !important;
}

/* ─── CREACIÓN DE CUENTA: Clanes y Profesiones "se prenden" con badge "1" ──
   Mientras el modal de inicio está abierto, los botones de Clanes y Profesiones
   brillan en verde y muestran un badge "1" para indicar al jugador que puede
   pulsarlos y unirse. Al elegir el inicial (display:none) el badge desaparece. */
#starter-modal[style*="display: flex"] ~ .client-container #icon-clan,
#starter-modal[style*="display: flex"] ~ .client-container #icon-profession {
  border-color: #4ade80;
  animation: bp-nav-glow 1.4s ease-in-out infinite;
}
#starter-modal[style*="display: flex"] ~ .client-container #icon-clan::after,
#starter-modal[style*="display: flex"] ~ .client-container #icon-profession::after {
  content: "1";
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 3;
}

/* ── Torneos PvP ─────────────────────────────────────────────── */
.tn-card {
  background: linear-gradient(180deg, rgba(19,23,38,0.9) 0%, rgba(11,14,24,0.9) 100%);
  border: 1px solid rgba(200,170,110,0.35);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.78rem;
}
.tn-card-title {
  font-weight: 800; color: #fbbf24; letter-spacing: 0.4px; margin-bottom: 8px;
  font-size: 0.8rem;
}
.tn-card-line { color: #cbd5e1; margin: 5px 0; line-height: 1.5; }
.tn-btn {
  display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.4); background: rgba(51,65,85,0.35); color: #e2e8f0;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all .15s;
}
.tn-btn:hover { background: rgba(71,85,105,0.5); }
.tn-btn-green { border-color: rgba(74,222,128,0.5); color: #4ade80; }
.tn-btn-green:hover { background: rgba(74,222,128,0.12); }
.tn-btn-danger { border-color: rgba(248,113,113,0.5); color: #f87171; }
.tn-btn-danger:hover { background: rgba(248,113,113,0.12); }
.tn-round {
  background: rgba(15,23,42,0.55); border: 1px solid rgba(148,163,184,0.2); border-radius: 10px;
  padding: 8px; min-width: 200px;
}
.tn-round-title {
  font-size: 0.72rem; font-weight: 800; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.5px; text-align: center; margin-bottom: 8px;
}
.tn-match {
  background: rgba(2,6,23,0.6); border: 1px solid rgba(148,163,184,0.25); border-radius: 8px;
  padding: 6px 8px; margin-bottom: 8px;
}
.tn-my-match { border-color: rgba(244,114,182,0.55); box-shadow: 0 0 10px rgba(244,114,182,0.15); }
.tn-team {
  padding: 3px 6px; border-radius: 6px; color: #e2e8f0; font-size: 0.74rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tn-me { color: #f472b6; font-weight: 800; }
.tn-winner { color: #fbbf24; font-weight: 800; }
.tn-loser { color: #64748b; text-decoration: line-through; }
.tn-match-status { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Media Queries para móvil / tablet
   Reemplaza todas las reglas html.ui-layout-mobile anteriores.
   Desktop (≥ 769px): SIN CAMBIOS. El diseño se mantiene intacto.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Touch helpers (se mantienen: no dependen de ancho de pantalla) ── */
html.touch-device button,
html.touch-device a,
html.touch-device [role="button"],
html.touch-device .nav-icon-btn,
html.touch-device .settings-btn-option {
  touch-action: manipulation;
}
html.touch-device body,
html.touch-device .client-container {
  -webkit-touch-callout: none;
}
html.touch-device #game-container,
html.touch-device .game-canvas-wrap {
  user-select: none;
  -webkit-user-select: none;
}
html.device-mobile body,
html.device-mobile #game-container,
html.device-mobile .game-canvas-wrap {
  width: 100%;
  height: 100dvh;
}
html.device-mobile body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════
   JOYSTICK VIRTUAL — visible solo en dispositivos táctiles
   ═══════════════════════════════════════════════════════════════════════ */
#touch-joystick {
  position: fixed;
  left: 14px;
  bottom: 96px;
  width: 150px;
  height: 150px;
  z-index: 95;
  display: none;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}
#touch-joystick-base {
  position: absolute;
  left: 11px;
  bottom: 11px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.14), rgba(0,0,0,0.35));
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 0 14px rgba(0,0,0,0.45), inset 0 0 12px rgba(0,0,0,0.35);
}
#touch-joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.85), rgba(148,163,184,0.75));
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  transition: transform 0.05s linear;
  pointer-events: none;
}
#touch-joystick-base.active {
  border-color: rgba(251,191,36,0.85);
  box-shadow: 0 0 18px rgba(251,191,36,0.35), inset 0 0 12px rgba(0,0,0,0.35);
}

/* ═══════════════════════════════════════════════════════════════════════
   BOTÓN FLotante de CHAT
   ═══════════════════════════════════════════════════════════════════════ */
#mobile-chat-btn {
  position: fixed;
  right: 12px;
  bottom: calc(215px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  z-index: 96;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.92), rgba(139,92,246,0.92));
  border: 2px solid rgba(255,255,255,0.35);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.1);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   PANTALLA "GIRA TU TELÉFONO" (se mantiene sin cambios)
   ═══════════════════════════════════════════════════════════════════════ */
#rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10, 20, 40, 0.97) 0%, rgba(4, 9, 22, 0.99) 75%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
#rotate-overlay .rotate-card {
  text-align: center;
  max-width: min(340px, 88vw);
  padding: 30px 26px 26px;
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  background: rgba(15, 28, 52, 0.88);
  box-shadow: 0 0 46px rgba(56, 189, 248, 0.28), inset 0 0 26px rgba(56, 189, 248, 0.07);
}
#rotate-overlay .rotate-phone {
  font-size: 62px;
  line-height: 1;
  color: #38bdf8;
  display: inline-block;
  animation: rotate-phone-hint 1.7s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.65));
}
@keyframes rotate-phone-hint {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(-90deg); }
  62%  { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
#rotate-overlay h2 {
  margin: 18px 0 8px;
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
#rotate-overlay p {
  margin: 0 0 20px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}
#rotate-overlay #rotate-continue-btn {
  padding: 11px 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
#rotate-overlay #rotate-continue-btn:hover,
#rotate-overlay #rotate-continue-btn:active {
  background: rgba(51, 65, 85, 0.85);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════
   .device-mobile — Responsive para CELULARES (landscape + portrait)
   
   Usa clase CSS en <html> (detectada por deviceDetect.js) en vez de
   media queries de ancho. Así funciona SIEMPRE en celulares, tanto
   en landscape (ancho ~844px) como en portrait (ancho ~390px).
   
   La classe .device-mobile se pone SOLO en teléfonos, NO en tablets ni PC.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── UTILIDAD: espacio disponible = viewport - barras ── */
.device-mobile {
  --mob-top: 64px;
  --mob-avail-h: calc(100dvh - var(--mob-top) - var(--bottom-bar-height) - 12px);
}

/* ─────────────────────────────────────────────────────────────────────
   BARRAS DE NAVEGACIÓN
   ───────────────────────────────────────────────────────────────────── */
.device-mobile .top-menu {
  top: max(2px, env(safe-area-inset-top)) !important;
  max-width: calc(100% - 4px) !important;
  height: 32px !important;
  border-radius: 8px;
}
.device-mobile .nav-icons {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  gap: 2px;
}
.device-mobile .nav-icons::-webkit-scrollbar { display: none; }
.device-mobile .nav-icon-btn {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  flex-shrink: 0;
  font-size: 0.75rem;
}
.device-mobile #quick-route-bar {
  top: max(36px, calc(env(safe-area-inset-top) + 34px)) !important;
  max-width: calc(100% - 4px) !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.device-mobile #quick-route-bar button {
  font-size: 0.65rem !important;
  padding: 3px 6px !important;
  min-height: 24px !important;
}
.device-mobile #quick-route-bar::-webkit-scrollbar { display: none; }

/* ── BARRA INFERIOR: SIEMPRE ENCIMA ── */
.device-mobile #quick-hub-bar {
  position: fixed !important;
  bottom: max(8px, env(safe-area-inset-bottom)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: calc(100% - 12px) !important;
  gap: 4px !important;
  padding: 4px 8px !important;
  z-index: 999 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.device-mobile #quick-hub-bar button {
  font-size: 0.65rem;
  padding: 5px 8px;
  flex-shrink: 0;
  min-height: 32px;
}
.device-mobile .top-menu,
.device-mobile #quick-route-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ─────────────────────────────────────────────────────────────────────
   TOUCH: todos los botones listos para tocar
   ───────────────────────────────────────────────────────────────────── */
.device-mobile button,
.device-mobile a,
.device-mobile [role="button"],
.device-mobile .nav-icon-btn,
.device-mobile .settings-btn-option {
  touch-action: manipulation;
}

/* ─────────────────────────────────────────────────────────────────────
   TODAS LAS VENTANAS: base común
   ───────────────────────────────────────────────────────────────────── */
.device-mobile .tibia-window {
  animation: none !important;
  opacity: 1 !important;
  contain: none !important;
  pointer-events: auto !important;
  overscroll-behavior: contain;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  max-height: var(--mob-avail-h) !important;
}

/* ── CABECERAS: touch-friendly ── */
.device-mobile .win-header {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  pointer-events: auto !important;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  z-index: 1 !important;
}

/* ── Contenido interno: scroll ── */
.device-mobile .tibia-window .win-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  min-height: 0 !important;
}

/* ─────────────────────────────────────────────────────────────────────
   VENTANAS GRANDES: tamaño adaptivo
   (Misma lista que las reglas desktop, pero con sizing responsive)
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #win-quests,
.device-mobile #win-bosses,
.device-mobile #win-clan,
.device-mobile #win-profession,
.device-mobile #win-breeding,
.device-mobile #win-gym-badges,
.device-mobile #win-ranking,
.device-mobile #win-tournament,
.device-mobile #win-captures,
.device-mobile #win-marketplace,
.device-mobile #win-streak,
.device-mobile #win-pc-box,
.device-mobile #win-daily-gift,
.device-mobile #win-msc,
.device-mobile #win-battlepass,
.device-mobile #win-mazmorras,
.device-mobile #win-diamond-shop,
.device-mobile #win-news,
.device-mobile #win-hall-of-fame,
.device-mobile #win-pokedex,
.device-mobile #win-skin-selector,
.device-mobile #win-settings,
.device-mobile #win-profile,
.device-mobile #win-referral {
  position: fixed !important;
  width: min(94vw, 420px) !important;
  height: auto !important;
  max-width: calc(100dvw - 16px) !important;
  max-height: var(--mob-avail-h) !important;
  top: 50px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  transform-origin: center top !important;
  overflow: hidden !important;
  z-index: 105 !important;
}

/* ─────────────────────────────────────────────────────────────────────
   VENTANA DE EQUIPO: mini panel lateral derecho
   ───────────────────────────────────────────────────────────────────── */
.device-mobile .win-team {
  display: block !important;
  position: fixed !important;
  top: 42px !important;
  right: 4px !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 180px !important;
  height: calc(100dvh - 42px - var(--bottom-bar-height) - 12px) !important;
  max-height: calc(100dvh - 42px - var(--bottom-bar-height) - 12px) !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: rgba(8,12,18,0.95) !important;
  border: 1px solid rgba(168,85,247,0.3) !important;
  border-radius: 8px !important;
  z-index: 90 !important;
}
.device-mobile .win-team .win-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 !important;
  min-height: 0 !important;
}
.device-mobile .win-team .team-widget-header {
  padding: 3px 6px !important;
  font-size: 0.6rem !important;
}
.device-mobile .win-team .team-widget-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 4px !important;
}
.device-mobile .win-team .team-slot {
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px !important;
}
.device-mobile .win-team .team-slot-sprite {
  width: 28px !important;
  height: 28px !important;
}

/* ── Team detail ── */
.device-mobile .win-team-detail {
  width: calc(100vw - 20px) !important;
  max-width: 380px !important;
  overflow-y: auto !important;
}

/* ─────────────────────────────────────────────────────────────────────
   CHAT: oculto por defecto, se abre con ENTER / botón
   ───────────────────────────────────────────────────────────────────── */
.device-mobile .win-chat { display: none; }

/* ─────────────────────────────────────────────────────────────────────
   CAPTURAS: altura definite para flex
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #win-captures {
  height: var(--mob-avail-h) !important;
  max-height: var(--mob-avail-h) !important;
}
.device-mobile .win-captures .win-body {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important;
}
.device-mobile .win-captures .cm-layout {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.device-mobile .win-captures .cm-body {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* ── Captura wild: compacta ── */
.device-mobile .win-capture {
  right: 8px !important;
  left: auto !important;
  margin-left: 0 !important;
  width: 280px !important;
  max-width: calc(100dvw - 16px) !important;
}
.device-mobile #win-capture-wilds-list { max-height: 80px !important; }
.device-mobile .capture-wild-card { height: 26px; min-height: 26px; padding: 2px 6px; font-size: 0.68rem; }
.device-mobile .capture-body { padding: 6px !important; gap: 6px; }
.device-mobile .win-capture .capture-win-header { padding: 3px 8px; }
.device-mobile .win-capture .capture-win-header .win-title { font-size: 0.7rem; }
.device-mobile .win-capture .capture-shop-btn { padding: 2px 6px; font-size: 0.68rem; }
.device-mobile .win-capture .ball-selector-row { margin-bottom: 6px; padding: 3px; gap: 4px; }
.device-mobile .win-capture .ball-option { height: 34px; }
.device-mobile .win-capture .ball-option img { width: 18px; height: 18px; }

/* ─────────────────────────────────────────────────────────────────────
   QUESTS: altura definite para que flex interno + scroll funcionen
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #win-quests {
  height: var(--mob-avail-h) !important;
  max-height: var(--mob-avail-h) !important;
}
.device-mobile #win-quests .win-body {
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.device-mobile .quests-layout {
  flex-direction: column !important;
  gap: 0 !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  min-width: 0 !important;
}
.device-mobile .quests-side {
  width: 100% !important;
  flex-shrink: 0 !important;
  max-height: 44px !important;
  overflow-y: auto !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  padding: 3px 4px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
}
.device-mobile .quests-zone { padding: 2px 5px !important; font-size: 0.5rem !important; border-radius: 4px !important; flex: 0 0 auto !important; }
.device-mobile .quests-zone-label { max-width: 60px !important; font-size: 0.46rem !important; }
.device-mobile .quests-toolbar { padding: 3px 4px !important; gap: 3px !important; }
.device-mobile .quests-search-box { padding: 2px 5px !important; gap: 3px !important; }
.device-mobile .quests-search-box input { font-size: 0.55rem !important; }
.device-mobile .quests-sort { font-size: 0.5rem !important; padding: 3px 5px !important; }
.device-mobile .quests-countdown { font-size: 0.48rem !important; padding: 2px 5px !important; }
.device-mobile .quests-main { padding: 3px !important; overflow-x: hidden !important; overflow-y: auto !important; min-width: 0 !important; flex: 1 !important; min-height: 0 !important; }
.device-mobile .quests-list { gap: 4px !important; min-width: 0 !important; }

/* Quest cards: ultra compactos */
.device-mobile .quest-card { padding: 5px 7px !important; gap: 4px !important; border-radius: 8px !important; overflow: hidden !important; min-width: 0 !important; }
.device-mobile .quest-card-head { gap: 4px !important; flex-wrap: wrap !important; }
.device-mobile .quest-card-title { font-size: 0.62rem !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; max-width: 100% !important; }
.device-mobile .quest-diff-badge { font-size: 0.5rem !important; padding: 1px 5px !important; }
.device-mobile .quest-zone-tag { font-size: 0.48rem !important; padding: 1px 4px !important; }
.device-mobile .quest-status { font-size: 0.52rem !important; }
.device-mobile .quest-obs { gap: 3px !important; }
.device-mobile .quest-obj { gap: 2px !important; }
.device-mobile .quest-obj-row { font-size: 0.52rem !important; min-width: 0 !important; overflow: hidden !important; }
.device-mobile .quest-obj-name { gap: 3px !important; min-width: 0 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.device-mobile .quest-obj-sprite { width: 16px; height: 16px; border-radius: 4px; padding: 1px; }
.device-mobile .quest-bar { height: 4px !important; }
.device-mobile .quest-total-bar { font-size: 0.5rem !important; gap: 4px !important; }
.device-mobile .quest-rewards { padding: 4px 6px !important; gap: 3px !important; border-radius: 6px !important; min-width: 0 !important; overflow: hidden !important; }
.device-mobile .quest-rewards-chips { flex-wrap: wrap !important; min-width: 0 !important; }
.device-mobile .quest-rewards-title { font-size: 0.48rem !important; }
.device-mobile .quest-reward-chip { font-size: 0.5rem !important; padding: 2px 5px !important; border-radius: 4px !important; }
.device-mobile .quest-claim-btn { padding: 4px 8px !important; font-size: 0.55rem !important; border-radius: 6px !important; }
.device-mobile .quest-lock-note { font-size: 0.52rem !important; padding: 4px 6px !important; }

/* ─────────────────────────────────────────────────────────────────────
   BOSSES: cards compactos
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #win-bosses .boss-card .boss-sprite { width: 36px; height: 36px; }
.device-mobile #win-bosses .boss-card .boss-name { font-size: 0.58rem; }
.device-mobile #win-bosses .boss-card .boss-level { font-size: 0.5rem; }
.device-mobile #win-bosses .boss-card .boss-status { font-size: 0.48rem; }
.device-mobile #win-bosses .boss-card .boss-drops-preview { font-size: 0.45rem; }
.device-mobile #win-bosses .bosses-header-desc { font-size: 0.55rem; padding: 4px; }
.device-mobile #win-bosses .bosses-tabs button { font-size: 0.5rem; padding: 3px 6px; }

/* ─────────────────────────────────────────────────────────────────────
   CLAN, PROFESIONES, BREEDING, GYM: fuente reducida
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #win-clan,
.device-mobile #win-profession,
.device-mobile #win-breeding,
.device-mobile #win-gym-badges {
  font-size: 0.65rem;
}

/* ── PC BOX MOBILE ── */
.device-mobile #win-pc-box .pc-box-tabs {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 4px !important;
  padding-bottom: 4px !important;
}
.device-mobile #win-pc-box .pc-tab-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.65rem !important;
  padding: 4px 8px !important;
}
.device-mobile #win-pc-box .pc-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
}
.device-mobile #win-pc-box .pc-slot {
  height: 52px !important;
}
.device-mobile #win-pc-box .pc-slot img {
  width: 28px !important;
  height: 28px !important;
}
.device-mobile #win-pc-box #pc-search-input {
  font-size: 0.7rem !important;
  padding: 4px 8px !important;
}

/* ── POKÉDEX MOBILE ── */
.device-mobile #win-pokedex .pokedex-grid-7col {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
}
.device-mobile #win-pokedex .dex-slot {
  padding: 4px 2px !important;
  min-height: 54px !important;
}
.device-mobile #win-pokedex .dex-slot img {
  width: 32px !important;
  height: 32px !important;
}
.device-mobile #win-pokedex .pokedex-top-cards {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 4px !important;
}

/* ── SHOP NORMAL MOBILE ── */
.device-mobile #win-shop,
.device-mobile .win-shop {
  width: min(94vw, 420px) !important;
}
.device-mobile .market-shop-item,
.device-mobile .shop-item-row {
  padding: 6px 8px !important;
  gap: 8px !important;
}
.device-mobile .market-shop-item img,
.device-mobile .shop-item-row img {
  width: 28px !important;
  height: 28px !important;
}
.device-mobile .market-shop-item-info,
.device-mobile .shop-item-info {
  font-size: 0.72rem !important;
}

/* ── CLAN MOBILE ── */
.device-mobile #win-clan .clan-tabs {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 4px !important;
}
.device-mobile #win-clan .clan-tab-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.65rem !important;
  padding: 5px 8px !important;
}
.device-mobile #win-clan .clan-member-row {
  padding: 6px 8px !important;
  gap: 6px !important;
}

/* ── SETTINGS MOBILE ── */
.device-mobile #win-settings .settings-group {
  padding: 8px !important;
  margin-bottom: 6px !important;
}
.device-mobile #win-settings .settings-row {
  padding: 6px 4px !important;
  font-size: 0.75rem !important;
}
.device-mobile #win-settings select,
.device-mobile #win-settings input[type="range"] {
  min-height: 36px !important;
}

/* ─────────────────────────────────────────────────────────────────────
   MAPA DE RUTAS: centrado
   ───────────────────────────────────────────────────────────────────── */
.device-mobile .win-map {
  top: 76px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  margin-left: 0 !important;
}

/* ─────────────────────────────────────────────────────────────────────
   JOYSTICK: respeta safe-area
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #touch-joystick {
  bottom: calc(96px + env(safe-area-inset-bottom));
}

/* ─────────────────────────────────────────────────────────────────────
   CHAT FLOTANTE
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #mobile-chat-btn { display: flex; }
.device-mobile #pokecenter-chat {
  bottom: calc(70px + env(safe-area-inset-bottom)) !important;
}
.device-mobile #pokecenter-chat-input {
  width: min(320px, calc(100vw - 24px)) !important;
}

/* ─────────────────────────────────────────────────────────────────────
   OVERLAYS Y NOTIFICACIONES
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #settings-ui-overlay {
  left: 8px !important;
  top: max(6px, env(safe-area-inset-top)) !important;
}
.device-mobile #combat-popup-container {
  top: 56px !important;
  right: 8px !important;
  bottom: auto !important;
  max-height: 110px !important;
}
.device-mobile .combat-popup { width: min(200px, calc(100vw - 16px)); }
.device-mobile .combat-popup .cpopup-header { padding: 4px 10px; }
.device-mobile .combat-popup .cpopup-header-title { font-size: 10px; }
.device-mobile .combat-popup .cpopup-body { padding: 6px 10px 8px; }
.device-mobile .combat-popup .cpopup-pokemon-name { font-size: 12px; margin-bottom: 4px; padding-bottom: 4px; }
.device-mobile .combat-popup .cpopup-section { margin-bottom: 3px; padding: 2px 0; }
.device-mobile .combat-popup .cpopup-exp-row,
.device-mobile .combat-popup .cpopup-bonus-row,
.device-mobile .combat-popup .cpopup-total-row,
.device-mobile .combat-popup .cpopup-loot-row,
.device-mobile .combat-popup .cpopup-mission-row,
.device-mobile .combat-popup .cpopup-gold-row { font-size: 11px; }
.device-mobile .combat-popup img { width: 16px !important; height: 16px !important; }

/* ─────────────────────────────────────────────────────────────────────
   AUTO-HELPER: compacto
   ───────────────────────────────────────────────────────────────────── */
.device-mobile #auto-helper-panel {
  width: min(260px, calc(100vw - 16px)) !important;
  max-height: min(42vh, 210px) !important;
}
.device-mobile #auto-helper-panel .ah-panel-header { height: 30px; padding: 0 10px; font-size: 0.7rem; }
.device-mobile #auto-helper-panel .ah-panel-body { padding: 4px; gap: 4px; }
.device-mobile #auto-helper-panel .ah-module { padding: 3px; }
.device-mobile #auto-helper-panel .ah-module-name { font-size: 0.7rem; }
.device-mobile #auto-helper-panel .ah-module-desc { font-size: 0.62rem; }
.device-mobile #auto-helper-panel .ah-toggle-slider { width: 30px; height: 16px; }
.device-mobile #auto-helper-panel .ah-toggle-slider:before { width: 12px; height: 12px; }

/* ── Botones flotantes: solo iconos ── */
.device-mobile #ah-btn-wrap { top: 40px; right: 6px; gap: 4px; }
.device-mobile #ah-btn-wrap #combat-notif-btn,
.device-mobile #ah-btn-wrap #auto-helper-btn {
  width: 34px; height: 34px; padding: 0;
  justify-content: center; font-size: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.device-mobile #ah-btn-wrap #combat-notif-btn span,
.device-mobile #ah-btn-wrap #auto-helper-btn span { display: none; }
.device-mobile #ah-btn-wrap #combat-notif-btn i,
.device-mobile #ah-btn-wrap #auto-helper-btn i { font-size: 16px; margin: 0; }

/* ─────────────────────────────────────────────────────────────────────
   LANDSCAPE: ajustes para cuando el teléfono está en horizontal
   (altura disponible ~280-350px)
   ───────────────────────────────────────────────────────────────────── */
@media (max-height: 500px) {
  .device-mobile {
    --mob-top: 56px;
  }
  .device-mobile .top-menu { height: 28px !important; }
  .device-mobile .win-header { height: 34px !important; min-height: 34px !important; padding: 0 8px !important; }
  .device-mobile #quick-hub-bar { padding: 2px 6px !important; gap: 2px !important; }
  .device-mobile #quick-hub-bar button { padding: 3px 6px !important; min-height: 28px !important; font-size: 0.58rem; }
  .device-mobile .nav-icon-btn { width: 24px !important; height: 24px !important; min-height: 24px !important; font-size: 0.65rem; }
}

/* ─────────────────────────────────────────────────────────────────────
   LANDSCAPE MUY BAJO: pantallas de ~350px de alto
   ───────────────────────────────────────────────────────────────────── */
@media (max-height: 400px) {
  .device-mobile {
    --mob-top: 48px;
  }
  .device-mobile .top-menu { height: 24px !important; }
  .device-mobile .win-header { height: 30px !important; min-height: 30px !important; }
  .device-mobile #quick-hub-bar { padding: 2px 4px !important; gap: 2px !important; bottom: 4px !important; }
  .device-mobile #quick-hub-bar button { padding: 2px 5px !important; min-height: 24px !important; font-size: 0.5rem; }
  .device-mobile .nav-icon-btn { width: 22px !important; height: 22px !important; min-height: 22px !important; font-size: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   @media (max-width: 768px) — Tablets en portrait (fallback)
   Solo se usa para tablets que NO tienen .device-mobile.
   Los celulares ya usan .device-mobile arriba.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .top-menu {
    top: max(2px, env(safe-area-inset-top)) !important;
    max-width: calc(100% - 4px);
    height: 32px !important;
    border-radius: 8px;
  }
  .nav-icons { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; gap: 2px; }
  .nav-icons::-webkit-scrollbar { display: none; }
  .nav-icon-btn { width: 26px; height: 26px; flex-shrink: 0; font-size: 0.72rem; }
  #quick-route-bar { top: max(36px, calc(env(safe-area-inset-top) + 34px)) !important; max-width: calc(100% - 4px); overflow-x: auto; scrollbar-width: none; }
  #quick-route-bar button { font-size: 0.6rem !important; padding: 2px 5px !important; min-height: 22px !important; }
  #quick-route-bar::-webkit-scrollbar { display: none; }
  #quick-hub-bar { position: fixed !important; bottom: max(10px, env(safe-area-inset-bottom)) !important; max-width: calc(100% - 12px); gap: 6px; padding: 6px 10px; z-index: 200 !important; }
  #quick-hub-bar button { font-size: 0.62rem; padding: 6px 8px; flex-shrink: 0; }
  #quick-hub-bar { padding: 3px 6px !important; gap: 3px !important; }
  .top-menu, #quick-hub-bar, #quick-route-bar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  button, a, [role="button"], .nav-icon-btn, .settings-btn-option { touch-action: manipulation; }
  .tibia-window { animation: none !important; opacity: 1 !important; contain: none !important; pointer-events: auto !important; overscroll-behavior: contain; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .tibia-window { max-height: calc(100dvh - var(--bottom-bar-height) - 10px) !important; }
  #quick-hub-bar { position: fixed !important; z-index: 999 !important; }
  .win-header { height: 44px !important; min-height: 44px !important; padding: 0 14px !important; pointer-events: auto !important; touch-action: none !important; -webkit-user-select: none !important; user-select: none !important; z-index: 1 !important; }
  #win-quests, #win-bosses, #win-clan, #win-profession, #win-breeding, #win-gym-badges, #win-ranking, #win-tournament, #win-captures, #win-marketplace, #win-streak, #win-pc-box, #win-daily-gift, #win-msc, #win-battlepass, #win-mazmorras, #win-diamond-shop, #win-news, #win-hall-of-fame, #win-pokedex, #win-skin-selector, #win-settings, #win-profile, #win-referral {
    width: min(94vw, 420px) !important; height: auto !important; max-width: calc(100dvw - 16px) !important;
    top: 50px !important; left: 50% !important; right: auto !important; bottom: auto !important;
    margin-left: -47vw !important; transform: none !important; z-index: 105 !important;
  }
  .tibia-window .win-body { overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; min-height: 0 !important; padding: 4px !important; }
  .win-chat { display: none; }
  #combat-popup-container { top: 56px !important; right: 8px !important; bottom: auto !important; max-height: 110px !important; }
  #auto-helper-panel { width: min(260px, calc(100vw - 16px)) !important; max-height: min(42vh, 210px) !important; }
  #ah-btn-wrap { top: 40px; right: 6px; gap: 4px; }
  #ah-btn-wrap #combat-notif-btn, #ah-btn-wrap #auto-helper-btn { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 0; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); }
  #ah-btn-wrap #combat-notif-btn span, #ah-btn-wrap #auto-helper-btn span { display: none; }
  #ah-btn-wrap #combat-notif-btn i, #ah-btn-wrap #auto-helper-btn i { font-size: 16px; margin: 0; }
  .win-map { top: 76px !important; left: 50% !important; right: auto !important; bottom: auto !important; margin-left: -160px !important; }
  #touch-joystick { bottom: calc(96px + env(safe-area-inset-bottom)); }
  #mobile-chat-btn { display: flex; }
  #pokecenter-chat { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  #pokecenter-chat-input { width: min(320px, calc(100vw - 24px)) !important; }
  #settings-ui-overlay { left: 8px !important; top: max(6px, env(safe-area-inset-top)) !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMACIÓN ULTRA ÉPICA DE LEVEL UP POKÉMON (PILAR CELESTIAL, RUNA & SFX)
   ═══════════════════════════════════════════════════════════════════════ */

/* 1. Pilar Celestial de Luz Ascendente */
.lvlup-pillar-beam {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 220px;
  background: linear-gradient(0deg, rgba(251, 191, 36, 0.95) 0%, rgba(56, 189, 248, 0.85) 50%, rgba(255, 255, 255, 0) 100%);
  border-radius: 999px;
  filter: blur(3px) drop-shadow(0 0 16px #fbbf24) drop-shadow(0 0 30px #38bdf8);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  animation: lvlupPillarRise 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 2. Runa Mágica Giratoria en el Suelo */
.lvlup-ground-rune {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 70px;
  height: 35px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid #fbbf24;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.6) 0%, rgba(245, 158, 11, 0.2) 60%, transparent 80%);
  box-shadow: 0 0 25px #fbbf24, inset 0 0 15px #fef08a;
  pointer-events: none;
  z-index: 9997;
  animation: lvlupRuneSpin 1.4s ease-out forwards;
}

/* 3. Doble Onda Expansiva */
.lvlup-burst-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #fbbf24;
  box-shadow: 0 0 30px #f59e0b, 0 0 50px #38bdf8, inset 0 0 20px #fef08a;
  pointer-events: none;
  z-index: 9999;
  animation: lvlupRing 1.0s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.lvlup-burst-ring-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 25px #38bdf8;
  pointer-events: none;
  z-index: 9999;
  animation: lvlupRing 1.2s 0.15s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

/* 4. Insignia 3D Dorada Neón Flotante */
.lvlup-popup {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) scale(0.3);
  background: linear-gradient(135deg, #78350f 0%, #b45309 25%, #f59e0b 50%, #fbbf24 75%, #fef08a 100%);
  color: #0f172a;
  font-family: 'Cinzel', 'Outfit', system-ui, sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 5px 16px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 25px rgba(251, 191, 36, 1), 0 0 45px rgba(245, 158, 11, 0.8), 0 4px 15px rgba(0, 0, 0, 0.8), inset 0 2px 4px #ffffff;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
  animation: lvlupBounceEpic 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.lvlup-popup-multi {
  background: linear-gradient(135deg, #831843 0%, #db2777 30%, #f59e0b 60%, #38bdf8 100%);
  color: #ffffff;
  border-color: #fef08a;
  box-shadow: 0 0 30px rgba(236, 72, 153, 1), 0 0 50px rgba(56, 189, 248, 0.9), 0 4px 15px rgba(0, 0, 0, 0.8), inset 0 2px 4px #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* 5. Estrellas y Chispas Radiantes */
.lvlup-sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px #fef08a, 0 0 24px #fbbf24, 0 0 36px #38bdf8;
  pointer-events: none;
  z-index: 10001;
  animation: lvlupSparkleFlyEpic 1.4s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

/* 6. Destello de Pantalla Suave */
.screen-lvlup-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.22) 0%, rgba(56, 189, 248, 0.1) 60%, transparent 85%);
  pointer-events: none;
  z-index: 99999;
  animation: screenFlashAnim 0.5s ease-out forwards;
}

@keyframes lvlupPillarRise {
  0% {
    opacity: 0;
    height: 0px;
    transform: translateX(-50%) scaleX(0.3);
  }
  20% {
    opacity: 0.95;
    height: 240px;
    transform: translateX(-50%) scaleX(1.4);
  }
  50% {
    opacity: 0.8;
    height: 260px;
    transform: translateX(-50%) scaleX(1.0);
  }
  100% {
    opacity: 0;
    height: 280px;
    transform: translateX(-50%) scaleX(0.1);
  }
}

@keyframes lvlupRuneSpin {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.2) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1) rotate(90deg);
  }
  70% {
    opacity: 0.85;
    transform: translateX(-50%) scale(1.0) rotate(220deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.3) rotate(360deg);
  }
}

@keyframes lvlupBounceEpic {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.2);
  }
  18% {
    opacity: 1;
    transform: translateX(-50%) translateY(-26px) scale(1.25);
  }
  30% {
    transform: translateX(-50%) translateY(-22px) scale(1.0);
  }
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(-36px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-65px) scale(0.85);
  }
}

@keyframes lvlupRing {
  0% {
    width: 10px;
    height: 10px;
    opacity: 1;
    border-width: 4px;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    width: 120px;
    height: 120px;
    opacity: 0;
    border-width: 1px;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

@keyframes lvlupSparkleFlyEpic {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1.3);
  }
  70% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0px), var(--ty, -50px)) scale(0.1);
  }
}

@keyframes screenFlashAnim {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

.team-card-lvlup-glow {
  animation: teamCardLvlPulseEpic 1.5s ease-out;
}

@keyframes teamCardLvlPulseEpic {
  0% {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    border-color: rgba(251, 191, 36, 0.3);
  }
  20% {
    box-shadow: 0 0 35px rgba(251, 191, 36, 1), 0 0 50px rgba(56, 189, 248, 0.8), inset 0 0 20px rgba(251, 191, 36, 0.6);
    border-color: #fbbf24;
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    transform: scale(1.0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMACIÓN ULTRA ÉPICA DE LEVEL UP DEL ENTRENADOR (CORONA & PILAR REAL)
   ═══════════════════════════════════════════════════════════════════════ */

/* 1. Pilar Celestial Real Amatista & Oro */
.lvlup-trainer-pillar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 250px;
  background: linear-gradient(0deg, rgba(168, 85, 247, 0.95) 0%, rgba(251, 191, 36, 0.9) 50%, rgba(255, 255, 255, 0) 100%);
  border-radius: 999px;
  filter: blur(3px) drop-shadow(0 0 20px #a855f7) drop-shadow(0 0 35px #fbbf24);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  animation: lvlupPillarRise 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 2. Runa Arcana Real de Entrenador */
.lvlup-trainer-rune {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 80px;
  height: 40px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2.5px solid #c084fc;
  background: radial-gradient(ellipse at center, rgba(192, 132, 252, 0.7) 0%, rgba(251, 191, 36, 0.3) 60%, transparent 85%);
  box-shadow: 0 0 30px #a855f7, 0 0 45px #fbbf24, inset 0 0 18px #fef08a;
  pointer-events: none;
  z-index: 9997;
  animation: lvlupRuneSpin 1.5s ease-out forwards;
}

/* 3. Insignia 3D Real con Corona */
.lvlup-trainer-popup {
  position: absolute;
  top: -42px;
  left: 50%;
  transform: translateX(-50%) scale(0.3);
  background: linear-gradient(135deg, #3b0764 0%, #6b21a8 25%, #9333ea 50%, #f59e0b 75%, #fef08a 100%);
  color: #ffffff;
  font-family: 'Cinzel', 'Outfit', system-ui, sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 2px solid #fef08a;
  box-shadow: 0 0 30px rgba(168, 85, 247, 1), 0 0 50px rgba(251, 191, 36, 0.9), 0 5px 20px rgba(0, 0, 0, 0.85), inset 0 2px 5px #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(251, 191, 36, 0.8);
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
  animation: lvlupBounceEpic 1.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 4. Estrellas y Chispas de Corona Real */
.lvlup-trainer-sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 14px #fef08a, 0 0 26px #c084fc, 0 0 40px #fbbf24;
  pointer-events: none;
  z-index: 10001;
  animation: lvlupSparkleFlyEpic 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

/* 5. Destello de Pantalla Púrpura y Oro */
.screen-trainer-lvlup-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.28) 0%, rgba(251, 191, 36, 0.18) 55%, transparent 85%);
  pointer-events: none;
  z-index: 99999;
  animation: screenFlashAnim 0.55s ease-out forwards;
}

/* 6. Pulso en el Botón de Perfil en la Barra Superior */
.trainer-btn-lvlup-pulse {
  animation: trainerBtnPulse 1.8s ease-out !important;
}

@keyframes trainerBtnPulse {
  0% {
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    transform: scale(1);
  }
  20% {
    box-shadow: 0 0 25px #a855f7, 0 0 40px #fbbf24;
    transform: scale(1.25);
    background: rgba(168, 85, 247, 0.4) !important;
  }
  100% {
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    transform: scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════════
   MODAL DE VOTACIÓN TOPIDLE CON RACHA DE 30 DÍAS
   ══════════════════════════════════════════════════════════════════ */
.topidle-vote-card {
  max-width: 680px !important;
  width: 95% !important;
  background: linear-gradient(180deg, #181512 0%, #0d0f12 100%) !important;
  border: 1px solid rgba(249, 115, 22, 0.4) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(249, 115, 22, 0.15) !important;
  padding: 24px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.topidle-modal-header {
  text-align: center;
  margin-bottom: 16px;
}
.topidle-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.topidle-modal-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 4px;
}

.topidle-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
}
.topidle-stat-label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 2px;
}
.topidle-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
}

.topidle-grid-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.topidle-grid-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
}
.topidle-rewards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 600px) {
  .topidle-rewards-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
}

.topidle-day-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.topidle-day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.5);
}
.topidle-day-card.claimed {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.4);
}
.topidle-day-card.today {
  background: rgba(249, 115, 22, 0.18);
  border: 2px solid #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}
.topidle-day-card.special {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.08);
}

.topidle-day-badge {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 700;
}
.topidle-day-icon {
  font-size: 1.1rem;
  margin: 2px 0;
}
.topidle-day-gold {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fbbf24;
}
.topidle-day-diamonds {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
}
.topidle-day-check {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.7rem;
  color: #22c55e;
  font-weight: bold;
}
.topidle-day-today-tag {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #f97316;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.topidle-hover-preview {
  background: rgba(249, 115, 22, 0.08);
  border: 1px dashed rgba(249, 115, 22, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fbbf24;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.topidle-hover-preview.active-hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: #f97316;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.35);
}

.topidle-action-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.topidle-vote-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, filter 0.2s;
  display: inline-block;
}
.topidle-vote-btn:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 0 16px rgba(249, 115, 22, 0.6));
}
.topidle-vote-btn img {
  display: block;
  border-radius: 8px;
}
.topidle-footer-note {
  font-size: 0.72rem;
  color: #94a3b8;
  max-width: 480px;
}

#icon-topidle-vote { position: relative; }
.topidle-nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: #f97316;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.95);
  animation: topidle-badge-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}
@keyframes topidle-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(249, 115, 22, 0.8); }
  50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(249, 115, 22, 1); }
}
.topidle-btn-attention {
  animation: topidle-btn-glow 2s ease-in-out infinite;
}
@keyframes topidle-btn-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 14px rgba(249, 115, 22, 0.8); }
}


