/* =====================================================
   POKEMON THEME — pokemon-theme.css (VERSÃO CORRIGIDA)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --pk-red:      #E3350D;
  --pk-yellow:   #FFCB05;
  --pk-blue:     #3B4CCA;
  --pk-dark:     #0d0d1a;
  --pk-darker:   #07070f;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

body {
  background-color: var(--pk-darker) !important;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(255,203,5,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 10%, rgba(255,203,5,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 30%, rgba(255,203,5,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 5%  80%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 90%, rgba(255,203,5,0.3) 0%, transparent 100%),
    radial-gradient(ellipse 90% 55% at 50% 0%,   rgba(59,76,202,0.28) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 0%   60%,  rgba(227,53,13,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 100% 80%,  rgba(255,203,5,0.1)  0%, transparent 65%),
    linear-gradient(180deg, #07070f 0%, #0d0d1a 40%, #111124 100%) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 50%;
  right: -350px;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(227,53,13,0.06) 50%, rgba(255,255,255,0.02) 50%);
  border: 2px solid rgba(255,203,5,0.07);
  pointer-events: none;
  z-index: 0;
  animation: pkBgRotate 60s linear infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 50%;
  right: -350px;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255,203,5,0.04);
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 -350px 0 0 rgba(255,255,255,0.015);
  animation: pkBgRotate 60s linear infinite;
}

@keyframes pkBgRotate {
  to { transform: rotate(360deg) translateY(-50%); }
}

.pk-bg-ball-2 {
  position: fixed;
  left: 0;
  bottom: 0;
  transform: translate(-45%, 45%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 2px solid rgba(59,76,202,0.08);
  pointer-events: none;
  z-index: 0;
  animation: pkBgRotate 80s linear infinite reverse;
  will-change: transform;
}

.pk-bg-ball-2::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(59,76,202,0.07) 50%, rgba(255,255,255,0.02) 50%);
}

/* ══════════════════════════════════════════
   POKÉMONS FLUTUANTES NAS LATERAIS
══════════════════════════════════════════ */

.pk-floaters {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.pk-floater {
  position: absolute;
  pointer-events: all;
  cursor: pointer;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  animation: pkFloat var(--float-dur, 4s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  user-select: none;
  transition: filter 0.3s ease;
}

.pk-floater img {
  width: var(--pk-size, 90px);
  height: auto;
  display: block;
  filter: saturate(0.85) brightness(0.92);
  transition: filter 0.4s ease, transform 0.6s cubic-bezier(0.34, 0.1, 0.68, 0.55);
}

/* ── Hover: Pokémon acorda e ataca! ── */
.pk-floater:hover {
  animation: pkAttackPro 0.7s cubic-bezier(0.34, 0.1, 0.68, 0.55) forwards, pkFloat var(--float-dur, 4s) ease-in-out infinite 0.7s;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.8));
}

.pk-floater:hover img {
  filter: saturate(1.4) brightness(1.15) drop-shadow(0 0 20px var(--pk-glow, rgba(255,203,5,0.8)));
  animation: pkAttackImgPro 0.7s cubic-bezier(0.34, 0.1, 0.68, 0.55) forwards;
}

/* ── Animação do container (movimento lateral + flutuação) ── */
@keyframes pkAttackPro {
  0% { transform: translateX(0) translateY(0); }
  20% { transform: translateX(calc(var(--attack-x) * 0.3)) translateY(-10px); }
  40% { transform: translateX(var(--attack-x, -18px)) translateY(-20px); }
  60% { transform: translateX(calc(var(--attack-x) * 0.5)) translateY(-5px); }
  80% { transform: translateX(var(--attack-x2, 10px)) translateY(5px); }
  100% { transform: translateX(0) translateY(0); }
}

/* ── Animação da imagem (escala + rotação) ── */
@keyframes pkAttackImgPro {
  0% { transform: scale(1) rotate(0deg); }
  15% { transform: scale(1.15) rotate(var(--hover-rot, -5deg)) translateY(-8px); }
  35% { transform: scale(1.3) rotate(calc(var(--hover-rot, -5deg) * 1.8)) translateY(-18px); }
  55% { transform: scale(1.25) rotate(var(--hover-rot, -5deg)) translateY(-12px); }
  75% { transform: scale(1.2) rotate(calc(var(--hover-rot, -5deg) * 0.9)) translateY(-5px); }
  100% { transform: scale(1.2) rotate(var(--hover-rot, -5deg)) translateY(0px); }
}

/* ── Flutuação base ── */
@keyframes pkFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(var(--float-y, -14px)) rotate(1deg); }
  66% { transform: translateY(calc(var(--float-y, -14px) * 0.4)) rotate(-1deg); }
}

/* ── Aura de brilho pulsante ── */
.pk-floater:hover::before {
  content: '';
  position: absolute;
  inset: -25px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pk-glow, rgba(255,203,5,0.5)) 0%, transparent 80%);
  animation: pkAuraGlow 0.6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes pkAuraGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.35); opacity: 0.9; }
}

/* ── Tooltip com nome do Pokémon ── */
.pk-floater::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.8);
  background: rgba(10,10,25,0.92);
  color: var(--pk-yellow);
  font-family: 'Press Start 2P', cursive;
  font-size: 7px;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,203,5,0.35);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  z-index: 10;
}

.pk-floater:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ── Partículas de energia no hover ── */
.pk-floater .pk-sparks {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.pk-floater:hover .pk-sparks {
  opacity: 1;
}

.pk-sparks span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pk-yellow);
  animation: pkSpark 0.6s ease-out forwards;
}

@keyframes pkSpark {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx,20px), var(--sy,-30px)) scale(0); }
}

/* ── Animação de "captura" ao clicar ── */
.pk-floater.pk-caught {
  animation: pkCaught 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes pkCaught {
  0% { transform: scale(1) rotate(0); filter: brightness(1); }
  20% { transform: scale(1.3) rotate(10deg); filter: brightness(2); }
  50% { transform: scale(0.1) rotate(720deg); filter: brightness(3); }
  70% { transform: scale(0) rotate(720deg); opacity: 0; }
  100% { transform: scale(0); opacity: 0; }
}

/* ══════════════════════════════════════════
   RESPONSIVIDADE
══════════════════════════════════════════ */

@media(max-width: 991px) {
  .pk-floaters .pk-floater {
    display: none;
  }
  body::before, body::after {
    display: none;
  }
}