/* ========================================================
   BATTLEMON — TEMA POKÉMON PIXEL RPG MODERNO
======================================================== */

:root {
  --bg-main: #090d18;
  --bg-panel: #111829;
  --bg-card: #182238;
  --bg-card-hover: #21304d;
  --border-pixel: #2e4063;
  --border-highlight: #38bdf8;
  --color-primary: #ef4444;
  --color-gold: #fbbf24;
  --color-blue: #38bdf8;
  --color-green: #10b981;
  --color-purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-pixel-title: 'Press Start 2P', monospace;
  --font-pixel-ui: 'Pixelify Sans', 'Outfit', sans-serif;
  --font-clean: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-clean);
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #090e1a;
}

/* Scrollbars Customizadas no Tema Retro RPG (Pixel Dark com Trilho Azul/Ouro) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #070b14;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #1e3a6a;
  border: 1px solid #38bdf8;
  border-radius: 4px;
  box-shadow: inset 0 0 4px rgba(56, 189, 248, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
  border-color: #fbbf24;
  box-shadow: inset 0 0 6px rgba(251, 191, 36, 0.6);
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

body {
  background-color: #080c14;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* Moldura estilo RPG portátil */
.pixel-frame {
  background: var(--bg-panel);
  border: 2px solid var(--border-pixel);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.04),
    0 6px 0 rgba(0, 0, 0, 0.45);
}

/* ========================================================
   BARRA SUPERIOR COMPACTA DE JOGO (NAVBAR HUD)
======================================================== */
.navbar {
  position: relative;
  background: #0b1120;
  border-bottom: 3px solid #1e293b;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 60;
  gap: 8px;
  min-height: 52px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.pokeball-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(180deg, #ef4444 46%, #0f172a 46%, #0f172a 54%, #f8fafc 54%);
  border-radius: 50%;
  border: 2px solid #f8fafc;
  position: relative;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.pokeball-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background: white;
  border: 2px solid #0f172a;
  border-radius: 50%;
}

.pokeball-icon.animated {
  animation: floatBall 2.6s ease-in-out infinite;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-pixel-title);
  font-size: 0.85rem;
  color: var(--color-gold);
  text-shadow: 2px 2px 0 #991b1b;
  letter-spacing: 1px;
}

.brand-sub {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-blue);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-btn {
  font-family: var(--font-pixel-ui);
  background: #141e33;
  border: 2px solid #263554;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.nav-btn:hover {
  background: #1e2d4a;
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 3px 0 #78350f;
}

.badge-count {
  background: rgba(56, 189, 248, 0.18);
  color: var(--color-blue);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.currency-pill,
.streak-badge-header {
  font-family: var(--font-pixel-ui);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 2px solid #263554;
  background: #141e33;
}

.currency-pill.coins {
  border-color: rgba(251, 191, 36, 0.45);
  color: var(--color-gold);
}

.currency-pill.bp {
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.streak-badge-header {
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.btn-mic-toggle {
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.btn-mic-toggle:hover {
  background: rgba(16, 185, 129, 0.24) !important;
  border-color: #10b981 !important;
}

.btn-mic-toggle .icon-mic-on {
  color: #34d399 !important;
  display: block !important;
}

.btn-mic-toggle .icon-mic-muted {
  display: none !important;
}

.btn-mic-toggle:hover .icon-mic-on {
  color: #6ee7b7 !important;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6));
}

.btn-mic-toggle.muted {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.btn-mic-toggle.muted .icon-mic-on {
  display: none !important;
}

.btn-mic-toggle.muted .icon-mic-muted {
  display: block !important;
  color: #f87171 !important;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

.btn-mic-toggle.muted:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
}

.btn-icon {
  background: #141e33;
  border: 2px solid #263554;
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* ========================================================
   CONTAINER PRINCIPAL E TELAS (ADAPTÁVEL AO TAMANHO DA JANELA)
======================================================== */
.main-container {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(6px, 1.1vh, 14px) clamp(8px, 1.4vw, 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.screen.active {
  display: flex;
}

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

/* ========================================================
   TELA 0: TELA DE TÍTULO DE JOGO (SEM SCROLL • 100% ADAPTÁVEL)
======================================================== */
/* Preenchimento total no Menu Inicial (Full Bleed Edge-to-Edge) */
body:has(#homeScreen.active) .main-container,
body.in-home-screen .main-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
}

body:has(#homeScreen.active) #homeScreen,
body.in-home-screen #homeScreen {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* ========================================================
   TELA 0: MENU INICIAL (FUNDO TOTAL COM PADRÃO DE POKÉMONS)
======================================================== */
.game-title-screen {
  position: relative;
  flex: 1;
  height: 100vh;
  min-height: 100vh;
  width: 100vw;
  background: #080c14;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.2vh, 26px) clamp(16px, 3vw, 40px);
  gap: clamp(18px, 3.8vh, 38px);
  overflow: hidden;
}

/* Padrão de Fundo com Pokémons de Vários Tipos (Preenchendo a Tela Toda) */
.title-pokemon-pattern-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/pokemon_types_pattern.svg');
  background-repeat: repeat;
  background-size: 560px 560px;
  opacity: 0.25;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  animation: pokemonPatternDrift 80s linear infinite;
}

@keyframes pokemonPatternDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 560px 560px;
  }
}

/* Efeito sutil de iluminação ambiente (Sem fundo azul) */
.title-aurora-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 55%);
  filter: blur(25px);
  pointer-events: none;
  animation: auroraPulse 6s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0.95; transform: scale(1.04); }
}

/* Holograma azul desativado para manter o fundo limpo e com foco total no padrão */
.title-pokeball-hologram {
  display: none !important;
}

.pokeball-svg-holo {
  width: 100%;
  height: 100%;
  animation: rotateHolo 30s linear infinite;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
}

@keyframes rotateHolo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Partículas flutuantes de energia */
.ambient-sparks-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.spark {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 4px currentColor);
  animation: floatSpark 4.2s ease-in-out infinite;
}

.spark.s1 { width: 4px; height: 4px; background: #f97316; left: 8%; bottom: 12%; animation-delay: 0s; }
.spark.s2 { width: 3px; height: 3px; background: #38bdf8; left: 18%; bottom: 18%; animation-delay: 1.2s; }
.spark.s3 { width: 5px; height: 5px; background: #fbbf24; left: 26%; bottom: 8%; animation-delay: 2.1s; }
.spark.s4 { width: 3px; height: 3px; background: #c084fc; left: 34%; bottom: 14%; animation-delay: 0.6s; }
.spark.s5 { width: 4px; height: 4px; background: #f43f5e; left: 42%; bottom: 6%; animation-delay: 2.8s; }
.spark.s6 { width: 5px; height: 5px; background: #eab308; left: 50%; bottom: 16%; animation-delay: 1.7s; }
.spark.s7 { width: 3px; height: 3px; background: #06b6d4; left: 58%; bottom: 9%; animation-delay: 3.3s; }
.spark.s8 { width: 4px; height: 4px; background: #ff7849; left: 66%; bottom: 15%; animation-delay: 0.9s; }
.spark.s9 { width: 3px; height: 3px; background: #a855f7; left: 74%; bottom: 7%; animation-delay: 2.4s; }
.spark.s10 { width: 5px; height: 5px; background: #f59e0b; left: 82%; bottom: 13%; animation-delay: 1.5s; }
.spark.s11 { width: 4px; height: 4px; background: #38bdf8; left: 90%; bottom: 10%; animation-delay: 3.0s; }
.spark.s12 { width: 3px; height: 3px; background: #fb7185; left: 13%; bottom: 5%; animation-delay: 3.8s; }
.spark.s13 { width: 4px; height: 4px; background: #fde047; left: 23%; bottom: 22%; animation-delay: 0.4s; }
.spark.s14 { width: 3px; height: 3px; background: #34d399; left: 47%; bottom: 11%; animation-delay: 2.6s; }
.spark.s15 { width: 5px; height: 5px; background: #f97316; left: 62%; bottom: 6%; animation-delay: 3.7s; }
.spark.s16 { width: 4px; height: 4px; background: #818cf8; left: 71%; bottom: 20%; animation-delay: 1.1s; }
.spark.s17 { width: 3px; height: 3px; background: #f43f5e; left: 86%; bottom: 16%; animation-delay: 2.2s; }
.spark.s18 { width: 5px; height: 5px; background: #fbbf24; left: 94%; bottom: 6%; animation-delay: 0.2s; }

@keyframes floatSpark {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  25% { opacity: 0.95; }
  75% { opacity: 0.75; }
  100% { transform: translateY(-160px) scale(1.2); opacity: 0; }
}

/* ========================================================
   MASCOTES COM PEDESTAIS ELEMENTAIS & INTERATIVIDADE
======================================================== */
.mascot-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}

.mascot-wrapper:hover {
  transform: translateY(-8px) scale(1.08);
}

.mascot-wrapper:hover .title-mascot {
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.85));
}

.mascot-pedestal {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  transform: rotateX(65deg);
  pointer-events: none;
  filter: blur(2px);
  animation: pedestalPulse 2.8s ease-in-out infinite alternate;
}

@keyframes pedestalPulse {
  0% { transform: rotateX(65deg) scale(0.92); opacity: 0.6; }
  100% { transform: rotateX(65deg) scale(1.06); opacity: 0.95; }
}

.fire-pedestal {
  width: clamp(90px, 18vh, 160px);
  height: clamp(28px, 6vh, 48px);
  background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.75) 0%, rgba(220, 38, 38, 0.4) 60%, transparent 80%);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.6);
}

.aura-pedestal {
  width: clamp(90px, 18vh, 150px);
  height: clamp(28px, 6vh, 46px);
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.75) 0%, rgba(37, 99, 235, 0.4) 60%, transparent 80%);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

.electric-pedestal {
  width: clamp(65px, 12vh, 110px);
  height: clamp(20px, 4vh, 36px);
  background: radial-gradient(ellipse at center, rgba(250, 204, 21, 0.7) 0%, rgba(234, 179, 8, 0.35) 60%, transparent 80%);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.5);
}

.ghost-pedestal {
  width: clamp(65px, 12vh, 110px);
  height: clamp(20px, 4vh, 36px);
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.7) 0%, rgba(126, 34, 206, 0.35) 60%, transparent 80%);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.left-mascot-wrapper {
  left: 3%;
  bottom: 5%;
  animation: mascotFloat 3.6s ease-in-out infinite;
}

.right-mascot-wrapper {
  right: 3%;
  bottom: 5%;
  animation: mascotFloat 3.8s ease-in-out infinite 0.5s;
}

.sub-left-mascot-wrapper {
  left: 13%;
  top: 9%;
  animation: mascotFloat 3.2s ease-in-out infinite 0.2s;
}

.sub-right-mascot-wrapper {
  right: 13%;
  top: 9%;
  animation: mascotFloat 3.4s ease-in-out infinite 0.7s;
}

.title-mascot {
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.75));
  transition: filter 0.2s ease;
}

.left-mascot {
  width: clamp(100px, 22vh, 190px);
  height: clamp(100px, 22vh, 190px);
}

.right-mascot {
  width: clamp(95px, 21vh, 180px);
  height: clamp(95px, 21vh, 180px);
}

.sub-left-mascot {
  width: clamp(60px, 12vh, 105px);
  height: clamp(60px, 12vh, 105px);
  opacity: 0.9;
}

.sub-right-mascot {
  width: clamp(64px, 12.5vh, 110px);
  height: clamp(64px, 12.5vh, 110px);
  opacity: 0.9;
}

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

@media (max-width: 980px) {
  .sub-left-mascot-wrapper, .sub-right-mascot-wrapper {
    display: none;
  }
  .left-mascot-wrapper, .right-mascot-wrapper {
    opacity: 0.35;
  }
}

/* ========================================================
   LOGO PRINCIPAL BATTLEMON
======================================================== */
.title-logo-block {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1vh, 8px);
}

.title-badge-top {
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.6rem, 1.2vh, 0.72rem);
  font-weight: 800;
  letter-spacing: 2px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 2px 10px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.battlemon-pixel-logo {
  font-family: var(--font-pixel-title);
  font-size: clamp(3.2rem, 8.5vh, 5.4rem);
  color: #fbbf24;
  text-shadow:
    0 4px 0 #b45309,
    0 8px 0 #78350f,
    0 12px 0 #451a03,
    0 16px 28px rgba(0, 0, 0, 0.95);
  letter-spacing: 5px;
  line-height: 1.05;
  margin: 0;
  text-align: center;
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.35));
}

.battlemon-random-sublogo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel-title);
  font-size: clamp(0.85rem, 1.8vh, 1.15rem);
  color: #ffedd5;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(194, 65, 12, 0.9) 50%, rgba(15, 23, 42, 0.96) 100%);
  border: 2px solid #ea580c;
  border-radius: 8px;
  padding: clamp(3px, 0.7vh, 6px) clamp(16px, 2vw, 24px);
  letter-spacing: 6px;
  text-shadow: 0 2px 0 #0f172a, 0 0 12px rgba(249, 115, 22, 0.8);
  box-shadow: 0 4px 0 #7c2d12, 0 0 22px rgba(249, 115, 22, 0.4);
  margin: 0;
}

.battlemon-random-sublogo .random-spark {
  color: #fbbf24;
  font-size: 0.85em;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.9);
}

/* Rodapé Centralizado do Menu Inicial */
.title-footer-tagline {
  position: absolute;
  bottom: clamp(10px, 1.8vh, 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.65rem, 1.2vh, 0.76rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  opacity: 0.85;
}

/* Versão no Rodapé à Esquerda do Menu Inicial */
.title-footer-version {
  position: absolute;
  bottom: clamp(10px, 1.8vh, 18px);
  left: clamp(16px, 2.5vw, 32px);
  z-index: 6;
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.68rem, 1.25vh, 0.8rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.85;
}

.title-tagline {
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.65rem, 1.2vh, 0.74rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 2px;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ========================================================
   TERMINAL PRINCIPAL: BOTÃO JOGAR HEROICO & DESTACADO
======================================================== */
.title-play-wrapper {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vh, 14px);
  width: 100%;
  max-width: 500px;
}

.btn-hero-play {
  position: relative;
  width: 100%;
  min-height: clamp(68px, 10.5vh, 92px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 20px);
  padding: clamp(12px, 1.8vh, 18px) clamp(18px, 2.5vw, 28px);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  box-shadow:
    0 0 28px rgba(245, 158, 11, 0.35),
    0 14px 32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(251, 191, 36, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Anel de brilho pulsante */
.btn-hero-play .play-btn-glow-ring {
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.6), rgba(239, 68, 68, 0.5), rgba(56, 189, 248, 0.4), rgba(245, 158, 11, 0.6));
  z-index: 0;
  opacity: 0.6;
  filter: blur(8px);
  pointer-events: none;
  animation: playRingPulse 4s linear infinite;
}

@keyframes playRingPulse {
  0% { transform: scale(0.98); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 0.85; }
  100% { transform: scale(0.98); opacity: 0.5; }
}

/* Sweep de luz sobre o botão */
.play-btn-shine-sweep {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 1;
  animation: playSweepIdle 5s ease-in-out infinite;
}

@keyframes playSweepIdle {
  0%, 70% { left: -120%; }
  100% { left: 160%; }
}

/* Ícone com Pokébola Grande */
.play-btn-icon-block {
  position: relative;
  z-index: 2;
  width: clamp(44px, 6.5vh, 58px);
  height: clamp(44px, 6.5vh, 58px);
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-pokeball-svg {
  width: 82%;
  height: 82%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

/* Textos do Botão */
.play-btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.play-btn-badge {
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.6rem, 1.1vh, 0.72rem);
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.play-btn-main {
  font-family: var(--font-pixel-title);
  font-size: clamp(1.4rem, 3vh, 2rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 4px;
  line-height: 1.1;
  text-shadow:
    0 2px 0 #b45309,
    0 4px 0 #78350f,
    0 6px 14px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(251, 191, 36, 0.5);
  transition: all 0.2s ease;
}

.play-btn-desc {
  font-size: clamp(0.68rem, 1.2vh, 0.76rem);
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Seta de Ação */
.play-btn-action {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.play-arrow-pill {
  width: clamp(34px, 4.5vh, 42px);
  height: clamp(34px, 4.5vh, 42px);
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5vh, 1.05rem);
  font-weight: 900;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Estados Hover e Active */
.btn-hero-play:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #fbbf24;
  background: linear-gradient(135deg, #243552 0%, #131e36 100%);
  box-shadow:
    0 0 42px rgba(245, 158, 11, 0.65),
    0 20px 40px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-hero-play:hover .play-btn-icon-block {
  transform: scale(1.15) rotate(-10deg);
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.55);
}

.btn-hero-play:hover .play-pokeball-svg {
  transform: rotate(35deg);
}

.btn-hero-play:hover .play-btn-main {
  color: #fef08a;
  letter-spacing: 5px;
  text-shadow:
    0 2px 0 #d97706,
    0 4px 0 #92400e,
    0 8px 20px rgba(245, 158, 11, 0.8);
}

.btn-hero-play:hover .play-arrow-pill {
  transform: scale(1.16) translateX(3px);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.8);
}

.btn-hero-play:active {
  transform: translateY(2px) scale(0.99);
  box-shadow:
    0 0 20px rgba(245, 158, 11, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.8);
}

/* Barra de Resumo da Carreira */
.title-career-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  color: #cbd5e1;
}

.title-career-summary strong {
  color: #fbbf24;
  font-weight: 800;
}

.summary-sep {
  color: #475569;
}

/* ========================================================
   TOOLTIP TÁTICO FLUTUANTE (ESTILO CLEAN & OTIMIZADO)
======================================================== */
.poke-tooltip {
  position: fixed;
  width: 310px;
  background: rgba(10, 15, 28, 0.97);
  border: 2px solid var(--color-gold);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.85);
  padding: 10px 12px;
  z-index: 999;
  pointer-events: none;
  color: var(--text-main);
  font-size: 0.74rem;
}

.tt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.tt-header img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 2px;
}

.tt-title-col {
  flex: 1;
}

.tt-num-bst {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-blue);
}

.tt-shiny-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tt-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.96rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  margin: 1px 0 3px;
}

.tt-types-row {
  display: flex;
  gap: 4px;
}

.tt-role-box {
  background: rgba(24, 34, 56, 0.9);
  border-left: 3px solid var(--color-gold);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 7px;
}

.tt-role-title {
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--color-gold);
  margin-bottom: 2px;
}

.tt-role-fit {
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 3px;
}

.tt-role-desc {
  font-size: 0.7rem;
  color: #cbd5e1;
  line-height: 1.3;
}

.tt-stats-mini {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 7px;
  text-align: center;
}

.tt-stat-cell span {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 700;
}

.tt-stat-cell strong {
  font-size: 0.76rem;
  color: #f8fafc;
}

.tt-matchup-group {
  margin-bottom: 6px;
}

.tt-matchup-group:last-child {
  margin-bottom: 0;
}

.tt-group-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.tt-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tt-type-chip {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ========================================================
   TOOLTIP GENÉRICO FLUTUANTE (ITENS, RELÍQUIAS, INSÍGNIAS, GOLPES)
   Segue rigorosamente o padrão visual do Tooltip dos Pokémons
======================================================== */
.generic-tooltip {
  position: fixed;
  width: 270px;
  background: rgba(10, 15, 28, 0.98);
  border: 2px solid var(--color-gold);
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.88);
  padding: 9px 11px;
  z-index: 1000;
  pointer-events: none;
  color: var(--text-main);
  font-size: 0.78rem;
  transition: opacity 0.12s ease;
}

.gt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.gt-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.gt-icon-box.badge-box {
  padding: 5px;
}

.gt-icon-box svg {
  width: 100%;
  height: 100%;
}

.gt-title-col {
  flex: 1;
  min-width: 0;
}

.gt-category-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 2px;
}

.gt-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.gt-body-box {
  background: rgba(24, 34, 56, 0.9);
  border-left: 3px solid var(--color-gold);
  border-radius: 6px;
  padding: 7px 9px;
  margin-bottom: 6px;
}

.gt-body-title {
  font-weight: 800;
  font-size: 0.76rem;
  color: var(--color-gold);
  margin-bottom: 3px;
}

.gt-body-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.gt-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
}

/* ========================================================
   TELA 1: CENTRAL DA POKÉTOWER (ESQUADRÃO + MOCHILA NA ESQUERDA)
======================================================== */
.tower-hub-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(270px, 28%) 1fr minmax(250px, 26%);
  gap: clamp(10px, 1.2vw, 16px);
  align-items: stretch;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .tower-hub-layout {
    grid-template-columns: 1fr 1fr;
    overflow-y: auto;
  }
  .tower-squad-shop-panel {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .tower-hub-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .tower-squad-shop-panel {
    grid-column: span 1;
  }
}

.tower-squad-shop-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 12px);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.squad-status-box {
  padding: clamp(10px, 1.4vh, 14px);
  flex-shrink: 0;
}

/* Mochila de Itens da Run (Embaixo do Esquadrão Ativo) */
.backpack-status-box {
  padding: clamp(10px, 1.4vh, 14px);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.backpack-count-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-gold);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}

.tower-backpack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 2px;
}

.backpack-slot {
  background: #0f172a;
  border: 2px solid #233352;
  border-radius: 7px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.14s ease;
  position: relative;
  min-height: 48px;
}

.backpack-slot.has-item {
  background: #141f36;
  border-color: #2e436d;
}

.backpack-slot.has-item:hover {
  border-color: var(--color-blue);
  background: #1a2a4a;
  transform: translateY(-1px);
}

.backpack-slot.empty {
  border: 2px dashed #1e293b;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0.65;
  justify-content: center;
}

.backpack-slot-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.backpack-slot-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.backpack-slot-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backpack-slot-qty {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-gold);
}

.backpack-slot-empty-text {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  color: #475569;
  letter-spacing: 0.5px;
}

/* Abas da Mochila: Itens vs Insígnias */
.backpack-tabs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex-shrink: 0;
}

.backpack-tab-btn {
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 6px;
  border: 2px solid #233352;
  background: #0f172a;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.14s ease;
}

.backpack-tab-btn:hover {
  background: #16223b;
  color: #e2e8f0;
}

.backpack-tab-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 2px 0 #78350f;
}

.bp-tab-badge-count {
  font-size: 0.62rem;
  background: rgba(251, 191, 36, 0.16);
  color: var(--color-gold);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 900;
}

.backpack-tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.backpack-tab-pane.active {
  display: flex;
}

/* Grade de 10 Quadradinhos das Insígnias (5x2) */
.tower-badges-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 2px;
  align-content: start;
}

.badge-slot-square {
  aspect-ratio: 1 / 1;
  background: #0b1324;
  border: 2px solid #1e2d4a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 6px;
  box-sizing: border-box;
}

.badge-slot-square.locked {
  border: 2px dashed #1e293b;
  background: rgba(11, 18, 34, 0.55);
}

.badge-slot-square.locked .badge-svg-wrap {
  opacity: 0.16;
  filter: grayscale(1);
}

.badge-slot-square.unlocked {
  background: radial-gradient(circle at 50% 50%, var(--badge-glow-soft, rgba(251, 191, 36, 0.2)) 0%, #0d1629 76%);
  border-color: var(--badge-border, rgba(251, 191, 36, 0.55));
  box-shadow:
    0 0 7px var(--badge-shadow, rgba(251, 191, 36, 0.18)),
    inset 0 0 6px var(--badge-inner, rgba(251, 191, 36, 0.14));
}

.badge-slot-square:hover {
  transform: translateY(-2px);
}

.badge-slot-square.unlocked:hover {
  box-shadow:
    0 0 10px var(--badge-shadow-hover, rgba(251, 191, 36, 0.32)),
    inset 0 0 8px var(--badge-inner, rgba(251, 191, 36, 0.22));
}

.badge-svg-wrap {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease;
}

.badge-slot-square.unlocked .badge-svg-wrap {
  filter: drop-shadow(0 0 3px var(--badge-shadow, rgba(251, 191, 36, 0.35)));
}

.badge-slot-square.unlocked:hover .badge-svg-wrap {
  transform: scale(1.08);
}

.badge-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.badge-floor-pip {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-family: var(--font-pixel-ui);
  font-size: 0.52rem;
  font-weight: 800;
  color: #475569;
  pointer-events: none;
  line-height: 1;
}

.badge-slot-square.unlocked .badge-floor-pip {
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.badge-inspector-bar {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #1e2d4a;
  border-radius: 6px;
  padding: 5px 8px;
  font-family: var(--font-pixel-ui);
  font-size: 0.67rem;
  color: #cbd5e1;
  line-height: 1.3;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Destaque de Nova Insígnia Conquistada no Modal de Vitória */
.victory-badge-unlock-card {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid var(--badge-border, #fbbf24);
  background: radial-gradient(circle at 20% 50%, var(--badge-glow-soft, rgba(251, 191, 36, 0.22)) 0%, rgba(15, 23, 42, 0.92) 80%);
  box-shadow: 0 0 10px var(--badge-shadow, rgba(251, 191, 36, 0.22));
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.victory-badge-unlock-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.victory-badge-unlock-icon svg {
  width: 100%;
  height: 100%;
}

.victory-badge-unlock-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.victory-badge-unlock-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.56rem;
  color: #fde047;
  letter-spacing: 0.5px;
}

.victory-badge-unlock-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 900;
  color: #ffffff;
}

.tower-map-panel {
  padding: clamp(8px, 1.1vh, 13px);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tower-challenger-panel {
  padding: clamp(10px, 1.4vh, 16px);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tower-map-header-row {
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 7px;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-pixel-ui);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-gold);
}

.tower-map-title-horizontal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  white-space: nowrap;
  margin: 0;
  line-height: 1.1;
}

.panel-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.select-sector-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  color: var(--color-blue);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 122px;
}

.tower-overall-progress {
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 6px 9px;
  margin-bottom: 7px;
  flex-shrink: 0;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.progress-track-outer {
  height: 6px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
}

.progress-track-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0.01);
  transform-origin: left center;
  transition: transform 0.3s ease-out;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #ef4444);
}

.tower-floors-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.floor-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  border-radius: 6px;
  padding: 2px 8px;
  flex: 1;
  min-height: 0;
  cursor: pointer;
  transition: all 0.15s;
}

.floor-node-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-blue);
}

.floor-node-item.current-floor {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
}

.floor-node-item.cleared-floor {
  background: rgba(30, 41, 59, 0.45);
  border-color: #334155;
  opacity: 0.60;
  filter: grayscale(0.9);
  transition: opacity 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.floor-node-item.cleared-floor:hover {
  opacity: 0.90;
  filter: grayscale(0.2);
  background: rgba(51, 65, 85, 0.55);
}

.floor-node-item.cleared-floor .floor-num-badge {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.floor-node-item.cleared-floor .floor-trainer-name {
  color: #94a3b8;
}

.floor-node-item.inspected-floor {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
}

.floor-node-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.floor-num-badge {
  min-width: 36px;
  text-align: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.floor-trainer-name {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floor-trainer-sub {
  font-size: 0.64rem;
  color: var(--text-muted);
  line-height: 1.1;
}

.floor-status-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.floor-status-tag.done { background: rgba(71, 85, 105, 0.4); color: #94a3b8; border: 1px solid #475569; }
.floor-status-tag.now { background: #ef4444; color: white; }
.floor-status-tag.boss { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }

/* Cartão do Desafiante */
.challenger-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.challenger-sector-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 7px;
  background: #172554;
  border: 1px solid #3b82f6;
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 700;
}

.rank-pill {
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
}

.challenger-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trainer-avatar-frame {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  background: #0b1120;
  border: 2px solid var(--color-gold);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.trainer-avatar-frame img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  image-rendering: pixelated;
}

.challenger-floor-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-gold);
}

.challenger-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.5rem;
  font-weight: 800;
}

.challenger-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.challenger-quote {
  background: #0b1120;
  border-left: 4px solid var(--color-gold);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.84rem;
  font-style: italic;
  color: #cbd5e1;
}

.section-mini-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.challenger-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}

.enemy-preview-poke {
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.enemy-preview-poke:hover {
  border-color: var(--color-gold);
}

.enemy-preview-poke.enemy-poke-unknown {
  background: rgba(15, 23, 42, 0.75);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  cursor: help;
}

.enemy-preview-poke.enemy-poke-unknown:hover {
  border-color: var(--color-gold);
  background: rgba(24, 34, 56, 0.9);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.mystery-poke-box {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mystery-q-mark {
  font-family: var(--font-pixel-ui);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  user-select: none;
}

.mystery-hint-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.enemy-preview-poke img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
}

.enemy-preview-poke .ep-name {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: capitalize;
  margin-top: 3px;
}

.enemy-preview-poke .ep-bst {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.challenger-rewards-row {
  display: flex;
  gap: 10px;
}

.reward-tag {
  flex: 1;
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.reward-tag strong {
  color: var(--color-gold);
}

.challenger-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-tower-fight {
  font-family: var(--font-pixel-ui);
  width: 100%;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  border: 2px solid #fca5a5;
  padding: 13px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #7f1d1d;
}

.btn-tower-fight:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.challenger-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-sub-tower {
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  color: #e2e8f0;
  padding: 9px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.tower-squad-shop-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.btn-pokecenter {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.lobby-squad-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lobby-squad-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 7px 10px;
}

.lobby-squad-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.lsc-info {
  flex: 1;
}

.lsc-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}

.lsc-name {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lsc-lvl {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-gold);
}

.lsc-hp-bar {
  height: 6px;
  background: #0b1120;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}

.lsc-hp-fill {
  height: 100%;
  background: #10b981;
}

.lsc-hp-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.shop-tab-headers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.shop-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  color: var(--text-muted);
  padding: 7px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.shop-tab-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.shop-tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.shop-tab-content.active {
  display: flex;
  flex-direction: column;
}

.shop-items-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.shop-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 64px;
  max-height: 64px;
  box-sizing: border-box;
  transition: all 0.12s ease;
}

.shop-item-row:hover {
  border-color: #3b82f6;
  background: #1e2c47;
}

.shop-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.shop-item-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.shop-item-title {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.shop-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 95px;
  flex-shrink: 0;
}

.owned-qty-badge {
  font-size: 0.65rem;
  color: var(--color-blue);
  font-weight: 700;
}

.btn-buy-shop {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-buy-shop.bp-btn {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  color: #c084fc;
}

.btn-buy-shop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================
   TELA 2: CRIAÇÃO DE ESQUADRÃO CLEAN E OTIMIZADA (#squadScreen)
======================================================== */
#squadScreen {
  gap: clamp(6px, 1vh, 10px);
}

/* ========================================================
   SQUAD SCREEN: LAYOUT DIVIDIDO (ESQUERDA PICKER | DIREITA 3 RETÂNGULOS)
======================================================== */
.squad-split-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 960px) {
  .squad-split-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.squad-left-picker {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.picker-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.picker-panel-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
}

.squad-right-slots-col {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.squad-right-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.squad-right-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.squad-right-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pixel-secondary {
  font-family: var(--font-pixel-ui);
  background: #1e293b;
  border: 2px solid #475569;
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-pixel-secondary:hover {
  border-color: var(--color-blue);
}

.btn-pixel-primary {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 2px solid #fca5a5;
  color: white;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #7f1d1d;
  transition: all 0.12s;
}

.btn-pixel-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.squad-vertical-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

/* O Retângulo Vertical de Cada Slot - Preenche o espaço uniformemente (sem espaço vazio abaixo) */
.squad-slot-rect {
  background: #0b1120;
  border: 2px solid #263554;
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
  flex: 1; /* Preenche o espaço vertical uniformemente */
  min-height: 112px;
}

.squad-slot-rect:hover {
  border-color: #475569;
}

.squad-slot-rect.active-slot {
  background: #121e38;
  border-color: var(--color-gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22);
}

.squad-slot-rect.locked-slot {
  border-color: #ef4444;
}

.slot-rect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 3px;
  flex-shrink: 0;
}

.slot-rect-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.6rem;
  color: var(--color-gold);
  letter-spacing: 1px;
}

.active-slot-pill {
  font-family: var(--font-pixel-ui);
  font-size: 0.65rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.slot-rect-main {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.slot-poke-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.slot-poke-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 2px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s;
}

.slot-poke-img:hover {
  transform: scale(1.08);
}

.slot-poke-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.slot-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.slot-poke-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 115px;
}

.slot-poke-lvl {
  font-size: 0.68rem;
  color: var(--color-gold);
  font-weight: 700;
  flex-shrink: 0;
}

.slot-types-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.slot-role-badge {
  font-family: var(--font-pixel-ui);
  font-size: 0.60rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.35;
  box-sizing: border-box;
}

.slot-quick-btns {
  display: flex;
  gap: 4px;
  margin-top: 1px;
}

.btn-slot-mini {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.64rem;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-slot-mini.shiny-active {
  background: rgba(251, 191, 36, 0.2);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Área dos 4 Golpes dentro do Retângulo */
.slot-moves-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  height: 100%;
}

.slot-moves-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.slot-move-card {
  background: #141d30;
  border: 1px solid #283756;
  border-radius: 6px;
  padding: 4px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.12s ease;
  cursor: pointer;
}

.slot-move-card:hover {
  border-color: #38bdf8;
  background: #1a2742;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.move-card-top {
  display: flex;
  align-items: center;
  gap: 4px;
}

.move-type-pill {
  font-size: 0.54rem;
  font-weight: 800;
  color: white;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.btn-select-move,
.btn-cycle-move {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.12s;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

.btn-select-move:hover,
.btn-cycle-move:hover {
  background: #38bdf8;
  color: #0b1120;
}

.move-name-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
}

.move-arrow-icon {
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: transform 0.12s;
}

.btn-select-move:hover .move-arrow-icon,
.slot-move-card:hover .move-arrow-icon {
  transform: translateX(2px);
}

.move-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  color: var(--text-muted);
}

/* Modal de Seleção de Ataque (Move Picker) */
.move-picker-dialog {
  max-width: 680px;
  width: 95%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #0d1526;
  border: 3px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.35);
  overflow: hidden;
}

.move-picker-current-bar {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid #1e293b;
  padding: 8px 16px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.move-picker-current-bar strong {
  color: var(--color-gold);
}

.move-picker-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid #1e293b;
  background: #0a0f1d;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.mp-tab {
  font-family: var(--font-pixel-ui);
  background: #141d30;
  border: 1px solid #283756;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.mp-tab:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.mp-tab.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.move-picker-body {
  padding: 12px 16px;
  overflow-y: auto;
  max-height: 56vh;
  flex: 1;
  min-height: 0;
}

.move-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.move-picker-card {
  background: #121c32;
  border: 2px solid #223252;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.14s ease;
  position: relative;
}

.move-picker-card:hover {
  border-color: #38bdf8;
  background: #172646;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.move-picker-card.is-current {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  cursor: default;
}

.move-picker-card.is-equipped-elsewhere {
  border-color: #64748b;
  opacity: 0.8;
}

.mp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-move-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.86rem;
  font-weight: 800;
  color: #f8fafc;
}

.mp-category-pill {
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
}

.mp-card-stats {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.mp-stat-power {
  color: #f59e0b;
}

.mp-card-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

.mp-card-action {
  margin-top: 2px;
  display: flex;
  justify-content: flex-end;
}

.btn-equip-move {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid #60a5fa;
  color: white;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-equip-move:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.mp-status-tag {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-status-tag.current {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.mp-status-tag.elsewhere {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid #f59e0b;
}

/* Sinergia do Trio - Barra Fixa e Dividida 50/50 com Navegacao por Seta e Alinhamento Perfeito */
.squad-synergy-strip {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  box-sizing: border-box;
  background: rgba(11, 17, 32, 0.95);
  border: 1px solid #263554;
  border-radius: 10px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.synergy-col {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.synergy-col-forte {
  min-width: 0;
}

.synergy-col-fraco {
  min-width: 0;
}

.synergy-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  align-self: center;
}

.synergy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-family: var(--font-pixel-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.synergy-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.synergy-badge-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

.fraco-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.fraco-badge.is-safe {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.synergy-icons-track {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 2px;
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.synergy-icons-track::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.synergy-emoji-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--chip-color, rgba(255, 255, 255, 0.2));
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  position: relative;
}

.synergy-emoji-chip:hover {
  transform: translateY(-2px) scale(1.15);
  box-shadow: 0 0 8px var(--chip-color, rgba(255, 255, 255, 0.4));
  filter: brightness(1.2);
  z-index: 2;
}

.synergy-emoji-chip.danger-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 42px;
  height: 26px;
  padding: 0 6px;
  gap: 3px;
  box-sizing: border-box;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  animation: dangerPulse 2.5s infinite;
  cursor: pointer;
}

.danger-chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

@keyframes dangerPulse {
  0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { border-color: #f87171; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
}

.synergy-safe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  box-sizing: border-box;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.5px;
  line-height: 1;
  cursor: help;
}

.synergy-safe-badge .safe-icon,
.synergy-safe-badge .safe-txt,
.synergy-safe-badge .safe-sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.synergy-empty-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  line-height: 1;
  color: #64748b;
  font-size: 0.72rem;
  padding: 0 4px;
}

.btn-synergy-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  min-width: 22px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 0.65rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1;
}

.btn-synergy-scroll:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.btn-synergy-scroll:active {
  transform: scale(0.92);
}

.synergy-col-forte .btn-synergy-scroll:hover {
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.synergy-col-fraco .btn-synergy-scroll:hover {
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Popup Pequeno Flutuante de Sinergia (Vantagens e Desvantagens) */
.synergy-mini-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  width: max-content;
  max-width: 250px;
  min-width: 170px;
  background: rgba(10, 16, 30, 0.98);
  border: 1px solid var(--smp-border, #3b82f6);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
  font-family: var(--font-main, sans-serif);
  font-size: 0.74rem;
  line-height: 1.35;
  user-select: none;
  box-sizing: border-box;
  animation: smpFadeIn 0.1s ease-out;
}

@keyframes smpFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(2px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.smp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.smp-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.smp-title {
  font-family: var(--font-pixel-ui, monospace);
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1;
}

.smp-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.3px;
}

.smp-badge.advantage {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.smp-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.smp-badge.safe {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.smp-badge.nav {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.smp-desc {
  color: #cbd5e1;
  font-size: 0.72rem;
  line-height: 1.35;
}

.smp-desc strong {
  color: #f8fafc;
}

.smp-extra {
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.67rem;
  color: #94a3b8;
  line-height: 1.3;
}

.smp-extra .extra-highlight {
  color: #fbbf24;
  font-weight: 700;
}

.clean-picker-panel,
.pokedex-clean-wrapper {
  padding: clamp(14px, 2vh, 22px) 20px 24px;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vh, 16px);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.pokedex-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.pokedex-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clean-section-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--color-gold);
  margin: 0;
  letter-spacing: 1px;
  line-height: 1.1;
}

.clean-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.search-input-wrapper {
  flex: 2;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
}

.search-bar-modern {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: #0b1120;
  border: 2px solid var(--border-pixel);
  border-radius: 7px;
  color: white;
  font-size: 0.84rem;
  outline: none;
}

.search-bar-modern:focus {
  border-color: var(--color-blue);
}

.select-gen-modern {
  flex: 1;
  min-width: 170px;
  padding: 8px 12px;
  background: #0b1120;
  border: 2px solid var(--border-pixel);
  border-radius: 7px;
  color: var(--color-gold);
  font-weight: 700;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.type-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  overflow: hidden;
  padding-bottom: 2px;
  margin-bottom: 6px;
  flex-shrink: 0;
  align-items: center;
}

.type-filter-pill {
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.type-filter-pill.active {
  color: white;
  border-color: white;
  font-weight: 800;
}

.roster-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  flex-shrink: 0;
}

.pokedex-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roster-counter-badge {
  color: var(--color-blue);
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.78rem;
}

.roster-counter-badge.shiny-counter-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.scroll-helper {
  color: var(--text-muted);
}

/* Grade Clean de Pokémons (Esquadrão e Pokédex) — adapta-se à altura da janela */
.clean-poke-grid,
.pokedex-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.pokedex-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.pokeidle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-pixel);
  border-radius: 8px;
  padding: 6px 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: all 0.14s;
}

.pokeidle-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.pokeidle-card.in-squad {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.pokeidle-card.in-squad::after {
  content: 'TIME';
  position: absolute;
  top: 3px;
  right: 3px;
  background: #10b981;
  color: #052e16;
  font-size: 0.5rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 2;
}

.card-shiny-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.55rem;
  padding: 0 3px;
  color: #fbbf24;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  z-index: 2;
  line-height: 1.2;
}

.pokeidle-card.has-shiny {
  border-color: rgba(245, 158, 11, 0.35);
}

.pokeidle-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
}

.card-num {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}

.card-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: capitalize;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 1px;
}

.card-mini-types {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.mini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.type-badge-container {
  display: flex;
  gap: 4px;
}

.type-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
}

/* ========================================================
   TELA 4: ARENA DE COMBATE (MEU POKÉMON NA ESQUERDA | INIMIGO NA DIREITA)
======================================================== */
.battle-arena-card {
  padding: clamp(8px, 1.3vh, 14px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.1vh, 12px);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.arena-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  border-bottom: 2px solid var(--border-pixel);
  padding-bottom: 6px;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.arena-match-info {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.arena-badge-mode {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid #34d399;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.arena-round-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.6px;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 5px 14px;
  border-radius: 9999px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.arena-round-tag::before {
  content: '🗼';
  font-size: 0.95rem;
}

.arena-trainer-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(4, 120, 87, 0.95) 100%);
  border: 1.5px solid #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  color: #ecfdf5;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.arena-trainer-pill img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}

.arena-quick-controls {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-speed-toggle {
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-speed-toggle strong { color: var(--color-blue); }

.btn-flee-arena {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 1.5px solid #ef4444;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-flee-arena:hover {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border-color: #fca5a5;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.75);
  transform: translateY(-1px);
}

/* PALCO DO DUELO DIVIDIDO EM: ESQUERDA (MEU POKÉMON) | CENTRO (VS) | DIREITA (INIMIGO) */
.duel-stage {
  flex: 1;
  min-height: 0;
  background-color: #0b132b;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  border-radius: 10px;
  border: 2px solid #334155;
  padding: clamp(10px, 1.8vh, 18px) clamp(14px, 2vw, 24px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-image 0.4s ease-in-out;
  contain: content;
}

.duel-sides-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 14px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

@media (max-width: 820px) {
  .duel-sides-grid {
    grid-template-columns: 1fr;
  }
  .battle-vs-center {
    display: none;
  }
}

.battle-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
}

/* Lado Esquerdo: Informações do MEU Pokémon no Topo e Sprite na Base */
.player-side-left {
  align-items: flex-start;
}

/* Lado Direito: Pokémon Inimigo no Topo e Informações na Base */
.enemy-side-right {
  align-items: flex-end;
  justify-content: space-between;
}

.enemy-side-right .enemy-pedestal {
  margin-right: 16px;
  margin-top: 2px;
}

.enemy-side-right .enemy-hud {
  margin-bottom: 2px;
}

.battle-vs-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-pixel-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.9rem;
  color: var(--color-gold);
  background: rgba(11, 17, 32, 0.85);
  border: 2px solid var(--color-gold);
  padding: 8px 10px;
  border-radius: 8px;
  text-shadow: 2px 2px 0 #7f1d1d;
}

.pokeidle-hud-card {
  background: rgba(11, 16, 28, 0.94);
  border: 2px solid #334155;
  border-radius: 9px;
  padding: clamp(7px, 1.1vh, 10px) 12px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45);
}

.player-hud {
  border-left: 4px solid #10b981;
}

.enemy-hud {
  border-right: 4px solid #ef4444;
}

.hud-trainer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-trainer-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 800;
  color: #fca5a5;
  text-transform: uppercase;
}

.hud-trainer-tag.player-tag {
  color: #10b981;
}

.team-pokeballs-row {
  display: flex;
  gap: 4px;
}

.pokeball-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 50%, #f8fafc 50%);
  border: 1px solid #0f172a;
}

.pokeball-dot.fainted {
  background: #334155;
  opacity: 0.4;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.hud-name-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-pokemon-name {
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  font-size: 1.02rem;
}

.status-pill {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  color: white;
}

.status-pill.brn { background: #ef4444; }
.status-pill.psn { background: #a855f7; }
.status-pill.par { background: #eab308; color: #0f172a; }

.hud-level-pill {
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-gold);
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.hud-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  gap: 6px;
}

.buff-pills-row {
  display: flex;
  gap: 3px;
}

.buff-tag {
  font-size: 0.6rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 1px 5px;
  border-radius: 3px;
}

.hud-hp-track {
  width: 100%;
  height: 10px;
  background: #1e293b;
  border: 1px solid #0f172a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 3px;
}

.hud-hp-progress {
  height: 100%;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: transform 0.35s ease-out, background 0.35s;
  will-change: transform;
}

.hud-hp-numbers {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.stadium-pedestal {
  width: clamp(180px, 22vw, 280px);
  height: clamp(115px, 18vh, 180px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.player-pedestal {
  margin-left: 14px;
  margin-bottom: 8px;
}

.enemy-pedestal {
  margin-right: 20px;
  margin-top: 6px;
}

/* ============================================================================
   PLATAFORMA / BASE DE BATALHA 3D (ESTILO POKÉMON OFICIAL)
============================================================================ */
.pokemon-battle-base {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 48px;
  z-index: 1;
  pointer-events: none;
}

.player-base {
  width: 92%;
  height: 50px;
}

.enemy-base {
  width: 86%;
  height: 46px;
}

/* Sombra de projeção suave e centrada no chão */
.base-shadow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 24px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.32) 48%, transparent 74%);
  border-radius: 50%;
  filter: blur(4px);
  z-index: 1;
}

.player-base .base-shadow {
  bottom: -6px;
  width: 92%;
  height: 24px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.30) 48%, transparent 75%);
  filter: blur(4px);
}

/* Borda cilíndrica 3D (espessura do bloco de chão/terreno) */
.base-cylinder-rim {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 24px;
  background: linear-gradient(180deg, var(--base-rim-color, #15803d) 0%, #060913 100%);
  border-radius: 50% / 100% 100% 0 0;
  transform: rotate(180deg);
  border: 2px solid rgba(0, 0, 0, 0.7);
  border-top: none;
  z-index: 2;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.65);
}

/* Superfície elíptica superior onde o Pokémon pisa */
.base-top-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 38px;
  background: radial-gradient(ellipse at 50% 35%, var(--base-surface, #22c55e) 0%, var(--base-surface-sub, #16a34a) 70%, var(--base-rim-color, #15803d) 100%);
  border-radius: 50%;
  border: 2px solid var(--base-ring-color, #86efac);
  box-shadow: 0 0 14px var(--base-glow, rgba(34, 197, 94, 0.4)), inset 0 3px 8px rgba(255, 255, 255, 0.45);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anel concêntrico estilizado característico dos jogos Pokémon */
.base-inner-ring {
  width: 72%;
  height: 62%;
  border-radius: 50%;
  border: 1.5px dashed var(--base-ring-color, #86efac);
  opacity: 0.65;
}

/* Pokémon firmemente posicionado sobre a base 3D */
.duel-sprite {
  max-width: clamp(100px, 16vh, 155px);
  max-height: clamp(100px, 16vh, 155px);
  object-fit: contain;
  image-rendering: pixelated;
  z-index: 4;
  margin-bottom: 10px;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.player-sprite-pos {
  margin-bottom: clamp(24px, 3.8vh, 30px);
}

.enemy-sprite-pos {
  margin-bottom: 8px;
}

.trainer-stage-sprite {
  position: absolute;
  right: clamp(14px, 2.2vw, 22px);
  bottom: clamp(34px, 4.8vh, 40px);
  width: clamp(52px, 9vh, 80px);
  height: clamp(52px, 9vh, 80px);
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.92;
  z-index: 3;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75));
}

/* Animações de Combate */
@keyframes lungeRight {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(45px, -10px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes lungeLeft {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, 10px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes hitFlash {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  25% { transform: translateX(-10px); filter: brightness(2.5) saturate(0); }
  50% { transform: translateX(10px); filter: brightness(1.8); }
  75% { transform: translateX(-8px); filter: brightness(2.2); }
}

.anim-attack-right { animation: lungeRight 0.34s ease-in-out; }
.anim-attack-left { animation: lungeLeft 0.34s ease-in-out; }
.anim-hit { animation: hitFlash 0.42s ease-in-out; }
.anim-faint {
  transform: translateY(45px) scale(0.5) !important;
  opacity: 0 !important;
}

/* ============================================================================
   ANIMAÇÃO DE POKÉBOLA SENDO JOGADA & SAÍDA DO POKÉMON
============================================================================ */
.pokeball-throw-fx {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 4vh, 32px);
  transform: translate(-50%, 0);
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 10;
}

.pokeball-throw-fx.player-throw {
  animation: pokeballPlayerArc var(--throw-dur, 0.44s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pokeball-throw-fx.enemy-throw {
  animation: pokeballEnemyArc var(--throw-dur, 0.44s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pokeballPlayerArc {
  0% {
    transform: translate(-150px, 75px) scale(0.6);
    opacity: 0.95;
  }
  38% {
    transform: translate(-75px, -90px) scale(1.1);
    opacity: 1;
  }
  75% {
    transform: translate(-18px, -15px) scale(0.95);
  }
  90% {
    transform: translate(-50%, -6px) scale(1.05);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

@keyframes pokeballEnemyArc {
  0% {
    transform: translate(110px, -50px) scale(0.6);
    opacity: 0.95;
  }
  38% {
    transform: translate(50px, -90px) scale(1.05);
    opacity: 1;
  }
  75% {
    transform: translate(10px, -15px) scale(0.95);
  }
  90% {
    transform: translate(-50%, -6px) scale(1.05);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Rotação rápida da Pokébola enquanto viaja pelo ar */
.thrown-pokeball-spinner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pokeballSpinFlight var(--throw-dur, 0.44s) linear forwards;
}

.pokeball-throw-fx.enemy-throw .thrown-pokeball-spinner {
  animation: pokeballSpinFlightReverse var(--throw-dur, 0.44s) linear forwards;
}

@keyframes pokeballSpinFlight {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1080deg); }
}

@keyframes pokeballSpinFlightReverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-1080deg); }
}

.battle-pokeball-svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.65));
}

/* Sombra projetada no chão da arena conforme a Pokébola cai */
.pokeball-landing-shadow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 12px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
  border-radius: 50%;
  animation: shadowGrow var(--throw-dur, 0.44s) ease-out forwards;
}

@keyframes shadowGrow {
  0% { opacity: 0; transform: translateX(-50%) scale(0.2); }
  80% { opacity: 0.5; transform: translateX(-50%) scale(0.7); }
  100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
}

/* Flash de Energia / Feixe de Luz quando a Pokébola se abre */
.pokeball-energy-burst {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 4vh, 32px);
  transform: translate(-50%, 50%);
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
}

.energy-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 20px #38bdf8, inset 0 0 15px #ffffff;
  animation: energyRingPulse var(--burst-dur, 0.38s) ease-out forwards;
}

.energy-core-flash {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #ffffff 20%, #38bdf8 65%, transparent 80%);
  border-radius: 50%;
  filter: drop-shadow(0 0 16px #38bdf8);
  animation: energyCoreFade var(--burst-dur, 0.38s) ease-out forwards;
}

.energy-sparkles {
  position: absolute;
  font-size: 1.2rem;
  color: #fef08a;
  text-shadow: 0 0 10px #fbbf24;
  animation: sparklesSpread var(--burst-dur, 0.38s) ease-out forwards;
}

@keyframes energyRingPulse {
  0% { transform: scale(0.1); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes energyCoreFade {
  0% { transform: scale(0.2); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes sparklesSpread {
  0% { transform: scale(0.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1.8) rotate(120deg); opacity: 0; }
}

/* Animação do Pokémon saindo em silhueta de luz e materializando */
.pokemon-materializing {
  opacity: 0 !important;
  transform: scale(0.15) !important;
}

.anim-pokemon-emerge {
  animation: pokemonEmergeFx var(--emerge-dur, 0.42s) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes pokemonEmergeFx {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.15);
    filter: brightness(4.5) saturate(0) drop-shadow(0 0 24px #38bdf8);
  }
  45% {
    opacity: 1;
    transform: translateY(-8px) scale(1.12);
    filter: brightness(2.2) saturate(0.4) drop-shadow(0 0 18px #38bdf8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65));
  }
}

/* ============================================================================
   BOTÃO VERMELHO DE POKÉMON DERROTADO (NO LUGAR DO POKÉMON MORTO NA ARENA)
   ============================================================================ */
.player-fainted-action-container {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 92%;
  max-width: 250px;
  pointer-events: auto;
  animation: faintedFadeIn 0.35s ease-out;
}

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

.btn-pokemon-fainted-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  border: 2px solid #fca5a5;
  border-radius: 12px;
  padding: 8px 14px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.65), 0 0 25px rgba(185, 28, 28, 0.45);
  animation: faintedRedPulse 1.8s infinite alternate ease-in-out;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  user-select: none;
}

.btn-pokemon-fainted-red:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
  box-shadow: 0 6px 26px rgba(239, 68, 68, 0.9), 0 0 35px rgba(239, 68, 68, 0.6);
  border-color: #ffffff;
}

.btn-pokemon-fainted-red:active {
  transform: scale(0.97);
}

.fainted-btn-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.64rem;
  color: #fee2e2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.fainted-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-pixel-ui);
  font-size: 0.80rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
}

.fainted-btn-arrow {
  color: #fef08a;
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.btn-pokemon-fainted-red:hover .fainted-btn-arrow {
  transform: translateX(3px);
}

@keyframes faintedRedPulse {
  0% {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.55), 0 0 16px rgba(185, 28, 28, 0.35);
    border-color: #fca5a5;
  }
  100% {
    box-shadow: 0 6px 26px rgba(239, 68, 68, 0.9), 0 0 32px rgba(239, 68, 68, 0.65);
    border-color: #ffffff;
  }
}

/* Modal de Seleção de Próximo Pokémon */
.fainted-switch-modal-card {
  max-width: 440px;
  width: 92%;
  background: #0f172a;
  border: 2px solid #ef4444;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.35), 0 20px 45px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-sizing: border-box;
}

.fainted-modal-header {
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fainted-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fainted-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #f87171;
  letter-spacing: 1px;
}

.fainted-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.fainted-modal-body {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.fainted-modal-subtitle {
  font-family: var(--font-clean);
  font-size: 0.80rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.fainted-party-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
  box-sizing: border-box;
}

.fainted-choice-card {
  background: #141f36;
  border: 2px solid #283756;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.fainted-choice-card:hover {
  background: #1e2c4c;
  border-color: var(--color-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25);
}

.fcc-left {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.fcc-sprite {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.fcc-middle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fcc-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fcc-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.fcc-level {
  font-size: 0.70rem;
  color: var(--color-gold);
  font-weight: 700;
}

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

.type-badge-mini {
  font-size: 0.54rem;
  font-weight: 800;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.4px;
}

.fcc-hp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.fcc-hp-track {
  flex: 1;
  height: 5px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 3px;
  overflow: hidden;
}

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

.fcc-hp-text {
  font-size: 0.66rem;
  color: #94a3b8;
  font-family: monospace;
  font-weight: 700;
  white-space: nowrap;
}

.fcc-right {
  flex-shrink: 0;
}

.btn-send-pokemon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1.5px solid #6ee7b7;
  color: #ffffff;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.fainted-choice-card:hover .btn-send-pokemon {
  background: #10b981;
  filter: brightness(1.12);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.55);
}

/* ========================================================
   MODAL DE SELEÇÃO DE POKÉMON PARA USO DE ITEM EM BATALHA
======================================================== */
.item-target-modal-card {
  max-width: 480px;
  width: 92%;
  background: #0b1324;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.35), 0 20px 45px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-sizing: border-box;
}

.item-target-modal-header {
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 12px 18px;
  background: rgba(56, 189, 248, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-target-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-target-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #38bdf8;
  letter-spacing: 1px;
}

.item-target-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.item-target-modal-body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.item-target-info-strip {
  background: #111e38;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}

.item-target-item-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.itip-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--item-color, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.itip-icon {
  font-size: 1.5rem;
}

.itip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.itip-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.itip-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.itip-qty-badge {
  font-size: 0.70rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.itip-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.item-target-modal-subtitle {
  font-family: var(--font-clean);
  font-size: 0.80rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.item-target-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
  box-sizing: border-box;
}

.item-target-choice-card {
  background: #141f36;
  border: 2px solid #283756;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  position: relative;
}

.item-target-choice-card:hover:not(.ineligible) {
  background: #1e2c4c;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.item-target-choice-card.is-active-combatant {
  border-color: #10b981;
}

.item-target-choice-card.ineligible {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.target-role-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.target-role-badge.active {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.target-role-badge.bench {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.itc-types-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.target-status-badge {
  font-size: 0.56rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.target-status-badge.fainted {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.target-status-badge.status-afflicted {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-apply-item {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.btn-apply-item:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.target-ineligible-tag {
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.item-target-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-cancel-target {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-family: var(--font-clean);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-target:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}

/* Defeat Retry Notice Card */
.defeat-retry-notice-card {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  text-align: left;
}

.defeat-retry-notice-card.exhausted {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}

.retry-notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.retry-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  letter-spacing: 0.8px;
  color: #f87171;
  font-weight: 800;
}

.retry-badge.exhausted {
  color: #fbbf24;
}

.retry-count-tag {
  font-size: 0.68rem;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 700;
}

.retry-count-tag.exhausted {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

/* ========================================================
   MODAL DE ALERTA DO JOGO / AVISO TEMÁTICO (ESQUADRÃO BLOQUEADO)
======================================================== */
.game-alert-modal-card {
  max-width: 520px;
  width: 92%;
  background: linear-gradient(180deg, #111a33 0%, #090f1f 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  box-shadow:
    0 0 35px rgba(245, 158, 11, 0.28),
    0 24px 50px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: modalPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.game-alert-header {
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 2px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-alert-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-alert-icon-box {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.game-alert-badge {
  display: block;
  font-family: var(--font-pixel-ui);
  font-size: 0.65rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.game-alert-title {
  font-family: var(--font-pixel-title);
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: 1px;
  margin: 2px 0 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.game-alert-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-alert-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-alert-floor-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.game-alert-main-text {
  font-family: var(--font-clean);
  font-size: 0.92rem;
  color: #f8fafc;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.game-alert-details-card {
  background: rgba(10, 15, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-alert-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #cbd5e1;
}

.game-alert-rule-item .rule-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.game-alert-rule-item .rule-text strong {
  color: #fbbf24;
  display: block;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.game-alert-rule-item .rule-text span {
  font-family: var(--font-clean);
}

.rule-item-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  width: 100%;
}

.game-alert-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.btn-game-alert-primary {
  font-family: var(--font-pixel-title);
  font-size: 0.88rem;
  letter-spacing: 1px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: 2px solid #b45309;
  border-radius: 8px;
  padding: 9px 22px;
  cursor: pointer;
  box-shadow: 0 4px 0 #92400e, 0 0 16px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-game-alert-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 0 #92400e, 0 0 24px rgba(245, 158, 11, 0.6);
}

.btn-game-alert-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #92400e;
}

.btn-game-alert-secondary {
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.38);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-game-alert-secondary:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.btn-game-alert-secondary:active {
  transform: translateY(1px);
}

.floating-damage {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate3d(var(--float-x, 0px), var(--float-y, 0px), 0) translateX(-50%);
  translate: 0 0;
  scale: 1;
  opacity: 0;
  font-family: var(--font-pixel-ui);
  font-size: 1.2rem;
  font-weight: 900;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 300;
  animation: none;
}

.combat-log-bold { font-weight: 700; }
.combat-log-italic { font-style: italic; }

/* Painel Tático Inferior */
.battle-dashboard-controls {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
  height: clamp(155px, 24vh, 205px);
  min-height: 0;
}

@media (max-width: 780px) {
  .battle-dashboard-controls {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.moves-command-panel,
.tactical-side-panel,
.combat-console-panel {
  background: var(--bg-card);
  border: 2px solid var(--border-pixel);
  border-radius: 8px;
  padding: clamp(8px, 1.2vh, 12px);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.command-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.command-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-gold);
}

.command-hint {
  font-size: 0.66rem;
  color: var(--color-blue);
}

.moves-grid-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.move-card-btn {
  background: #0b1120;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: clamp(5px, 0.9vh, 9px) 10px;
  color: white;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  transition: all 0.14s;
  min-height: 0;
}

.move-card-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #162238;
}

.move-card-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.m-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.m-name {
  font-weight: 800;
  font-size: 0.84rem;
}

.m-eff-badge {
  font-size: 0.56rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
}

.m-eff-badge.eff-ultra,
.m-eff-badge.eff-super {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid #10b981;
}

.m-eff-badge.eff-resist {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

.m-eff-badge.eff-immune {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.m-eff-badge.eff-normal {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.m-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  gap: 6px;
}

.m-type-category-group {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.m-type-pill {
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.m-cat-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.m-cat-tag.physical {
  color: #fca5a5;
}

.m-cat-tag.special {
  color: #93c5fd;
}

.m-cat-tag.status {
  color: #86efac;
}

.m-power-text {
  font-size: 0.64rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  flex-shrink: 0;
}

.tactical-side-panel {
  gap: 5px;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(6px, 1vh, 10px);
}

.tactical-side-panel::-webkit-scrollbar {
  width: 4px;
}
.tactical-side-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.tactical-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  flex-shrink: 0;
}

.tactical-section .command-title {
  font-size: 0.70rem;
  margin-bottom: 2px;
}

.battle-party-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.party-switch-btn {
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  border-radius: 6px;
  padding: 4px 2px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.15s ease;
  box-sizing: border-box;
  position: relative;
}

.party-switch-btn:hover:not(:disabled):not(.active-member) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.party-switch-btn.active-member {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  cursor: default;
}

.party-switch-btn.fainted-member {
  opacity: 0.38;
  filter: grayscale(0.85);
  cursor: not-allowed;
  border-color: #475569;
}

.party-switch-btn:disabled:not(.active-member):not(.fainted-member) {
  opacity: 0.5;
  cursor: not-allowed;
}

.psb-status-tag {
  font-size: 0.52rem;
  font-weight: 800;
  border-radius: 3px;
  padding: 1px 4px;
  margin-top: 2px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.psb-status-tag.current {
  color: #34d399;
  background: rgba(16, 185, 129, 0.22);
}

.psb-status-tag.fainted {
  color: #f87171;
  background: rgba(239, 68, 68, 0.22);
}

.psb-status-tag.ready,
.psb-status-tag.switch {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.party-switch-btn img {
  width: clamp(18px, 2.5vh, 22px);
  height: clamp(18px, 2.5vh, 22px);
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.psb-name {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: capitalize;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
  margin-top: 1px;
}

.psb-hp {
  font-size: 0.52rem;
  color: var(--text-muted);
  line-height: 1.1;
}

.battle-bag-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.bag-item-btn {
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  border-radius: 5px;
  padding: 2px 4px;
  color: #e2e8f0;
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.12s ease;
  min-height: 22px;
  box-sizing: border-box;
}

.bag-item-btn:hover:not(:disabled) {
  border-color: var(--color-gold);
  background: #182236;
}

.bag-item-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bag-item-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-item-btn strong {
  color: var(--color-gold);
  font-size: 0.56rem;
  flex-shrink: 0;
}

.combat-console-panel {
  height: 100%;
  min-height: 0;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-gold);
  border-bottom: 1px solid var(--border-pixel);
  padding-bottom: 5px;
  margin-bottom: 5px;
}

.console-dot.green {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
}

.console-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.log-entry {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========================================================
   MODAIS
======================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-backdrop.active { display: flex; }
.modal-backdrop.active:not(.modal-closing) { animation: modalBackdropIn .2s ease-out both; }
.modal-backdrop.modal-closing { animation: modalBackdropOut .18s ease-in both; }
.modal-backdrop.active:not(.modal-closing) > .modal-card { animation: modalCardIn .22s cubic-bezier(.2,.8,.2,1) both; }
.modal-backdrop.modal-closing > .modal-card { animation: modalCardOut .18s ease-in both; }

@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalBackdropOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalCardIn { from { opacity: 0; transform: translateY(10px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalCardOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.985); } }

.modal-card {
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-pixel);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h2 {
  font-family: var(--font-pixel-ui);
  font-size: 1.15rem;
  color: var(--color-gold);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body-scroll {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 8px;
}

.settings-help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pokeapi-sync-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #0b1120;
  border: 1px solid var(--border-pixel);
  padding: 10px;
  border-radius: 8px;
  flex-wrap: wrap;
}

.btn-sync-api {
  font-family: var(--font-pixel-ui);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  line-height: 1.2;
}

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

/* 1. Botão PokéAPI: ROXO */
#btnSyncPokeApiJs,
.btn-purple {
  background: rgba(168, 85, 247, 0.2) !important;
  border: 1.5px solid #a855f7 !important;
  color: #c084fc !important;
}

#btnSyncPokeApiJs:hover,
.btn-purple:hover {
  background: rgba(168, 85, 247, 0.36) !important;
  border-color: #c084fc !important;
  color: #f3e8ff !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5) !important;
}

.sync-status-label {
  font-family: var(--font-clean);
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 700;
}

.music-categories-container {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}

.music-category-group {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.music-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.music-category-header .cat-count {
  font-size: 0.63rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 600;
}

.music-track-list {
  display: flex;
  flex-direction: column;
}

.music-track-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.12s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.76rem;
  color: #cbd5e1;
  user-select: none;
}

.music-track-item:last-child {
  border-bottom: none;
}

.music-track-item:hover {
  background: rgba(56, 189, 248, 0.09);
  color: #fff;
}

.music-track-item input[type="radio"] {
  accent-color: #38bdf8;
  cursor: pointer;
  width: 13px;
  height: 13px;
  margin: 0;
  flex-shrink: 0;
}

.music-track-item.selected {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
}

.music-track-item .track-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
}

.music-track-item .track-indicator {
  font-size: 0.62rem;
  opacity: 0;
  color: #38bdf8;
  transition: opacity 0.12s ease;
  flex-shrink: 0;
}

.music-track-item.selected .track-indicator {
  opacity: 1;
}

.slider-group { margin-bottom: 10px; }
.slider-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.82rem;
}
.slider-pct { font-weight: 800; color: var(--color-blue); }
.range-modern { width: 100%; accent-color: var(--color-blue); cursor: pointer; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #cbd5e1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 2px solid var(--border-pixel);
  display: flex;
  justify-content: space-between;
}

.btn-modal-test {
  background: #1f2937;
  border: 1px solid var(--border-pixel);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-apply {
  background: var(--color-gold);
  border: none;
  color: #090d18;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

/* ============================================================================
   TELA DE FIM DE BATALHA (RESULTADOS DO DUELO)
============================================================================ */
#battleModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex !important;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 16px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease, backdrop-filter 0.45s ease;
}

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

#battleModal .battle-end-screen {
  box-sizing: border-box;
  max-width: 580px;
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px 24px;
  background: linear-gradient(180deg, #101935 0%, #080d1b 100%);
  border: 2px solid #3b82f6;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85), 0 0 28px rgba(59, 130, 246, 0.25);
  transform: translateY(30px) scale(0.92);
  opacity: 0;
  transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.42s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#battleModal.active .battle-end-screen {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#battleModal .battle-end-screen.defeat-mode {
  border-color: #ef4444;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85), 0 0 28px rgba(239, 68, 68, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(8px, 1.5vh, 14px) clamp(12px, 2.2vw, 20px);
}

#battleModal .battle-end-screen.defeat-mode .battle-end-header {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-title {
  margin: 0 0 5px;
  font-size: clamp(1.2rem, 3.2vh, 1.65rem);
}

#battleModal .battle-end-screen.defeat-mode .battle-end-trainer-avatar {
  width: 34px;
  height: 34px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-opponent-row {
  padding: 4px 10px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-summary {
  flex: 0 0 auto;
  min-height: 0;
  margin: 4px 0;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill {
  min-width: 0;
  padding: 5px 4px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-icon {
  font-size: 1rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-value {
  font-size: .84rem;
  line-height: 1.1;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-label {
  font-size: .56rem;
}

#battleModal .battle-end-screen.defeat-mode .defeat-retry-notice-card {
  margin: 5px 0;
  padding: 6px 9px;
}

#battleModal .battle-end-screen.defeat-mode .defeat-retry-notice-card p {
  font-size: .72rem !important;
  line-height: 1.25 !important;
}

#battleModal .battle-end-screen.defeat-mode #modalBody > p {
  margin: 5px 0;
  font-size: .74rem !important;
  line-height: 1.25;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-squad-section {
  flex: 0 0 auto;
  margin-bottom: 5px;
  padding: 6px 8px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-section-label {
  margin-bottom: 4px;
  font-size: .62rem;
}

#battleModal .battle-end-screen.defeat-mode .end-poke-card {
  gap: 2px;
  padding: 4px 3px;
}

#battleModal .battle-end-screen.defeat-mode .end-poke-sprite {
  width: 34px;
  height: 34px;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-actions {
  flex: 0 0 auto;
  gap: 8px;
  margin-top: 5px;
}

#battleModal .battle-end-screen.defeat-mode .btn-battle-end {
  min-height: 38px;
  padding: 7px 10px;
  font-size: .82rem;
}

@media (max-height: 620px) {
  #battleModal { padding: 8px; }
  #battleModal .battle-end-screen.defeat-mode {
    max-height: calc(100dvh - 16px);
    padding: 6px 12px;
  }
  #battleModal .battle-end-screen.defeat-mode .battle-end-badge { margin-bottom: 2px; padding: 3px 9px; font-size: .62rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-title { font-size: 1.15rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-squad-section { padding: 4px 6px; }
  #battleModal .battle-end-screen.defeat-mode .end-poke-sprite { width: 28px; height: 28px; }
  #battleModal .battle-end-screen.defeat-mode .end-poke-xp-tag { font-size: .55rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill { padding: 3px 2px; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-icon { font-size: .85rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-value { font-size: .74rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-trainer-avatar { width: 28px; height: 28px; }
}

@media (max-height: 460px) {
  #battleModal .battle-end-screen.defeat-mode .battle-end-squad-section { display: none; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-trainer-sub { display: none; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-summary { margin: 2px 0; }
}

.battle-end-header {
  text-align: center;
  margin-bottom: 12px;
}

.battle-end-badge {
  display: inline-block;
  margin: 0 auto 6px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.battle-end-badge.defeat {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.battle-end-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.85rem;
  font-weight: 900;
  margin: 2px 0 10px;
  color: var(--color-gold);
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
}

.battle-end-title.defeat {
  color: #ef4444;
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
}

.battle-end-opponent-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 14px;
  margin: 0 auto;
  max-width: 440px;
}

.battle-end-trainer-avatar {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: rgba(2, 6, 23, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-end-opponent-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.battle-end-trainer-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
}

.battle-end-trainer-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-end-summary {
  margin: 12px 0;
}

.battle-end-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.battle-end-stat-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.battle-end-stat-pill .stat-icon {
  font-size: 1.3rem;
}

.battle-end-stat-pill .stat-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fbbf24;
  font-family: var(--font-clean);
}

.battle-end-stat-pill .stat-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
}

.battle-end-squad-section {
  background: rgba(10, 15, 29, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.battle-end-section-label {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--color-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: left;
  letter-spacing: 0.5px;
}

.battle-end-squad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.end-poke-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.end-poke-sprite {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.end-poke-info {
  width: 100%;
}

.end-poke-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.end-poke-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
  color: #f1f5f9;
}

.end-poke-level {
  color: #38bdf8;
  font-weight: 900;
  font-family: var(--font-clean);
}

.end-poke-hp-track {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}

.end-poke-hp-bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transition: transform 0.4s ease;
}

.end-poke-xp-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #34d399;
  display: block;
}

.modal-perks-section {
  margin-bottom: 12px;
  text-align: left;
}

.perk-prompt-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--color-blue);
  margin-bottom: 8px;
  text-align: center;
}

.modal-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.perk-choice-card {
  background: var(--bg-card);
  border: 2px solid var(--border-pixel);
  border-radius: 8px;
  padding: 9px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.perk-choice-card:hover {
  transform: translateY(-2px);
  border-color: #60a5fa;
}

.perk-choice-card.selected-perk {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.perk-icon { font-size: 1.3rem; margin-bottom: 3px; }
.perk-title { font-size: 0.75rem; font-weight: 800; color: white; }
.perk-desc { font-size: 0.65rem; color: var(--text-muted); }

.battle-end-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 10px;
  min-width: 0;
}

.btn-battle-end {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-battle-end.secondary {
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid #475569;
  color: #cbd5e1;
}

.btn-battle-end.secondary:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: #94a3b8;
  color: white;
}

.btn-battle-end.primary {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  color: white;
  border: 2px solid #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-battle-end.primary:hover {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

/* Loading Overlay */
.pokeball-spinner {
  width: 56px;
  height: 56px;
  background: linear-gradient(180deg, #ef4444 48%, #0f172a 48%, #0f172a 52%, #f8fafc 52%);
  border-radius: 50%;
  border: 3px solid #f8fafc;
  animation: spinBall 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spinBall {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loadingOverlay {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.loading-text {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-gold);
}

/* ========================================================
   ÍCONES VETORIAIS (SVG) MODERNOS E NÍTIDOS
======================================================== */
.ui-svg-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.panel-header-svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-gold);
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.coin-icon {
  width: 20px;
  height: 20px;
}

.coin-icon.inline {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.trophy-icon {
  width: 18px;
  height: 18px;
}

/* Barra Superior no Modo Jogo */
.nav-btn-home {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 2px solid #60a5fa;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.45);
}

.nav-btn-home:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #93c5fd;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.7);
  transform: translateY(-1px);
}

.brand-ingame {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-sub {
  font-size: 0.68rem;
  color: var(--color-gold);
  opacity: 0.8;
  margin-left: 2px;
}

/* ========================================================
   BARRA DE NAVEGAÇÃO NA PARTE DE BAIXO (BOTTOM GAME NAV)
   Aba da Torre fica no meio e destacada!
======================================================== */
.bottom-game-nav {
  width: 100%;
  background: #090e1c;
  border-top: 3px solid #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.4vw, 18px);
  padding: 6px 14px;
  flex-shrink: 0;
  z-index: 80;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.65);
}

.bottom-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #111a2e;
  border: 2px solid #243555;
  border-radius: 8px;
  padding: 6px 14px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.14s ease;
  min-width: 90px;
  position: relative;
}

.bottom-nav-tab .tab-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.bottom-nav-tab .tab-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.bottom-nav-tab .tab-lock-indicator {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.65rem;
}

.bottom-nav-tab:hover {
  background: #1b2945;
  color: #f8fafc;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.bottom-nav-tab.active {
  background: #172554;
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ABA DA TORRE NO MEIO — DESTACADA */
.bottom-nav-tab.center-tower-tab {
  background: linear-gradient(180deg, #991b1b 0%, #450a0a 100%);
  border: 2px solid #f59e0b;
  color: #fbbf24;
  min-width: 135px;
  padding: 6px 16px;
  transform: translateY(-1px);
  box-shadow:
    0 0 14px rgba(245, 158, 11, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.bottom-nav-tab.center-tower-tab .center-icon {
  width: 20px;
  height: 20px;
  stroke: #fbbf24;
}

.bottom-nav-tab.center-tower-tab:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 20px rgba(245, 158, 11, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.6);
}

.bottom-nav-tab.center-tower-tab.active {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border-color: #fef08a;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.6);
}

.center-tab-content {
  display: flex;
  align-items: center;
  gap: 7px;
}

.center-tab-label {
  font-family: var(--font-pixel-title);
  font-size: 0.78rem;
  letter-spacing: 1px;
}

.center-tab-badge {
  background: #fbbf24;
  color: #450a0a;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========================================================
   SISTEMA DE TIME LOCKADO NA TORRE (#squadScreen)
======================================================== */
.squad-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 12px;
  flex-wrap: wrap;
}

.squad-lock-banner.locked {
  background: rgba(185, 28, 28, 0.22);
  border: 2px solid #ef4444;
  color: #fecaca;
}

.squad-lock-banner.unlocked {
  background: rgba(16, 185, 129, 0.18);
  border: 2px solid #10b981;
  color: #a7f3d0;
}

.squad-lock-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lock-status-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.4);
}

.squad-lock-info {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-forfeit-run {
  font-family: var(--font-pixel-ui);
  background: #7f1d1d;
  border: 1px solid #fca5a5;
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s;
}

.btn-forfeit-run:hover {
  background: #991b1b;
  border-color: #f87171;
}

.clean-slot-card.locked-slot {
  border-color: #475569;
  cursor: not-allowed;
}

.clean-slot-card.locked-slot:hover {
  border-color: #ef4444;
}

/* ========================================================
   TELA DEDICADA: LOJA DE ITENS E RELÍQUIAS (#shopScreen)
======================================================== */
.dedicated-shop-wrapper {
  padding: clamp(10px, 1.4vh, 16px) 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.shop-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 2px solid var(--border-pixel);
  padding-bottom: 8px;
}

.shop-balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #141e33;
  border: 2px solid var(--color-gold);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
}

.dedicated-shop-grid {
  display: flex;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .dedicated-shop-grid {
    overflow-y: auto;
  }
}

.shop-category-col {
  max-width: 680px;
  width: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.category-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  border-bottom: 1px dashed var(--border-pixel);
  padding-bottom: 6px;
}

.category-header h3 {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
}

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

.shop-items-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

/* ========================================================
   TELA DEDICADA: BATALHA CASUAL (#casualScreen)
======================================================== */
.casual-hub-wrapper {
  padding: clamp(10px, 1.4vh, 16px) 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.casual-hero-header {
  flex-shrink: 0;
  border-bottom: 2px solid var(--border-pixel);
  padding-bottom: 8px;
}

.casual-options-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .casual-options-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.casual-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.casual-diff-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.casual-diff-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-pixel);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.14s;
  box-sizing: border-box;
  width: 100%;
}

.casual-diff-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.casual-diff-btn.active {
  border-color: var(--color-gold);
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.2);
}

.diff-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

.diff-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-launch-casual {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 2px solid #fca5a5;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 0 #7f1d1d;
  flex-shrink: 0;
}

.btn-launch-casual:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.casual-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.casual-tips-list li {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid var(--color-blue);
}

/* ==========================================================================
   SHINY POKÉMON - NOME DOURADO CHAMATIVO COM LEVE GLOW ANIMADO DISCRETO
   ========================================================================== */
.shiny-name-gold {
  color: #fde047 !important;
  font-weight: 800;
  display: inline;
  letter-spacing: 0.5px;
  text-shadow: 0 0 3px rgba(251, 191, 36, 0.65);
  animation: shinyGoldPulse 2.2s ease-in-out infinite alternate;
}

@keyframes shinyGoldPulse {
  0% {
    color: #fde047;
    text-shadow: 0 0 2px rgba(251, 191, 36, 0.6);
  }
  100% {
    color: #fef08a;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.95);
  }
}

/* ========================================================
   PAINEL DE ATUALIZAÇÕES AUTOMÁTICAS & ZONA DE PERIGO
======================================================== */
.danger-section-label {
  color: #f87171 !important;
}

.danger-sync-box {
  background: rgba(136, 19, 55, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

.updater-status-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.updater-badge {
  font-family: var(--font-clean) !important;
  font-size: 0.75rem !important;
  color: #34d399 !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* 2. Botão de Atualizações: VERDE */
#btnCheckUpdates,
.btn-check-updates,
.btn-green {
  font-family: var(--font-pixel-ui);
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1.5px solid #10b981 !important;
  color: #34d399 !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  line-height: 1.2;
}

#btnCheckUpdates:hover,
.btn-check-updates:hover,
.btn-green:hover {
  background: rgba(16, 185, 129, 0.36) !important;
  border-color: #34d399 !important;
  color: #ecfdf5 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

#btnCheckUpdates:active,
.btn-check-updates:active,
.btn-green:active {
  transform: translateY(1px);
}

.update-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.update-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

.update-icon-wrapper.spinning {
  animation: spinIcon 0.8s linear infinite;
}

@keyframes spinIcon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-status-box {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

.update-status-text {
  font-family: var(--font-clean) !important;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.text-sky { color: #38bdf8; }
.text-emerald { color: #34d399; }
.text-gold { color: #fbbf24; }
.text-rose { color: #f87171; }

/* 3. Zona de Perigo: Botão de Reset Vermelho Estilizado */
#btnHardReset,
.btn-danger-reset,
.btn-sync-danger,
.btn-red {
  font-family: var(--font-pixel-ui);
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fca5a5 !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  line-height: 1.2;
}

#btnHardReset:hover,
.btn-danger-reset:hover,
.btn-sync-danger:hover,
.btn-red:hover {
  background: rgba(239, 68, 68, 0.36) !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.55) !important;
}

#btnHardReset:active,
.btn-danger-reset:active,
.btn-sync-danger:active,
.btn-red:active {
  transform: translateY(1px);
}

#btnHardReset.confirming,
.btn-danger-reset.confirming,
.btn-sync-danger.confirming,
.btn-red.confirming {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.9) !important;
  animation: pulseDanger 1s infinite alternate;
}

@keyframes pulseDanger {
  from { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 14px rgba(239, 68, 68, 0.9); }
}

/* 5. Drop de Shiny em Batalha (0.01%) */
.shiny-drop-celebration-card {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.6) 0%, rgba(30, 27, 75, 0.8) 100%);
  border: 2px solid #fbbf24;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.45);
  animation: shinyBannerPulse 2.2s infinite alternate;
}

@keyframes shinyBannerPulse {
  0% { border-color: #f59e0b; box-shadow: 0 0 16px rgba(245, 158, 11, 0.4); }
  100% { border-color: #fef08a; box-shadow: 0 0 32px rgba(251, 191, 36, 0.85); }
}

.shiny-drop-sparkles {
  font-size: 1.4rem;
  letter-spacing: 4px;
  color: #fde047;
}

.shiny-drop-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fef08a;
  text-transform: uppercase;
  margin: 4px 0 8px;
}

.shiny-drop-sprite {
  width: 90px;
  height: 90px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.9));
}

.shiny-drop-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
  margin-top: 4px;
}

.shiny-drop-desc {
  font-size: 0.82rem;
  color: #e2e8f0;
  margin-top: 4px;
}

/* 6. Botão de Shiny Bloqueado no Esquadrão */
.btn-slot-mini.shiny-locked {
  opacity: 0.55 !important;
  filter: grayscale(0.5);
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: #475569 !important;
  cursor: pointer !important;
}

.btn-slot-mini.shiny-locked:hover {
  opacity: 0.9 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* 7. Card de Drop Raro de Item de Treinador (10% Chance) */
.item-drop-reward-card {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--item-drop-border, #10b981);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 0 14px var(--item-drop-shadow, rgba(16, 185, 129, 0.25));
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  animation: itemDropPop 0.35s ease-out;
}

@keyframes itemDropPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.item-drop-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid #10b981;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.item-drop-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-drop-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #a7f3d0;
  text-transform: uppercase;
}

.item-drop-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.item-drop-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* ========================================================
   MODAL DE ATUALIZAÇÃO DO JOGO (GITHUB AUTO-UPDATE)
======================================================== */
.update-modal-card {
  max-width: 520px;
  width: 92%;
  background: linear-gradient(180deg, #0d1527 0%, #060b17 100%);
  border: 2px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.35), 0 20px 45px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  box-sizing: border-box;
}

.update-modal-header {
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 12px 18px;
  background: rgba(56, 189, 248, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.update-modal-icon-box {
  width: 40px;
  height: 40px;
  background: rgba(56, 189, 248, 0.15);
  border: 1.5px solid #38bdf8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.update-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #38bdf8;
  letter-spacing: 1px;
}

.update-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.update-modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.update-version-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #111d33;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
}

.update-ver-tag {
  font-size: 0.82rem;
  color: #94a3b8;
}

.update-ver-tag strong {
  color: #f8fafc;
}

.update-ver-tag.latest strong {
  color: #38bdf8;
}

.update-ver-arrow {
  color: #38bdf8;
  font-size: 1rem;
}

.update-notes-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.update-notes-label {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #94a3b8;
  letter-spacing: 0.8px;
}

.update-notes-content {
  background: #090f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.update-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #111d33;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
}

.update-progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.update-progress-pct {
  font-family: monospace;
  font-weight: 700;
  color: #38bdf8;
}

.update-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.update-progress-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.update-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}





/* ========================================================
   NOVO: PERFIL DO TREINADOR NO HEADER SUPERIOR
======================================================== */
.trainer-header-pill {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  padding: 3px 12px 3px 4px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  color: #e2e8f0;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.trainer-header-pill:hover {
  border-color: #38bdf8;
}

.trainer-header-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
}
.trainer-header-pill span { max-width: 126px; overflow: hidden; text-overflow: ellipsis; }

.trainer-profile-anchor { position: relative; }
.trainer-profile-popover[hidden] { display: none; }
.trainer-profile-popover.profile-opening { animation: profilePopoverIn .2s cubic-bezier(.2,.8,.2,1) both; }
.trainer-profile-popover.profile-closing { animation: profilePopoverOut .17s ease-in both; pointer-events: none; }
@keyframes profilePopoverIn { from { opacity: 0; transform: translateY(-7px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes profilePopoverOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-5px) scale(.985); } }
.trainer-profile-popover {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 9px);
  right: 0;
  width: min(330px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 14px;
  color: #e2e8f0;
  background: linear-gradient(145deg, rgba(15, 23, 42, .99), rgba(7, 12, 24, .99));
  border: 1px solid rgba(56, 189, 248, .45);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .62), 0 0 22px rgba(56, 189, 248, .12);
  backdrop-filter: blur(14px);
}
.trainer-profile-heading,
.trainer-profile-identity { display: flex; align-items: center; }
.trainer-profile-heading { justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.trainer-profile-identity { min-width: 0; gap: 10px; }
.trainer-profile-identity img { width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; border-radius: 50%; background: #172238; border: 1px solid #38bdf8; }
.trainer-profile-identity div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.trainer-profile-identity div span,
.trainer-profile-section-label { color: #7dd3fc; font: 700 .57rem var(--font-pixel-title); letter-spacing: .04em; }
.trainer-profile-identity strong { overflow: hidden; color: #fff; font: 800 .95rem var(--font-pixel-ui); text-overflow: ellipsis; white-space: nowrap; }
.trainer-profile-close { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid #334155; border-radius: 8px; color: #cbd5e1; background: #111a2c; font-size: 1rem; }
.trainer-profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.trainer-profile-stat { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 1px solid rgba(148, 163, 184, .16); border-radius: 9px; background: rgba(30, 41, 59, .56); text-align: center; }
.trainer-profile-stat span { color: #94a3b8; font-size: .53rem; font-weight: 800; letter-spacing: .04em; }
.trainer-profile-stat strong { color: #fbbf24; font: 800 .88rem var(--font-pixel-ui); white-space: nowrap; }
.trainer-profile-stat small { color: #94a3b8; font-size: .58rem; white-space: nowrap; }
.trainer-profile-team-section { margin-top: 12px; }
.trainer-profile-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.profile-team-pokemon { display: flex; min-width: 0; align-items: center; gap: 3px; padding: 5px 3px; border: 1px solid rgba(56, 189, 248, .2); border-radius: 8px; background: rgba(15, 23, 42, .78); }
.profile-team-pokemon img { width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; }
.profile-team-pokemon span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.profile-team-pokemon strong { overflow: hidden; color: #f8fafc; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-team-pokemon small { color: #94a3b8; font-size: .55rem; }
.profile-team-empty { grid-column: 1 / -1; margin: 0; padding: 10px; color: #94a3b8; font-size: .72rem; text-align: center; }

.trainer-header-pill span {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  font-size: 0.82rem;
  color: #f8fafc;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   NOVO: BOTÕES SOCIAIS RÁPIDOS NA TELA INICIAL
======================================================== */
.title-quick-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  position: relative;
  z-index: 5;
}

.btn-title-aux {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
  font-family: var(--font-pixel-ui);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.btn-title-aux:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
}

.btn-title-aux .aux-icon {
  font-size: 1.05rem;
}

/* ========================================================
   NOVO: MODAL DE CRIAÇÃO DE PERSONAGEM
======================================================== */
.char-create-card {
  max-width: 660px;
  width: 95vw;
  background: linear-gradient(180deg, #0d1527 0%, #080d19 100%);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.25), 0 20px 40px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  overflow: hidden;
}

.char-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.3);
}

.char-create-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.char-create-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1.5px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.char-create-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #38bdf8;
  letter-spacing: 1px;
}

.char-create-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.char-create-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.char-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.char-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.char-validation-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.char-validation-badge.valid {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.char-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.char-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  pointer-events: none;
}

.char-text-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.char-text-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.char-field-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.char-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  background: #070b14;
  border: 1px solid #1e293b;
  border-radius: 8px;
}

.trainer-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: #0f172a;
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.trainer-avatar-item:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  background: #1e293b;
}

.trainer-avatar-item.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.trainer-avatar-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.trainer-avatar-item span {
  font-size: 0.65rem;
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  color: #94a3b8;
  margin-top: 4px;
  text-transform: capitalize;
}

.trainer-avatar-item.selected span {
  color: #fbbf24;
}

.char-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-char-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-char-next:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);
}

.btn-char-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ========================================================
   NOVO: MODAL DE SELEÇÃO DOS 3 INICIAIS ULTRA ESTILIZADO
======================================================== */
.starter-select-card {
  max-width: 1020px;
  width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1120 0%, #070a13 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.2), 0 25px 50px rgba(0, 0, 0, 0.85);
  border-radius: 12px;
  overflow: hidden;
}

.starter-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3);
}

.starter-hero-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #fbbf24;
  letter-spacing: 1px;
}

.starter-hero-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.starter-hero-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 3px;
  max-width: 620px;
  line-height: 1.35;
}

.starter-counter-podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid #fbbf24;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
}

.podium-count {
  font-family: var(--font-pixel-ui);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
}

.podium-sub {
  font-size: 0.64rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
}

.starter-select-body {
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Vitrine de 3 Slots no Topo */
.starter-slots-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.starter-podium-slot {
  min-height: 154px;
  background: #0f172a;
  border: 2px dashed #334155;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.starter-podium-slot.filled {
  border-style: solid;
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.slot-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

.slot-num-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.54rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.slot-pokeball-hologram {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(100, 116, 139, 0.4);
  position: relative;
}

.slot-pokeball-hologram::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(100, 116, 139, 0.4);
}

.slot-empty-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 700;
}

.slot-filled-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
}

.slot-filled-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  animation: floatMascot 3s ease-in-out infinite;
}

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

.slot-filled-name {
  font-family: var(--font-pixel-ui);
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
}

.slot-filled-lvl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
}

.slot-btn-remove {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-btn-remove:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

/* Filtros */
.starter-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.starter-filter-btn {
  padding: 6px 14px;
  background: #0f172a;
  border: 1.5px solid #1e293b;
  border-radius: 6px;
  color: #94a3b8;
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.starter-filter-btn:hover {
  border-color: #38bdf8;
  color: #ffffff;
}

.starter-filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Grade de Iniciais */
.starter-grid-scroll {
  position: relative;
  max-height: min(48vh, 460px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.starter-grid-scroll::after {
  position: sticky;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: 26px;
  margin-top: -26px;
  background: linear-gradient(to bottom, rgba(7, 10, 19, 0), rgba(7, 10, 19, .94));
  content: '';
  pointer-events: none;
}

.starters-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 3px 3px 24px;
}

.starter-card {
  background: #0f172a;
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.starter-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.starter-card.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
}

.starter-card-num {
  font-family: monospace;
  font-size: 0.65rem;
  color: #64748b;
  align-self: flex-start;
}

.starter-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin: 4px 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.starter-card-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.starter-card-gen {
  font-size: 0.64rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.starter-card-check-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fbbf24;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 900;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.starter-actions-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #1e293b;
}

#btnBackToCharModal {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 14px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.btn-start-adventure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 1 280px;
  min-width: 0;
  width: min(280px, 100%);
  max-width: 280px;
  box-sizing: border-box;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #fbbf24;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-start-adventure:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.6);
}

.btn-start-adventure:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.starter-journey-spinner {
  display: none;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
}

.btn-start-adventure.is-loading .starter-journey-spinner {
  display: inline-block;
  animation: starterJourneySpin 0.7s linear infinite;
}

.btn-start-adventure.is-loading .start-btn-spark {
  display: none;
}

.btn-start-adventure.is-loading:disabled {
  opacity: 1;
  cursor: url('images/ui/battlemon-loading-cursor.svg') 16 16, progress;
  filter: none;
}

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

/* ========================================================
   NOVO: POKÉMONS BLOQUEADOS COM SILHUETA E CADEADO (MEU TIME)
======================================================== */
.pokeidle-card.pokemon-locked {
  background: #090d16 !important;
  border-color: #1e293b !important;
  opacity: 0.75;
  cursor: not-allowed;
}

.pokeidle-card.pokemon-locked:hover {
  border-color: #475569 !important;
  transform: none !important;
  box-shadow: none !important;
}

.pokeidle-card.pokemon-locked img {
  filter: grayscale(1) brightness(0) drop-shadow(0 0 8px rgba(0,0,0,.8));
}

.pokemon-lock-icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 1rem;
  filter: none;
}

.char-avatar-option, .starter-choice-card {
  color: #e2e8f0;
  background: linear-gradient(145deg, #111827, #0b1220);
  border: 1px solid #334155;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.char-avatar-option { display:flex; flex-direction:column; align-items:center; gap:4px; padding:7px; font-size:.6rem; }
.char-avatar-option img { width:54px; height:58px; object-fit:contain; }
.char-avatar-option:hover, .starter-choice-card:hover { transform:translateY(-3px); border-color:#38bdf8; }
.char-avatar-option.selected, .starter-choice-card.selected { border-color:#fbbf24; box-shadow:0 0 16px #f59e0b55; background:linear-gradient(145deg,#3b2d12,#111827); }
.starter-choice-card { position:relative; min-width:0; min-height:100px; overflow:hidden; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 4px; text-transform:capitalize; }
.starter-choice-card img { width:52px; height:50px; object-fit:contain; image-rendering:auto; }
.starter-choice-card>span { color:#94a3b8; font-size:.56rem; line-height:1; }
.starter-choice-card small { display:block; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#94a3b8; font-size:.52rem; line-height:1.1; }
.starter-choice-card strong { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#f8fafc; font-size:.67rem; line-height:1.1; }
.starter-picked { position:relative; width:100%; height:100%; min-height:150px; padding:8px 12px 7px; box-sizing:border-box; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:0; color:#fde68a; }
.starter-picked img { width:102px; height:100px; object-fit:contain; filter:drop-shadow(0 5px 10px rgba(0,0,0,.48)); }
.starter-picked-footer { width:100%; min-width:0; display:flex; align-items:center; justify-content:center; gap:8px; margin-top:1px; }
.starter-picked-footer strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-transform:capitalize; color:#f8fafc; font-size:.82rem; }
.starter-picked button { position:absolute; top:9px; left:9px; margin:0; flex:0 0 28px; border:1px solid rgba(248,113,113,.65); border-radius:7px; width:28px; height:28px; color:#fecaca; background:rgba(127,29,29,.92); cursor:pointer; font-size:.95rem; line-height:1; box-shadow:0 2px 6px #0008; }
.starter-picked button:hover { background:#dc2626; border-color:#fca5a5; }
.starter-creation-status { flex:1; min-width:120px; margin:0; color:#fbbf24; text-align:center; font-size:.75rem; line-height:1.35; }
.starter-creation-status:empty { display:none; }
.community-captcha-row { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin:8px 0 0; padding:9px 12px; border:1px solid #334155; border-radius:10px; background:rgba(15,23,42,.88); }
.community-captcha-row[hidden] { display:none; }
.community-captcha-copy { display:flex; flex-direction:column; gap:3px; color:#cbd5e1; font-size:.72rem; }
.community-captcha-copy strong { color:#7dd3fc; font-size:.65rem; letter-spacing:.06em; }
.community-captcha-widget { min-height:0; }
.char-validation-badge.valid { color:#4ade80; }
.community-loading { padding:28px; color:#94a3b8; text-align:center; line-height:1.7; }
.lb-trainer-cell { display:flex; align-items:center; gap:9px; }
.lb-trainer-cell img { width:38px; height:38px; object-fit:contain; }
.lb-team-cell { font-size:.78rem; color:#cbd5e1; }
.chat-hidden { display:none !important; }


.locked-silhouette-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.locked-silhouette {
  filter: brightness(0) opacity(0.35) !important;
  user-select: none;
  pointer-events: none;
}

.lock-icon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
  animation: pulseLock 2.5s infinite ease-in-out;
}

@keyframes pulseLock {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* ========================================================
   NOVO: MODAL DE RANKING GLOBAL DOS TREINADORES
======================================================== */
.leaderboard-card {
  max-width: 720px;
  width: 95vw;
  background: linear-gradient(180deg, #0d1527 0%, #070d18 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.25), 0 20px 40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1.5px solid rgba(251, 191, 36, 0.3);
}

.leaderboard-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border: 1.5px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.leaderboard-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #fbbf24;
  letter-spacing: 1px;
}

.leaderboard-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.leaderboard-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-user-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
}

.lb-user-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
}

.lb-user-info {
  flex: 1;
}

.lb-user-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.54rem;
  color: #38bdf8;
}

.lb-user-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.lb-user-details {
  display: flex;
  gap: 10px;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

.lb-user-details strong {
  color: #f8fafc;
}

.lb-user-rank-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 8px;
}

.rank-title {
  font-size: 0.55rem;
  font-weight: 800;
  color: #64748b;
}

.rank-number {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 900;
  color: #38bdf8;
}

.leaderboard-table-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-table-header {
  display: grid;
  grid-template-columns: 70px 1fr 140px 110px;
  padding: 6px 12px;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 70px 1fr 140px 110px;
  align-items: center;
  padding: 8px 12px;
  background: #0c1220;
  border: 1px solid #1e293b;
  border-radius: 8px;
  font-size: 0.84rem;
  transition: all 0.15s ease;
}

.leaderboard-row:hover {
  background: #141e33;
  border-color: #38bdf8;
}

.leaderboard-row.gold {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.leaderboard-row.silver {
  border-color: #cbd5e1;
  background: rgba(203, 213, 225, 0.08);
}

.leaderboard-row.bronze {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.08);
}

.leaderboard-row.self {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.lb-rank-badge {
  font-family: var(--font-pixel-ui);
  font-weight: 900;
  font-size: 0.95rem;
}

.lb-trainer-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-trainer-col img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  object-fit: cover;
  image-rendering: pixelated;
}

.lb-trainer-name {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  color: #f8fafc;
}

.lb-floor-badge {
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  color: #34d399;
}

.lb-team-col {
  display: flex;
  gap: 4px;
}

.lb-team-col img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Ranking compacto com equipe exibida ao passar o mouse em VER TIME. */
.leaderboard-table-header,
.leaderboard-row {
  grid-template-columns: 52px minmax(0, 1fr) 112px 100px;
}

.leaderboard-table-header .col-floor,
.leaderboard-row > .lb-floor-badge {
  text-align: center;
}

.leaderboard-table-header .col-team,
.leaderboard-row > .lb-team-cell {
  text-align: center;
}

.leaderboard-row {
  min-height: 48px;
  padding: 4px 10px;
}

.lb-rank-badge {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(148, 163, 184, 0.32);
}

.lb-trainer-cell img {
  width: 30px;
  height: 30px;
  transform: translateX(4px);
}

.lb-team-cell {
  overflow: visible;
}

.lb-team-tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.lb-team-tooltip-trigger {
  padding: 5px 9px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 6px;
  font: 700 0.65rem var(--font-pixel-ui);
  white-space: nowrap;
  cursor: help;
}

.lb-team-tooltip-trigger:hover,
.lb-team-tooltip-trigger:focus-visible {
  color: #fff;
  background: rgba(14, 116, 144, 0.55);
  outline: none;
}

.lb-team-tooltip {
  position: fixed;
  inset: auto;
  z-index: 2147483647;
  margin: 0;
  display: flex;
  gap: 8px;
  min-width: max-content;
  padding: 8px 10px;
  color: #f8fafc;
  background: #080f1d;
  border: 1px solid rgba(56, 189, 248, 0.7);
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  pointer-events: none;
}

.lb-team-tooltip:popover-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lb-team-tooltip-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  text-transform: capitalize;
}

.lb-team-tooltip-member img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

@media (max-width: 620px) {
  .leaderboard-table-header,
  .leaderboard-row {
    grid-template-columns: 42px minmax(0, 1fr) 62px 78px;
  }

  .leaderboard-row { padding: 4px 6px; }
  .leaderboard-table-header { padding-inline: 6px; font-size: 0.55rem; }
  .lb-trainer-cell { gap: 5px; }
  .lb-trainer-cell img { width: 26px; height: 26px; }
}

/* ========================================================
   NOVO: CHAT GLOBAL (BOTÃO FLUTUANTE & PAINEL)
======================================================== */
.floating-chat-btn {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1.5px solid #38bdf8;
  border-radius: 9999px;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
  transform-origin: right center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-chat-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

.chat-online-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.chat-svg-bubble {
  width: 18px;
  height: 18px;
}

.global-chat-panel {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  order: 1;
  width: min(360px, var(--chat-usable-width, calc(100vw - 44px)));
  max-width: none;
  box-sizing: border-box;
  height: 460px;
  max-height: calc(100vh - 120px);
  background: rgba(11, 17, 32, 0.96);
  border: 1.5px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideChatIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.global-chat-panel.chat-closing {
  animation: slideChatOut 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

.global-chat-widget {
  --chat-edge: 22px;
  --chat-usable-width: calc(100vw - 44px);
  position: fixed;
  right: var(--chat-edge);
  bottom: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.global-chat-widget > * { pointer-events: auto; }
.floating-chat-btn.chat-hidden { display: inline-flex !important; }
.global-chat-widget.chat-open { bottom: 22px; }
.global-chat-widget.chat-open .global-chat-panel { margin-bottom: 52px; }
.global-chat-widget.chat-notifying { gap: 4px; }

.global-chat-toast {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(310px, var(--chat-usable-width, calc(100vw - 44px)));
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, .75);
  border-radius: 10px;
  color: #e2e8f0;
  background: rgba(11, 17, 32, .97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .48);
  text-align: left;
  cursor: pointer;
  animation: slideChatIn .18s ease-out;
}

.global-chat-toast[hidden] { display:none; }
.chat-toast-indicator { flex:0 0 8px; width:8px; height:8px; border-radius:50%; background:#38bdf8; box-shadow:0 0 10px #38bdf8; }
.chat-toast-copy { display:flex; flex-direction:column; min-width:0; gap:3px; }
.chat-toast-copy strong { color:#7dd3fc; font-family:var(--font-pixel-ui); font-size:.68rem; }
.chat-toast-copy span { overflow:hidden; color:#cbd5e1; font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }

@media (max-width: 480px) {
  .global-chat-widget { --chat-edge: 12px; --chat-usable-width: calc(100vw - 24px); }
  .global-chat-widget.chat-open { bottom: 12px; }
  .global-chat-panel { height: min(460px, calc(100vh - 96px)); }
}

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

@keyframes slideChatOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(.985); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.active,
  .modal-backdrop.modal-closing,
  .modal-backdrop > .modal-card,
  .trainer-profile-popover.profile-opening,
  .trainer-profile-popover.profile-closing { animation-duration: .01ms !important; }
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

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

.chat-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.chat-title-text {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

.chat-online-counter {
  font-size: 0.68rem;
  color: #64748b;
}

.btn-chat-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-chat-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.chat-messages-container {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-msg-row.self {
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.chat-msg-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 75%;
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
}

.chat-msg-row.self .chat-msg-header {
  justify-content: flex-end;
}

.chat-msg-sender {
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-pixel-ui);
}

.chat-msg-time {
  color: #64748b;
}

.chat-msg-bubble {
  padding: 7px 11px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.chat-msg-row.self .chat-msg-bubble {
  background: #0369a1;
  border-color: #38bdf8;
  color: #ffffff;
}

.chat-input-bar {
  display: flex;
  padding: 8px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  gap: 6px;
}

.chat-input-field {
  flex: 1;
  padding: 8px 12px;
  background: #070b14;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-clean);
  font-size: 0.8rem;
  outline: none;
}

.chat-input-field:focus {
  border-color: #38bdf8;
}

.btn-chat-send {
  background: #0284c7;
  border: 1px solid #38bdf8;
  color: #ffffff;
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chat-send:hover {
  background: #0369a1;
}

.send-svg {
  width: 16px;
  height: 16px;
}

/* ========================================================
   NOVO: TOAST DE DESBLOQUEIO DE POKÉMON NA BATALHA
======================================================== */
.pokemon-unlock-toast[hidden] { display: none; }
.pokemon-unlock-toast {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(300px, 100%);
  min-width: 0;
  max-width: 300px;
  box-sizing: border-box;
  padding: 5px 13px 5px 7px;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(18, 27, 50, .97), rgba(9, 15, 31, .97));
  box-shadow: 0 0 13px rgba(250, 204, 21, .22), inset 0 0 12px rgba(250, 204, 21, .06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.97);
  transition: opacity .58s cubic-bezier(.22,1,.36,1), transform .72s cubic-bezier(.22,1,.36,1), visibility .58s;
}
.pokemon-unlock-toast::before {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(250, 204, 21, .35);
  border-radius: inherit;
  animation: unlockSparkleRing 2.2s ease-in-out infinite;
}
.pokemon-unlock-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: unlockToastFloat 2.7s ease-in-out .55s infinite;
}
.pokemon-unlock-toast.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
  transition-duration: .62s;
}
.unlock-toast-sparkle {
  position: absolute;
  color: #fef08a;
  text-shadow: 0 0 8px #facc15;
  animation: unlockSparkle 1.8s ease-in-out infinite;
}
.sparkle-one { top: -8px; left: 20%; font-size: 12px; }
.sparkle-two { right: 17%; bottom: -7px; font-size: 10px; animation-delay: .7s; }
.unlock-toast-sprite {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(250, 204, 21, .4));
  animation: unlockSpriteFloat 2.1s ease-in-out infinite;
}
.unlock-toast-text { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.unlock-toast-badge {
  color: #facc15;
  font-family: var(--font-pixel-title);
  font-size: .48rem;
  letter-spacing: .35px;
  white-space: nowrap;
}
.unlock-toast-title {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-pixel-ui);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes unlockToastFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes unlockSpriteFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes unlockSparkle { 0%,100% { opacity: .35; transform: scale(.75) rotate(0); } 50% { opacity: 1; transform: scale(1.12) rotate(25deg); } }
@keyframes unlockSparkleRing { 0%,100% { opacity: .2; transform: scale(1); } 50% { opacity: .7; transform: scale(1.025); } }
@media (max-width: 760px) {
  .arena-top-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 8px; }
  .arena-match-info { grid-column: 1; grid-row: 1; }
  .arena-quick-controls { grid-column: 2; grid-row: 1; }
  .pokemon-unlock-toast { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: min(300px, 100%); }
  .battle-end-actions { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pokemon-unlock-toast, .pokemon-unlock-toast::before, .unlock-toast-sparkle, .unlock-toast-sprite { animation: none !important; transition-duration: .01ms !important; }
}

/* Cursores Battlemon; substituem o ponteiro genérico e o indicador azul de espera. */
html, body { cursor: url('images/ui/battlemon-cursor.svg') 4 3, auto; }
button:not(:disabled), a[href], [role="button"], input[type="button"]:not(:disabled), input[type="submit"]:not(:disabled), select:not(:disabled), label[for] {
  cursor: url('images/ui/battlemon-cursor.svg') 4 3, pointer;
}
