/* ============================================================
   POKÉMON GYMS — Sistema de Gimnasios PvE
   Estilos para medallas, arenas, bosses y Hall of Fame
   ============================================================ */

/* ── VENTANA DE MEDALLAS ── */
/* ── VENTANA DE MEDALLAS ── */
/* Cuerpo de la ventana: layout de DOS columnas (medallas | ficha) para que
   toda la información quepa en la ventana sin necesidad de hacer scroll. */
/* ═══════════════════════════════════════════════════════════════
   FIX: Sobreescribir contain de .tibia-window para que el flex
   layout funcione correctamente dentro de #win-gym-badges.
   El contain:layout style paint ROMPE el flex layout y el body
   se expande a 1095px en vez de limitarse a la ventana (642px).
   ═══════════════════════════════════════════════════════════════ */
#win-gym-badges {
  contain: none !important;
  overflow: hidden !important;
  flex-direction: column !important;
  position: fixed !important;
}
/* Body: ocupar exactamente el espacio restante de la ventana */
#gym-badges-body {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
/* Layout interno: scroll vertical dentro del body */
.gym-badges-layout {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 12px !important;
  display: flex !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
.gym-badges-column {
  flex: 0 0 322px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, .4) transparent;
}
.gym-badges-column::-webkit-scrollbar { width: 8px; }
.gym-badges-column::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, .4); border-radius: 4px; }
.gym-badges-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #c084fc;
  font-weight: 700;
  flex-shrink: 0;
}
.gym-detail-column {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, .4) transparent;
}
.gym-detail-column::-webkit-scrollbar { width: 8px; }
.gym-detail-column::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, .4); border-radius: 4px; }

/* Grid de medallas */
.gym-badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0;
}
/* En la columna izquierda (322px) las tarjetas a 2 columnas quedan legibles
   (con 4 columnas cada medalla mediría ~73px y los nombres se romperían). */
.gym-badges-column .gym-badges-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Tarjeta de medalla individual */
.gym-badge-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 80px;
  backdrop-filter: blur(8px);
}
.gym-badge-card:hover {
  border-color: rgba(192, 132, 252, 0.6);
  transform: translateY(-2px);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 14px rgba(168, 85, 247, 0.3);
}

/* Estados de la medalla */
.gym-badge-card.locked {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.8);
  border-color: rgba(255, 255, 255, 0.1);
}
.gym-badge-card.locked:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.02);
}
.gym-badge-card.available {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
  animation: gym-badge-pulse 2.5s ease-in-out infinite;
}
.gym-badge-card.completed {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.12) 0%, rgba(15, 10, 33, 0.8) 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}
.gym-badge-card.cooldown {
  border-color: rgba(245, 158, 11, 0.5);
  opacity: .75;
}

@keyframes gym-badge-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(251,191,36,.25); }
  50% { box-shadow: 0 0 22px rgba(251,191,36,.55); }
}

/* Icono de la medalla (retrato del líder) */
.gym-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 2px solid rgba(168, 85, 247, 0.4);
  transition: all .3s;
  overflow: hidden;
  background: rgba(0,0,0,.35);
}
.gym-badge-avatar {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.55));
  display: block;
}
.gym-badge-card.locked .gym-badge-icon {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #64748b;
}
.gym-badge-card.available .gym-badge-icon {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #f59e0b;
  color: #0f172a;
  box-shadow: 0 0 14px rgba(251,191,36,.5);
}
.gym-badge-card.completed .gym-badge-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 0 14px rgba(34,197,94,.4);
}

/* Tipo elemental badge */
.gym-badge-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* Nombre del líder */
.gym-badge-leader {
  font-size: 12px;
  color: #f1f5f9;
  font-weight: 600;
  text-align: center;
}
.gym-badge-city {
  font-size: 10px;
  color: #94a3b8;
}

/* Candado */
.gym-badge-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 12px;
  color: #64748b;
}

/* Checkmark */
.gym-badge-check {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
  color: #22c55e;
}

/* Cooldown timer */
.gym-badge-cooldown {
  font-size: 10px;
  color: #fbbf24;
  text-align: center;
}

/* ── PANEL DE DETALLE DEL GIMNASIO ── */
#gym-detail-container {
  margin-top: 0;
}
.gym-detail-card {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.8), rgba(15, 10, 33, 0.9));
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}

.gym-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 12px;
}
.gym-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}
.gym-detail-info {
  flex: 1;
}
.gym-detail-info h3 {
  margin: 0;
  font-size: 17px;
  color: #f8fafc;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}
.gym-detail-info .gym-detail-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Stats del gimnasio */
.gym-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
.gym-detail-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gym-detail-stat i {
  width: 14px;
  text-align: center;
  color: #c084fc;
  flex-shrink: 0;
}

/* Equipo del líder */
.gym-detail-team {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gym-detail-pokemon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  padding: 4px 7px;
  min-width: 50px;
  transition: all .2s ease;
}
.gym-detail-pokemon:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(192, 132, 252, 0.4);
  transform: translateY(-2px);
}
.gym-detail-pokemon .gym-detail-pk-sprite {
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
/* Retrato del líder en la cabecera de la ficha */
.gym-detail-icon .gym-badge-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.gym-detail-pokemon span {
  font-size: 11px;
  color: #c084fc;
  font-weight: 600;
}

/* Ciudad en el título del detalle */
.gym-detail-city {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

/* Secciones del detalle */
.gym-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #c084fc;
  font-weight: 700;
  margin-bottom: 4px;
  margin-top: 0;
}

/* Requisitos */
.gym-reqs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 10px;
  padding: 7px 10px;
}
.gym-req-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #cbd5e1;
}
.gym-req-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.gym-req-dot.ok {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.6);
}
.gym-req-dot.no {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.6);
}

/* Nombre y nivel de cada Pokémon del equipo */
.gym-pk-name {
  font-size: 10px;
  color: #e2e8f0;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.gym-pk-level {
  font-size: 11px;
  color: #fbbf24;
  font-weight: 700;
}
.gym-detail-pokemon span {
  display: block;
}

/* Recompensas preview */
.gym-detail-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gym-rewards-block {
  margin-bottom: 8px;
}
.gym-rewards-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 4px;
}
.gym-reward-ico {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}

/* Cooldown */
.gym-cooldown {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 8px;
  padding: 6px 10px;
}
.gym-cooldown.active {
  color: #fbbf24;
  font-weight: 700;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}
.gym-reward-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  color: #fbbf24;
  font-weight: 600;
}
.gym-reward-tag i {
  font-size: 10px;
  color: #c084fc;
}

/* Botón desafiar */
.gym-challenge-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(192, 132, 252, 0.6);
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 50%, #6b21a8 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 10px;
  transition: all .25s ease;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.gym-challenge-btn:hover {
  background: linear-gradient(180deg, #e8b820 0%, #d4a017 50%, #a07718 100%);
  box-shadow: 0 0 16px rgba(212,160,23,.5);
  transform: translateY(-1px);
}
.gym-challenge-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}
.gym-challenge-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.6);
}
.gym-challenge-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ── ELITE FOUR PROGRESS BAR ── */
.gym-e4-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 12px;
}
.gym-e4-step {
  flex: 1;
  height: 6px;
  background: #333;
  border-radius: 3px;
  position: relative;
  transition: all .3s;
}
.gym-e4-step.completed {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  box-shadow: 0 0 6px rgba(34,197,94,.4);
}
.gym-e4-step.current {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 8px rgba(251,191,36,.5);
  animation: gym-e4-pulse 1.5s ease-in-out infinite;
}
@keyframes gym-e4-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(251,191,36,.3); }
  50% { box-shadow: 0 0 14px rgba(251,191,36,.7); }
}
.gym-e4-connector {
  width: 12px;
  height: 2px;
  background: #444;
}
.gym-e4-connector.completed {
  background: #22c55e;
}
.gym-e4-label {
  font-size: 10px;
  color: #888;
  text-align: center;
  margin-top: 4px;
}

/* ── BOSS HP BAR (GYM) ── */
.gym-boss-bar {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.gym-boss-bar-title {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gym-boss-bar-title .gym-leader-name {
  color: #fff;
}
.gym-boss-bar-type-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
}
.gym-boss-bar-container {
  width: 100%;
  height: 18px;
  background: #1a1a1a;
  border: 2px solid #555;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}
.gym-boss-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width .3s ease;
  position: relative;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}
.gym-boss-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.2), transparent);
  border-radius: 7px 7px 0 0;
}
.gym-boss-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  white-space: nowrap;
}
.gym-boss-bar-counter {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

/* Botón Abandonar en la barra del boss (la barra es pointer-events:none,
   así que el botón necesita re-activar los eventos de puntero). */
.gym-boss-abandon-btn {
  margin-top: 5px;
  pointer-events: auto;
  background: linear-gradient(180deg, #7f1d1d 0%, #450a0a 100%);
  border: 1.5px solid #ef4444;
  color: #fecaca;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  letter-spacing: .5px;
  padding: 5px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.gym-boss-abandon-btn:hover {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fff;
  box-shadow: 0 0 14px rgba(239,68,68,.45);
  transform: translateY(-1px);
}
.gym-boss-abandon-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ── RED (CHAMPION) SPECIAL EFFECTS ── */
.gym-boss-bar.champion .gym-boss-bar-fill {
  background: linear-gradient(90deg, #ef4444, #dc2626, #b91c1c, #dc2626, #ef4444);
  background-size: 200% 100%;
  animation: gym-red-bar-shimmer 2s linear infinite;
}
@keyframes gym-red-bar-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.gym-boss-bar.champion .gym-boss-bar-container {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239,68,68,.4);
}
.gym-boss-bar.champion .gym-boss-bar-title {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239,68,68,.5);
}

/* Red overlay oscuro */
.gym-red-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
  z-index: 850;
  animation: gym-red-vignette 3s ease-in-out infinite alternate;
}
@keyframes gym-red-vignette {
  0% { background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.6) 100%); }
  100% { background: radial-gradient(ellipse at center, transparent 25%, rgba(20,0,0,.7) 100%); }
}

/* ── DIÁLOGOS ── */
.gym-dialogue-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
  animation: gym-fade-in .3s ease;
}
@keyframes gym-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.gym-dialogue-box {
  width: 580px;
  max-width: 90vw;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 3px solid #b8860b;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 -4px 30px rgba(0,0,0,.6);
  animation: gym-dialogue-slide-up .4s ease;
}
@keyframes gym-dialogue-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.gym-dialogue-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(184,134,11,.2), transparent);
  border-bottom: 1px solid #444;
}
.gym-dialogue-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #b8860b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #222;
}
.gym-dialogue-name {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
}
.gym-dialogue-title {
  font-size: 11px;
  color: #888;
}
.gym-dialogue-text {
  padding: 16px;
  font-size: 14px;
  color: #ddd;
  line-height: 1.6;
  min-height: 60px;
}
.gym-dialogue-continue {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 12px;
}
.gym-dialogue-continue-btn {
  background: linear-gradient(180deg, #d4a017, #b8860b);
  border: 1px solid #8b6914;
  color: #1a1a1a;
  padding: 6px 20px;
  font-weight: 700;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.gym-dialogue-continue-btn:hover {
  background: linear-gradient(180deg, #e8b820, #d4a017);
  box-shadow: 0 0 10px rgba(212,160,23,.4);
}

/* ── HALL OF FAME ── */
#hall-of-fame-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
  overflow-y: auto;
  max-height: 100%;
}

.hof-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 0 8px;
}
.hof-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hof-podium-rank {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  border: 3px solid;
}
.hof-podium-slot:nth-child(1) .hof-podium-rank { /* 2nd place */
  background: linear-gradient(135deg, #94a3b8, #64748b);
  border-color: #94a3b8;
  color: #fff;
}
.hof-podium-slot:nth-child(2) .hof-podium-rank { /* 1st place */
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-color: #fbbf24;
  color: #1a1a1a;
  width: 56px;
  height: 56px;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(251,191,36,.4);
}
.hof-podium-slot:nth-child(3) .hof-podium-rank { /* 3rd place */
  background: linear-gradient(135deg, #d97706, #92400e);
  border-color: #d97706;
  color: #fff;
}
.hof-podium-name {
  font-size: 12px;
  font-weight: 600;
  color: #ddd;
  text-align: center;
}
.hof-podium-time {
  font-size: 10px;
  color: #888;
}

/* Tabla de Hall of Fame */
.hof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hof-table th {
  background: #222;
  color: #888;
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .5px;
  border-bottom: 2px solid #444;
}
.hof-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #333;
  color: #ccc;
}
.hof-table tr:hover td {
  background: rgba(251,191,36,.05);
}
.hof-table .hof-rank-cell {
  font-weight: 700;
  color: #fbbf24;
  width: 40px;
}
.hof-table .hof-team-cell {
  display: flex;
  gap: 4px;
}
.hof-table .hof-team-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

/* ── LIGA LICENSE NOTIFICATION ── */
.gym-license-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gym-fade-in .5s ease;
}
.gym-license-card {
  width: 400px;
  max-width: 90vw;
  background: linear-gradient(145deg, #2a2a10 0%, #1a1a00 100%);
  border: 3px solid #fbbf24;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  animation: gym-license-pop .6s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: 0 0 40px rgba(251,191,36,.3), 0 0 80px rgba(251,191,36,.1);
}
@keyframes gym-license-pop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.gym-license-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: gym-license-glow 2s ease-in-out infinite alternate;
}
@keyframes gym-license-glow {
  0% { text-shadow: 0 0 10px rgba(251,191,36,.5); filter: brightness(1); }
  100% { text-shadow: 0 0 30px rgba(251,191,36,.8); filter: brightness(1.2); }
}
.gym-license-title {
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.gym-license-subtitle {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 24px;
  line-height: 1.5;
}
.gym-license-dismiss-btn {
  background: linear-gradient(180deg, #d4a017, #b8860b);
  border: 2px solid #8b6914;
  color: #1a1a1a;
  padding: 10px 32px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.gym-license-dismiss-btn:hover {
  background: linear-gradient(180deg, #e8b820, #d4a017);
  box-shadow: 0 0 16px rgba(212,160,23,.5);
}

/* ── GYM VICTORY ANIMATION ── */
.gym-victory-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gym-fade-in .4s ease;
}
.gym-victory-card {
  width: 380px;
  max-width: 90vw;
  background: linear-gradient(145deg, #1a2a1a 0%, #0f1a0f 100%);
  border: 3px solid #22c55e;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  animation: gym-license-pop .5s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: 0 0 30px rgba(34,197,94,.3);
}
.gym-victory-badge {
  font-size: 56px;
  margin-bottom: 12px;
}
.gym-victory-title {
  font-size: 20px;
  font-weight: 800;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.gym-victory-subtitle {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 16px;
}
.gym-victory-rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.gym-victory-dismiss-btn {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border: 2px solid #15803d;
  color: #fff;
  padding: 10px 28px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  text-transform: uppercase;
}
.gym-victory-dismiss-btn:hover {
  background: linear-gradient(180deg, #34d399, #22c55e);
  box-shadow: 0 0 12px rgba(34,197,94,.4);
}

/* ── GYM DEFEAT ── */
.gym-defeat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gym-fade-in .4s ease;
}
.gym-defeat-card {
  width: 350px;
  max-width: 90vw;
  background: linear-gradient(145deg, #2a1a1a 0%, #1a0f0f 100%);
  border: 3px solid #ef4444;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  animation: gym-license-pop .5s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: 0 0 20px rgba(239,68,68,.2);
}
.gym-defeat-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.gym-defeat-title {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 4px;
}
.gym-defeat-subtitle {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 16px;
}
.gym-defeat-dismiss-btn {
  background: linear-gradient(180deg, #555, #333);
  border: 2px solid #666;
  color: #ddd;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.gym-defeat-dismiss-btn:hover {
  background: linear-gradient(180deg, #666, #444);
}

/* ── HEALING PARTICLES ── */
.gym-heal-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: gym-heal-float 1s ease-out forwards;
  box-shadow: 0 0 4px #22c55e;
}
@keyframes gym-heal-float {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.3); }
}

/* ── TYPE COLORS ── */
.type-rock { background: #b8a038; color: #1a1a1a; }
.type-water { background: #6890f0; color: #fff; }
.type-electric { background: #f8d030; color: #1a1a1a; }
.type-grass { background: #78c850; color: #1a1a1a; }
.type-poison { background: #a040a0; color: #fff; }
.type-psychic { background: #f85888; color: #fff; }
.type-fire { background: #f08030; color: #1a1a1a; }
.type-ground { background: #e0c068; color: #1a1a1a; }
.type-ice { background: #98d8d8; color: #1a1a1a; }
.type-fighting { background: #c03028; color: #fff; }
.type-ghost { background: #705898; color: #fff; }
.type-dragon { background: #7038f8; color: #fff; }
.type-flying { background: #a890f0; color: #1a1a1a; }
.type-normal { background: #a8a878; color: #1a1a1a; }
.type-bug { background: #a8b820; color: #1a1a1a; }

/* ── RESPONSIVE ── */
.device-mobile .gym-badges-grid { grid-template-columns: repeat(2, 1fr); }
.device-mobile .gym-boss-bar { width: min(300px, 90vw); }
.device-mobile .gym-dialogue-box { width: 95vw; }
@media (max-width: 700px) {
  .gym-badges-grid { grid-template-columns: repeat(2, 1fr); }
  .gym-boss-bar { width: 300px; }
  .gym-dialogue-box { width: 95vw; }
}

/* ── Banner de combate activo (abandonar desde la ventana de Gimnasios) ── */
.gym-active-battle-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35), rgba(69, 10, 10, 0.45));
  border: 1.5px solid rgba(248, 113, 113, 0.55);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.2);
}
.gym-active-battle-text {
  color: #fecaca;
  font-size: 12.5px;
  line-height: 1.45;
}
.gym-active-battle-text b { color: #fff; }
.gym-abandon-stale-btn {
  align-self: stretch;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  border: 1px solid rgba(252, 165, 165, 0.6);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.gym-abandon-stale-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45);
  filter: brightness(1.15);
}
.gym-abandon-stale-btn:active { transform: translateY(0) scale(0.98); }

/* ── REGIONES (barra superior: Kanto abierta, resto bloqueadas) ── */
.gym-regions-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px 0;
  flex-shrink: 0;
}
.gym-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;
}
.gym-region-btn:hover { border-color: rgba(251,191,36,0.4); color: #fbbf24; transform: translateY(-1px); }
.gym-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);
}
.gym-region-btn.locked { opacity: 0.55; cursor: not-allowed; }
.gym-region-btn.locked:hover { opacity: 0.9; border-color: rgba(255,255,255,0.2); transform: none; }

/* ── PESTAÑA LÍDERES DE GIMNASIO ── */
.gym-leaders-list { display: flex; flex-direction: column; gap: 8px; }
.gym-leader-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(168,85,247,0.2);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.gym-leader-card:hover { border-color: rgba(192,132,252,0.55); transform: translateX(2px); background: rgba(168,85,247,0.08); }
.gym-leader-card.locked { opacity: 0.55; }
.gym-leader-card.available {
  border-color: rgba(251,191,36,0.55);
  background: rgba(251,191,36,0.06);
  box-shadow: 0 0 12px rgba(251,191,36,0.15);
  animation: gym-badge-pulse 2.5s ease-in-out infinite;
}
.gym-leader-card.completed { border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.06); }
.gym-leader-card.cooldown { border-color: rgba(245,158,11,0.4); }
.gym-leader-card-avatar { width: 52px; height: 52px; flex-shrink: 0; }
.gym-leader-card-avatar img {
  width: 52px; height: 52px; object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.gym-leader-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gym-leader-card-name { font-size: 14px; font-weight: 800; color: #f1f5f9; }
.gym-leader-card-city { font-size: 11px; color: #94a3b8; }
.gym-leader-card-meta { display: flex; align-items: center; gap: 6px; }
.gym-leader-card-meta .type-badge { font-size: 9px; padding: 2px 7px; border-radius: 5px; font-weight: 800; color: #fff; }
.gym-leader-card-lvl { font-size: 10px; color: #c084fc; font-weight: 700; }
.gym-leader-card-status { font-size: 11px; font-weight: 700; color: #fbbf24; }
.gym-leader-card.completed .gym-leader-card-status { color: #22c55e; }
.gym-leader-card.locked .gym-leader-card-status { color: #94a3b8; }

/* ── PESTAÑA MEDALLAS (nombres reales de las medallas) ── */
.gym-medals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gym-medal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(168,85,247,0.22);
  border-radius: 12px;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.gym-medal-card:hover { border-color: rgba(192,132,252,0.6); transform: translateY(-2px); background: rgba(168,85,247,0.1); }
/* La pestaña Medallas SOLO muestra medallas obtenidas: brillo sutil de logro,
   sin candados ni etiquetas "Bloqueada"/"Disponible". */
.gym-medal-card.obtained {
  border-color: rgba(251,191,36,0.6);
  background: linear-gradient(145deg, rgba(251,191,36,0.14), rgba(15,10,33,0.85));
  box-shadow: 0 0 16px rgba(251,191,36,0.22), inset 0 0 10px rgba(251,191,36,0.05);
  animation: gymMedalGlow 2.8s ease-in-out infinite;
}
@keyframes gymMedalGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(251,191,36,0.18), inset 0 0 8px rgba(251,191,36,0.04); }
  50% { box-shadow: 0 0 22px rgba(251,191,36,0.4), inset 0 0 12px rgba(251,191,36,0.1); }
}
.gym-medal-card.obtained.selected {
  border-color: rgba(251,191,36,0.95);
  background: linear-gradient(145deg, rgba(251,191,36,0.22), rgba(15,10,33,0.9));
  box-shadow: 0 0 26px rgba(251,191,36,0.5), inset 0 0 14px rgba(251,191,36,0.14);
}
.gym-medal-card.obtained:hover {
  border-color: rgba(251,191,36,0.9);
  transform: translateY(-2px);
  background: rgba(251,191,36,0.16);
}
.gym-medal-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(251,191,36,0.2), rgba(180,83,9,0.25));
  border: 2px solid rgba(251,191,36,0.5);
  box-shadow: 0 0 12px rgba(251,191,36,0.25);
}
.gym-medal-card.obtained .gym-medal-icon {
  background: linear-gradient(145deg, rgba(251,191,36,0.3), rgba(180,83,9,0.35));
  border-color: rgba(251,191,36,0.75);
  box-shadow: 0 0 16px rgba(251,191,36,0.4);
  filter: none;
}
/* Imagen OFICIAL de la medalla (sprite PokeAPI sprites/badges/*.png) */
.gym-medal-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(251,191,36,0.6));
  display: block;
}
/* Pestaña Medallas a ancho COMPLETO: sin panel de detalle a la derecha */
.gym-badges-layout.medals-only .gym-detail-column {
  display: none;
}
.gym-badges-layout.medals-only .gym-badges-column {
  flex: 1 1 auto;
  max-width: none;
  padding: 4px 8px;
}
.gym-badges-layout.medals-only .gym-medals-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  align-content: start;
}
.gym-medal-name { font-size: 12px; font-weight: 800; color: #fbbf24; }
.gym-medal-card.obtained .gym-medal-name { color: #fde68a; text-shadow: 0 0 8px rgba(251,191,36,0.5); }
.gym-medal-leader { font-size: 10px; color: #94a3b8; }
.gym-medal-status { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #64748b; }
.gym-medal-card.obtained .gym-medal-status { color: #22c55e; }

/* Estado vacío: aún no hay ninguna medalla obtenida */
.gym-medals-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 16px;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(148,163,184,0.3);
  border-radius: 12px;
}
.gym-medals-empty-icon {
  font-size: 40px;
  opacity: 0.8;
  filter: grayscale(0.3);
}
.gym-medals-empty-text {
  font-size: 13px;
  line-height: 1.55;
  color: #94a3b8;
}

/* ── PESTAÑAS: Líderes | Medallas | Alto Mando | Campeón ── */
.gym-tabs-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.gym-tab-btn {
  flex: 1;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #cbd5e1;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-transform: uppercase;
}
.gym-tab-btn:hover { border-color: rgba(192,132,252,0.6); color: #f1f5f9; transform: translateY(-1px); }
.gym-tab-btn.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.28), rgba(109,40,217,0.12));
  border-color: rgba(192,132,252,0.7);
  color: #e9d5ff;
  box-shadow: 0 0 16px rgba(168,85,247,0.28);
}

/* ── Overlay de región bloqueada ── */
.gym-region-locked-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gym-fade-in 0.25s ease;
}
.gym-region-locked-card {
  width: 360px;
  max-width: 90vw;
  background: linear-gradient(145deg, #1e1b4b, #0f0a21);
  border: 2px solid rgba(251,191,36,0.6);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 0 40px rgba(251,191,36,0.25);
}
.gym-region-lock-icon { font-size: 52px; animation: gymLeaderBob 2.6s ease-in-out infinite; }
.gym-region-locked-card h3 { margin: 10px 0 6px; color: #fbbf24; font-size: 1.2rem; }
.gym-region-locked-card p { color: #94a3b8; font-size: 0.85rem; line-height: 1.6; margin: 0 0 18px; }
.gym-region-locked-ok {
  background: linear-gradient(180deg, #d4a017, #b8860b);
  border: 1px solid #8b6914;
  color: #1a1a1a;
  padding: 8px 28px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.gym-region-locked-ok:hover { filter: brightness(1.15); }

/* ── Estados de la medalla: Bloqueada | Disponible | Obtenida ── */
.gym-badge-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
}
.gym-badge-reason {
  font-size: 9px;
  color: #64748b;
  text-align: center;
  line-height: 1.3;
  max-width: 90px;
}
.gym-badge-star {
  font-size: 14px;
  animation: gym-badge-pulse 1.8s ease-in-out infinite;
}
.gym-badge-card.available .gym-badge-status { color: #fbbf24; }
.gym-badge-card.completed .gym-badge-status { color: #22c55e; }
.gym-badge-card.cooldown .gym-badge-status { color: #22c55e; }

/* ── Detalle: info de la medalla (fecha, mejor tiempo, victorias) ── */
.gym-medal-info {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.15);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.8;
}
.gym-medal-info b { color: #fbbf24; }
.gym-recommended-level {
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px dashed rgba(251,191,36,0.35);
  border-radius: 8px;
  padding: 6px 10px;
}

/* ── ALTO MANDO (Élite Four): lista consecutiva ── */
.gym-elite-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  text-align: center;
  color: #94a3b8;
}
.gym-elite-lock-icon { font-size: 3rem; animation: gymLeaderBob 2.6s ease-in-out infinite; }
.gym-elite-locked h3 { margin: 6px 0 0; color: #f1f5f9; font-size: 1rem; }
.gym-elite-locked p { margin: 0; font-size: 0.8rem; line-height: 1.6; }
.gym-elite-badges-progress { font-size: 0.9rem; letter-spacing: 3px; }
.gym-elite-note {
  font-size: 11px;
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px dashed rgba(251,191,36,0.35);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.gym-elite-list { display: flex; flex-direction: column; gap: 8px; }
.gym-elite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(168,85,247,0.2);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.gym-elite-row:hover { border-color: rgba(192,132,252,0.5); transform: translateX(2px); }
.gym-elite-row.locked { opacity: 0.45; cursor: not-allowed; }
.gym-elite-row.done { border-color: rgba(34,197,94,0.5); background: rgba(34,197,94,0.08); }
.gym-elite-row.current {
  border-color: rgba(251,191,36,0.6);
  background: rgba(251,191,36,0.08);
  box-shadow: 0 0 14px rgba(251,191,36,0.2);
}
.gym-elite-pos {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(168,85,247,0.2);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.gym-elite-row.done .gym-elite-pos { background: rgba(34,197,94,0.2); color: #22c55e; }
.gym-elite-row.current .gym-elite-pos { background: rgba(251,191,36,0.2); color: #fbbf24; }
.gym-elite-avatar { width: 44px; height: 44px; flex-shrink: 0; }
.gym-elite-avatar img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.gym-elite-info { flex: 1; min-width: 0; }
.gym-elite-name { font-size: 13px; font-weight: 700; color: #f1f5f9; }
.gym-elite-type { font-size: 11px; color: #94a3b8; }
.gym-elite-status { font-size: 11px; font-weight: 700; color: #cbd5e1; white-space: nowrap; }
.gym-elite-row.done .gym-elite-status { color: #22c55e; }
.gym-elite-row.current .gym-elite-status { color: #fbbf24; }

/* ── CAMPEÓN (Rojo): panel del jefe final ── */
.gym-champion-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  text-align: center;
  color: #94a3b8;
}
.gym-champion-lock-icon { font-size: 3rem; animation: gymLeaderBob 2.6s ease-in-out infinite; }
.gym-champion-locked h3 { margin: 6px 0 0; color: #f8fafc; font-size: 1rem; }
.gym-champion-locked p { margin: 0; font-size: 0.8rem; line-height: 1.6; }
.gym-champion-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 2px solid rgba(239,68,68,0.55);
  background: linear-gradient(160deg, rgba(127,29,29,0.5), rgba(15,10,33,0.9));
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 0 30px rgba(239,68,68,0.25);
  margin-bottom: 12px;
}
.gym-champion-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(239,68,68,0.25), transparent 60%);
  animation: gym-red-vignette 3s ease-in-out infinite alternate;
  pointer-events: none;
}
.gym-champion-avatar { position: relative; }
.gym-champion-avatar img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 18px rgba(239,68,68,0.7));
  animation: gymLeaderBob 2.4s ease-in-out infinite;
}
.gym-champion-title {
  position: relative;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #ef4444;
  text-shadow: 0 0 20px rgba(239,68,68,0.8), 0 2px 0 #000;
  margin-top: 6px;
  animation: gym-red-bar-shimmer 2s linear infinite;
}
.gym-champion-sub { position: relative; font-size: 12px; color: #fecaca; margin-top: 4px; }
.gym-champion-tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.gym-champion-tag {
  font-size: 10px;
  font-weight: 700;
  color: #fecaca;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 6px;
  padding: 4px 9px;
}
.gym-champion-btn {
  width: 100%;
  padding: 13px;
  border: 2px solid #ef4444;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #7f1d1d 100%);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s ease;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 24px rgba(239,68,68,0.5);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.gym-champion-btn:hover {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
  box-shadow: 0 0 26px rgba(239,68,68,0.7);
  transform: translateY(-1px);
}
.gym-champion-btn:active { transform: translateY(1px); }

/* ── ANIMACIÓN DE ENTRADA DEL CAMPEÓN ── */
.gym-champion-entry {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gym-fade-in 0.3s ease;
}
.gym-champion-entry-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(239,68,68,0.55) 0%, rgba(20,0,0,0.95) 70%);
  animation: gym-red-vignette 1.2s ease-in-out infinite alternate;
}
.gym-champion-entry-card {
  position: relative;
  text-align: center;
  animation: gym-champ-entry-pop 0.6s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes gym-champ-entry-pop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.gym-champion-entry-avatar img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 30px rgba(239,68,68,0.9));
  animation: gymLeaderBob 1.6s ease-in-out infinite;
}
.gym-champion-entry-title {
  font-size: 14px;
  letter-spacing: 8px;
  color: #fecaca;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 10px;
}
.gym-champion-entry-name {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 10px;
  color: #ef4444;
  text-shadow: 0 0 30px rgba(239,68,68,1), 0 3px 0 #000;
  animation: gym-red-bar-shimmer 1.2s linear infinite;
}
.gym-champion-entry-sub { font-size: 13px; color: #fecaca; margin-top: 8px; }
.gym-champion-entry.gym-champion-entry-out {
  animation: gym-champ-entry-fade 0.6s ease forwards;
}
@keyframes gym-champ-entry-fade {
  to { opacity: 0; transform: scale(1.15); }
}

/* ── Líder de gimnasio en la arena (p.ej. Brock observando el combate) ── */
.gym-leader-node {
  width: 148px;
  pointer-events: none;
  z-index: 5;
}
.gym-leader-node .gym-leader-img {
  /* Igual que el sprite del ENTRENADOR (148px) y los Pokémon (136px) para
     que el líder se vea proporcionado con el resto de la arena. */
  width: 132px;
  height: 132px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.55));
  animation: gymLeaderBob 2.6s ease-in-out infinite;
}
/* PvP: el rival es un entrenador con sprite sheet 4×4 → se muestra SOLO el
   frame 1 (caminar hacia abajo) como background del NODO, igual que el avatar
   del jugador (.pc-avatar-img: background-size 400% + position 0%).
   El <img> (con la hoja completa) se oculta. */
.gym-leader-node.pvp-leader.pvp-leader-bg-on {
  background-image: var(--pvp-leader-bg, none);
  background-size: 400% 400%;
  background-position: 0% 0%;
  background-repeat: no-repeat;
  width: 148px;
  height: 148px;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.55));
}
.gym-leader-node.pvp-leader.pvp-leader-bg-on .gym-leader-img {
  opacity: 0;
  pointer-events: none;
}
@keyframes gymLeaderBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Entrada visible del Pokémon del rival en PvP: aparece con un pop (escala +
   opacidad) en vez de materializarse de golpe. */
.pvp-creature-enter {
  animation: pvpCreatureEnter 0.7s cubic-bezier(.175,.885,.32,1.275) !important;
}
@keyframes pvpCreatureEnter {
  0% { transform: translate(-50%, -50%) scale(0.15); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.gym-leader-node .gym-leader-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  background: linear-gradient(180deg, rgba(20,20,28,0.92), rgba(10,10,14,0.88));
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

/* Retrato del líder dentro del diálogo de introducción: más grande y circular */
.gym-dialogue-avatar .gym-badge-avatar {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
}

/* ═══════════ POKÉMON LEAGUE LICENSE ═══════════
 * Licencia permanente vinculada a la cuenta (Account Bound): requisito
 * oficial para acceder al contenido PvP de la Liga Pokémon. Se obtiene
 * UNA vez con las 8 medallas de Kanto. Nunca puede venderse, intercambiarse,
 * tirarse ni almacenarse. */
.gym-license-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(251,191,36,0.35);
}
.gym-license-section .gym-badges-title {
  margin-bottom: 10px;
}

/* ── Bloqueada (falta una o más medallas) ── */
.gym-license-locked {
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, rgba(30,30,40,0.75), rgba(16,16,22,0.85));
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 12px;
  padding: 12px 14px;
}
.gym-license-locked-icon {
  font-size: 26px;
  filter: grayscale(0.4);
}
.gym-license-locked-title {
  font-weight: 800;
  font-size: 14px;
  color: #94a3b8;
}
.gym-license-locked-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 6px;
}
.gym-license-badges-progress {
  font-size: 13px;
  letter-spacing: 1px;
  color: #fbbf24;
}
.gym-license-badges-progress span {
  color: #94a3b8;
  font-weight: 700;
  margin-left: 6px;
}

/* ── Lista para obtener (8 medallas completadas) ── */
.gym-license-ready {
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
  border: 1px solid rgba(251,191,36,0.5);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 0 18px rgba(251,191,36,0.18), inset 0 0 12px rgba(251,191,36,0.06);
}
.gym-license-ready-icon {
  font-size: 30px;
  animation: gymLicensePulse 1.8s ease-in-out infinite;
}
@keyframes gymLicensePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(251,191,36,0.6)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 10px rgba(251,191,36,0.9)); }
}
.gym-license-ready-title {
  font-weight: 800;
  font-size: 14px;
  color: #fbbf24;
}
.gym-license-ready-sub {
  font-size: 12px;
  color: #e2e8f0;
  opacity: 0.85;
  margin-top: 2px;
}
.gym-license-claim-btn {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
  color: #1a1206;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  border: 1px solid #fbbf24;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(251,191,36,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.gym-license-claim-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 5px 18px rgba(251,191,36,0.5);
  filter: brightness(1.08);
}
.gym-license-claim-btn:active { transform: translateY(0) scale(0.98); }
.gym-license-claim-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  filter: grayscale(0.4);
}

/* ── Tarjeta oficial de entrenador (obtenida) ── */
.gym-license-card-holder {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1e2433 0%, #141821 55%, #0d1117 100%);
  border: 1px solid rgba(251,191,36,0.55);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.gym-license-card-holder.shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-18deg);
  animation: gymLicenseSheen 3.2s ease-in-out infinite;
}
@keyframes gymLicenseSheen {
  0% { left: -120%; }
  55%, 100% { left: 140%; }
}
.gym-license-card-sheen {
  pointer-events: none;
}
.gym-license-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(251,191,36,0.25);
}
.gym-license-logo {
  font-size: 22px;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251,191,36,0.7);
}
.gym-license-brand {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fbbf24;
  line-height: 1.2;
}
.gym-license-brand span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
}
.gym-license-flag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.12);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.5px;
  animation: gymLicenseStatus 2s ease-in-out infinite;
}
@keyframes gymLicenseStatus {
  0%, 100% { box-shadow: 0 0 2px rgba(34,197,94,0.3); }
  50% { box-shadow: 0 0 10px rgba(34,197,94,0.6); }
}
.gym-license-body {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 2px 10px;
}
.gym-license-avatar {
  width: 62px;
  height: 62px;
  min-width: 62px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2b3142, #191d28);
  border: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(251,191,36,0.35);
}
.gym-license-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gym-license-avatar-fallback {
  font-size: 26px;
}
.gym-license-data {
  flex: 1;
  min-width: 0;
}
.gym-license-name {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.gym-license-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
  padding: 2px 0;
}
.gym-license-row b {
  color: #e2e8f0;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}
.gym-license-foot {
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
  text-align: center;
  border-top: 1px dashed rgba(148,163,184,0.2);
  padding-top: 8px;
}

/* ── Overlay al obtener la licencia (animación especial) ── */
.gym-license-obtained-overlay {
  position: fixed;
  inset: 0;
  z-index: 40000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,6,10,0.82);
  backdrop-filter: blur(4px);
  animation: gymLicenseOverlayIn 0.3s ease;
}
@keyframes gymLicenseOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.gym-license-obtained-burst {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.35) 0%, rgba(251,191,36,0.08) 45%, transparent 70%);
  animation: gymLicenseBurst 1.6s ease-out infinite;
  pointer-events: none;
}
@keyframes gymLicenseBurst {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}
.gym-license-obtained-card {
  position: relative;
  max-width: 430px;
  width: 90%;
  background: linear-gradient(170deg, #1f2536, #12161f);
  border: 1px solid rgba(251,191,36,0.6);
  border-radius: 18px;
  padding: 26px 26px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(251,191,36,0.25);
  overflow: hidden;
}
.gym-license-obtained-card.shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-18deg);
  animation: gymLicenseSheen 2.6s ease-in-out infinite;
}
.gym-license-obtained-icon {
  font-size: 44px;
  margin-bottom: 8px;
  animation: gymLicensePulse 1.6s ease-in-out infinite;
}
.gym-license-obtained-title {
  font-size: 24px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251,191,36,0.6);
  margin-bottom: 10px;
}
.gym-license-obtained-msg {
  font-size: 13.5px;
  line-height: 1.55;
  color: #e2e8f0;
}
.gym-license-obtained-msg b {
  color: #fbbf24;
}
.gym-license-obtained-number {
  margin: 14px auto 4px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.08);
  border-radius: 999px;
  padding: 4px 14px;
}
.gym-license-obtained-btn {
  margin-top: 16px;
  width: 100%;
  font-weight: 800;
    border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s, filter 0.15s;
}
.gym-license-obtained-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════
   MOBILE RESPONSIVE (.device-mobile) — GIMNASIOS
   ══════════════════════════════════════════════════ */
.device-mobile #win-gym-badges {
  width: min(94vw, 420px) !important;
  max-height: var(--mob-avail-h, 80vh) !important;
}
.device-mobile .gym-badges-layout {
  flex-direction: column !important;
  gap: 8px !important;
}
.device-mobile .gym-badges-column {
  width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  max-height: 48vh !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  padding-right: 0 !important;
}
.device-mobile .gym-detail-column {
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 !important;
  max-height: 52vh !important;
  padding-left: 0 !important;
}
.device-mobile .gym-tabs-bar {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 4px !important;
  padding: 4px !important;
}
.device-mobile .gym-tab-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.68rem !important;
  padding: 6px 10px !important;
}
.device-mobile .gym-regions-bar {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
}
.device-mobile .gym-region-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.65rem !important;
  padding: 4px 8px !important;
}
.device-mobile .gym-leader-card {
  padding: 6px 8px !important;
  gap: 8px !important;
}
.device-mobile .gym-leader-card-avatar {
  width: 40px !important;
  height: 40px !important;
}
.device-mobile .gym-leader-card-name {
  font-size: 0.8rem !important;
}
.device-mobile .gym-leader-card-city {
  font-size: 0.65rem !important;
}
.device-mobile .gym-elite-row {
  padding: 6px 8px !important;
  gap: 8px !important;
}
.device-mobile .gym-elite-avatar {
  width: 38px !important;
  height: 38px !important;
}
.device-mobile .gym-elite-name {
  font-size: 0.78rem !important;
}
.device-mobile .gym-license-body {
  padding: 8px !important;
}
.device-mobile .gym-license-card {
  padding: 10px 8px !important;
}
.device-mobile .gym-license-data {
  font-size: 0.68rem !important;
}
.device-mobile .gym-license-row {
  gap: 4px !important;
}
.device-mobile .gym-btn-challenge,
.device-mobile .gym-btn-rematch {
  min-height: 44px !important;
  font-size: 0.78rem !important;
}

