﻿@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800;900&display=swap");

:root {
  --p-x: 70px;
  --p-y: 0px;
  --p-z: 250px;
  --e-x: -70px;
  --e-y: -160px;
  --e-z: -450px;

  /* Escala mobile - aumenta 15% em telas pequenas */
  --mobile-scale: 1;
}

/* Mobile Scale - Aumenta tamanho base em 16% */
@media (max-width: 768px) {
  :root {
    font-size: 116%; /* Aumenta tamanho base em 16% */
  }

  /* Ajusta padding das views para compensar header */
  #app > main:not(#view-battle):not(#view-login) {
    padding-top: 0.5rem;
  }
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #020617;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Mobile fixes - Apenas CSS, sem JavaScript */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;

  /* Previne pull-to-refresh via CSS */
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

#app {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scroll-container {
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar {
  display: none;
}
/* CUSTOM SCROLLBAR (Premium Look) */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #475569 rgba(2, 6, 23, 0.5);
}
.custom-scrollbar::-webkit-scrollbar {
  width: 10px; /* Wider */
  height: 10px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.5);
  border-radius: 6px;
  margin: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #475569, #334155);
  border-radius: 6px;
  border: 2px solid rgba(2, 6, 23, 0.5); /* Inner spacing effect */
  transition: background 0.2s;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #64748b, #475569);
}

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

/* === PERFORMANCE: content-visibility para elementos fora da tela === */
/* Permite que o browser pule renderização de conteúdo não visível */
.content-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px; /* Tamanho estimado para scroll */
}

/* Aplicar a listas longas */
#roster-grid > div,
#story-list > div,
#inventory-list > div,
.evo-modal-grid > div {
  content-visibility: auto;
  contain-intrinsic-size: auto 100px;
}

/* Otimização para views principais quando não visíveis */
#app > main {
  contain: layout style paint;
}

/* --- PREMIUM UI ELEMENTS --- */
.glass-panel {
  background: rgba(
    15,
    23,
    42,
    0.75
  ); /* Slightly more opaque to compensate for less blur */
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5),
    0 2px 4px -1px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow; /* Hardware acceleration hint */
}
.glass-panel:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
    0 10px 10px -5px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.premium-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform; /* Mobile optimization */
}
.premium-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}
.premium-btn:active {
  transform: scale(0.96);
}

/* Enhanced Slot Design */
.sw-slot {
  position: relative;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.1s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Layout Structure Enforced */
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Removed 'contain: content' as it may cause layout calc issues on some engines */
  /* contain: content; */
  will-change: transform;
  z-index: 1; /* Ensure base z-index */
}
.sw-slot:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  z-index: 50; /* Much higher z-index on hover */
}
.sw-slot:active {
  transform: scale(0.95);
}
.sw-slot.selected {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15),
    0 0 15px rgba(251, 191, 36, 0.4);
}

.eq-slot {
  width: 50px;
  height: 50px;
  background: #1e293b;
  border: 1px dashed #475569;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
}
.eq-slot.filled {
  border-style: solid;
  background: #0f172a;
}

.rarity-common {
  border-color: #94a3b8 !important;
  box-shadow: inset 0 0 15px rgba(148, 163, 184, 0.1);
}
.rarity-rare {
  border-color: #3b82f6 !important;
  background: radial-gradient(
    circle at center,
    rgba(59, 130, 246, 0.15),
    transparent 80%
  ) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2),
    inset 0 0 15px rgba(59, 130, 246, 0.1);
}
.rarity-epic {
  border-color: #a855f7 !important;
  background: radial-gradient(
    circle at center,
    rgba(168, 85, 247, 0.15),
    transparent 80%
  ) !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.25),
    inset 0 0 15px rgba(168, 85, 247, 0.1);
  animation: pulse-border-epic 2s infinite alternate;
}
.rarity-legendary {
  border-color: #fbbf24 !important;
  background: radial-gradient(
    circle at center,
    rgba(251, 191, 36, 0.2),
    transparent 70%
  ) !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3),
    inset 0 0 20px rgba(251, 191, 36, 0.1);
  animation: pulse-border-leg 1.5s infinite alternate;
}

@keyframes pulse-border-epic {
  from {
    box-shadow: 0 0 5px rgba(168, 85, 247, 0.2);
  }
  to {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
  }
}
@keyframes pulse-border-leg {
  from {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  }
  to {
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
  }
}

.star-row {
  display: flex;
  gap: 0px;
  justify-content: center;
  position: absolute;
  bottom: 4px;
  width: 100%;
  z-index: 20;
  filter: drop-shadow(0 1px 2px black);
}
.star-icon {
  font-size: 10px;
  color: #fbbf24;
  letter-spacing: -2px;
}

.elem-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.bg-fire {
  background: #ef4444;
}
.bg-water {
  background: #3b82f6;
}
.bg-lightning {
  background: #eab308;
}
.bg-earth {
  background: #a8a29e;
}
.bg-nature {
  background: #22c55e;
}
.bg-void {
  background: #a855f7;
}

/* Elemental Gradients for Character Icons */
.bg-fire-gradient {
  background: radial-gradient(
    circle at center,
    rgba(239, 68, 68, 0.3) 0%,
    transparent 80%
  );
}
.bg-water-gradient {
  background: radial-gradient(
    circle at center,
    rgba(59, 130, 246, 0.3) 0%,
    transparent 80%
  );
}
.bg-lightning-gradient {
  background: radial-gradient(
    circle at center,
    rgba(234, 179, 8, 0.3) 0%,
    transparent 80%
  );
}
.bg-earth-gradient {
  background: radial-gradient(
    circle at center,
    rgba(168, 162, 158, 0.3) 0%,
    transparent 80%
  );
}
.bg-nature-gradient {
  background: radial-gradient(
    circle at center,
    rgba(34, 197, 94, 0.3) 0%,
    transparent 80%
  );
}
.bg-void-gradient {
  background: radial-gradient(
    circle at center,
    rgba(168, 85, 247, 0.3) 0%,
    transparent 80%
  );
}

.element-glow {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.level-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 8px;
  font-weight: 900;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 25;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.name-label {
  position: absolute;
  bottom: 12px;
  width: 100%;
  text-align: center;
  font-size: 7px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 25;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.leader-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fbbf24;
  color: #78350f;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 950;
  z-index: 30;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid white;
}

/* --- 3D SCENE --- */
.battle-scene {
  perspective: 1200px;
  perspective-origin: 50% 35%;
  overflow: hidden;
  background: linear-gradient(
      to bottom,
      rgba(2, 6, 23, 0.5),
      rgba(2, 6, 23, 0.95)
    ),
    url("../images/area.avif") no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* BATTLE BACKGROUNDS BY MODE */
/* Aventura/Story - Mantém o fundo padrão */
.battle-scene.mode-story {
  background: linear-gradient(
      to bottom,
      rgba(2, 6, 23, 0.5),
      rgba(2, 6, 23, 0.95)
    ),
    url("../images/area.avif") no-repeat center center;
  background-size: cover;
}

/* Masmorra do Gigante (Golem) - Tema de caverna rochosa */
.battle-scene.mode-golem {
  background: linear-gradient(
      to bottom,
      rgba(41, 37, 36, 0.6),
      rgba(28, 25, 23, 0.95)
    ),
    url("../images/area2.jpg") no-repeat center center;
  background-size: cover;
}

/* Masmorra do Dragão - Tema de vulcão/lava */
.battle-scene.mode-dragon {
  background: linear-gradient(
      to bottom,
      rgba(127, 29, 29, 0.5),
      rgba(69, 10, 10, 0.95)
    ),
    url("../images/area3.jpg") no-repeat center center;
  background-size: cover;
}

/* XP Rift - Tema místico/dimensional */
.battle-scene.mode-xp {
  background: linear-gradient(
      to bottom,
      rgba(49, 46, 129, 0.5),
      rgba(30, 27, 75, 0.95)
    ),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&q=80&w=1000")
      no-repeat center center;
  background-size: cover;
}

/* Torre - Tema celestial/dourado */
/* IMPORTANTE: Para adicionar imagem personalizada, coloque em 'src/assets/backgrounds/torre.jpg' */
/* Exemplo: url("src/assets/backgrounds/torre.jpg") no-repeat center center; */
.battle-scene.mode-tower {
  background: linear-gradient(
      135deg,
      rgba(133, 77, 14, 0.7) 0%,
      rgba(69, 26, 3, 0.85) 50%,
      rgba(20, 10, 5, 0.95) 100%
    ),
    linear-gradient(to bottom, rgba(251, 191, 36, 0.1), transparent 60%);
  background-size: cover;
}

.arena-container {
  position: relative;
  width: 100%;
  flex: 1;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
}

#effect-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  overflow: visible;
  transform-style: preserve-3d;
  z-index: 100;
}

.ground-plane {
  position: absolute;
  width: 300%;
  height: 300%;
  background-image: radial-gradient(
      circle at center,
      rgba(99, 102, 241, 0.15) 0%,
      transparent 50%
    ),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 80px 80px, 80px 80px;
  transform: rotateX(75deg) translateY(25%);
  bottom: -40%;
  z-index: 1;
}

.sprite-renderer {
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  will-change: transform; /* Mobile 3D optimization */
}
#player-sprite-container {
  transform: rotateY(30deg) rotateX(5deg) scale(1.3);
}
#enemy-sprite-container {
  transform: rotateY(-30deg) rotateX(5deg) scale(0.85);
}

.pos-enemy.boss #enemy-sprite-container {
  transform: rotateY(-30deg) rotateX(5deg) scale(1.4);
}

.sprite-renderer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.6));
  animation: breathing 3s ease-in-out infinite;
  will-change: transform, filter; /* Optimize breathing animation */
}

@keyframes breathing {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.03) translateY(-4px);
  }
}

/* VFX Classes */
.anim-shake-impact {
  animation: shake-sm 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.anim-shake-crit {
  animation: shake-lg 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.anim-spin-atk {
  animation: spin-attack 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes spin-attack {
  0% {
    transform: rotateY(30deg) rotateZ(0deg);
  }
  50% {
    transform: rotateY(210deg) rotateZ(15deg) scale(1.2);
  }
  100% {
    transform: rotateY(390deg) rotateZ(0deg);
  }
}

.anim-hit-recoil {
  animation: hit-recoil 0.4s ease-out;
}
@keyframes hit-recoil {
  0% {
    filter: brightness(1);
    transform: translateX(0);
  }
  20% {
    filter: brightness(5) sepia(1) hue-rotate(-50deg) saturate(5);
    transform: translateX(-10px) rotateZ(-5deg);
  }
  100% {
    filter: brightness(1);
    transform: translateX(0);
  }
}

.anim-hit-spin {
  animation: hit-spin 0.6s ease-out;
}
@keyframes hit-spin {
  0% {
    filter: brightness(1);
    transform: rotateY(0deg) translateX(0);
  }
  15% {
    filter: brightness(5) sepia(1) hue-rotate(-50deg) saturate(5);
    transform: rotateY(180deg) translateX(-15px) scale(0.9);
  }
  40% {
    transform: rotateY(360deg) translateX(-5px) scale(1);
  }
  60% {
    transform: rotateY(380deg) translateX(0);
  }
  100% {
    filter: brightness(1);
    transform: rotateY(360deg) translateX(0);
  }
}

.anim-cast {
  animation: cast-pulse 0.6s ease-in-out;
}
@keyframes cast-pulse {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.5) drop-shadow(0 0 30px currentColor);
    transform: scale(1.1);
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

.projectile {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 100;
  pointer-events: none;
}

.vfx-fireball {
  background: radial-gradient(circle, #fff, #fbbf24, #ef4444);
  border-radius: 50%;
  width: 50px;
  height: 50px;
}
.vfx-waterball {
  background: radial-gradient(circle, #fff, #60a5fa, #2563eb);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  opacity: 0.9;
}
.vfx-rock {
  background: #57534e;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  width: 45px;
  height: 45px;
  border: 2px solid #292524;
}
.vfx-leaf {
  background: #4ade80;
  border-radius: 0 50% 0 50%;
  width: 30px;
  height: 30px;
  border: 1px solid #166534;
}
.vfx-void {
  background: #000;
  border: 2px solid #a855f7;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.vfx-lightning-strike {
  position: absolute;
  top: -300px;
  width: 12px;
  height: 600px;
  background: white;
  box-shadow: 0 0 20px #facc15, 0 0 50px #facc15;
  transform: translateX(-50%) skewX(-5deg);
  animation: flash 0.15s ease-out forwards;
  z-index: 101;
  pointer-events: none;
}

.vfx-blackhole {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, #000, #4c1d95, transparent);
  box-shadow: 0 0 50px #4c1d95;
  z-index: 99;
  pointer-events: none;
}

.entity-wrapper {
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}
.pos-enemy {
  transform: translateX(var(--e-x)) translateY(var(--e-y))
    translateZ(var(--e-z));
}
.pos-player {
  transform: translateX(var(--p-x)) translateY(var(--p-y))
    translateZ(var(--p-z));
}

.anim-melee-player {
  transform: translateX(-15px) translateY(-50px) translateZ(-350px) scale(1.1);
}
.anim-melee-enemy {
  transform: translateX(15px) translateY(50px) translateZ(150px) scale(1.1);
}

.character-shadow {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 120px;
  height: 30px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  transform: translateX(-50%) rotateX(80deg);
  filter: blur(12px);
  z-index: -1;
}

.hud-bar {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
.hud-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.hud-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes toast-fade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* CARD ANIMATIONS */
.perspective-1000 {
  perspective: 1000px;
}
@keyframes card-flip {
  0% {
    transform: rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

/* LEVITATE ANIMATION FOR DUNGEON HERO */
@keyframes levitate {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes float-dmg {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.5);
  }
}
.dmg-text {
  position: fixed;
  color: #f87171;
  font-weight: 900;
  font-size: 3rem;
  text-shadow: 2px 2px 0px #000, 0 0 10px #7f1d1d;
  animation: float-dmg 0.8s ease-out forwards;
  z-index: 1000;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}
.dmg-crit {
  color: #facc15 !important;
  font-size: 4rem !important;
  text-shadow: 0 0 15px #ca8a04 !important;
}

.flash-screen {
  position: absolute;
  inset: 0;
  background: white;
  z-index: 200;
  pointer-events: none;
  animation: flash 0.15s ease-out forwards;
}

.shine-bg {
  animation: shine-gold 2s infinite;
  border: 2px solid #fbbf24;
}

/* --- TOAST SYSTEM --- */
#toast-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: 90%;
  max-width: 300px;
}
.toast {
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-slide 0.3s ease-out forwards;
}
.toast.error {
  border-color: #ef4444;
}
.toast.success {
  border-color: #22c55e;
}
.toast.info {
  border-color: #3b82f6;
}
.toast-icon {
  font-size: 1.2rem;
}

/* Hide scrollbar on login icons */
#login-icons-container::-webkit-scrollbar {
  display: none;
}
#login-icons-container {
  scrollbar-width: none;
}

/* Elemental Auras */
.aura-fire {
  box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.6),
    0 0 40px 10px rgba(239, 68, 68, 0.3);
  animation: pulse-aura 2s ease-in-out infinite;
}
.aura-water {
  box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.6),
    0 0 40px 10px rgba(59, 130, 246, 0.3);
  animation: pulse-aura 2s ease-in-out infinite;
}
.aura-earth {
  box-shadow: 0 0 20px 5px rgba(34, 197, 94, 0.6),
    0 0 40px 10px rgba(34, 197, 94, 0.3);
  animation: pulse-aura 2s ease-in-out infinite;
}
.aura-lightning {
  box-shadow: 0 0 20px 5px rgba(250, 204, 21, 0.6),
    0 0 40px 10px rgba(250, 204, 21, 0.3);
  animation: pulse-aura 1.5s ease-in-out infinite;
}
.aura-void {
  box-shadow: 0 0 20px 5px rgba(168, 85, 247, 0.6),
    0 0 40px 10px rgba(168, 85, 247, 0.3);
  animation: pulse-aura 2s ease-in-out infinite;
}
@keyframes pulse-aura {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}

/* --- CAMPAIGN UI --- */
.map-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.map-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
}

.map-banner {
  position: relative;
  height: 120px;
  width: 100%;
  overflow: hidden;
}
.map-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.map-card:hover .map-bg-img {
  transform: scale(1.05);
}
.map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
}
.map-content {
  position: absolute;
  bottom: 12px;
  left: 20px;
  z-index: 10;
}
.map-chapter {
  color: #818cf8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2px;
}
.map-title {
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stage-node {
  position: relative;
  aspect-ratio: 1/1;
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.stage-node:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.stage-node.completed {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}
.stage-node.current {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  animation: pulse-current 2s infinite;
}
.stage-node.boss {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
}
.stage-node.locked {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.node-icon {
  font-size: 1rem;
  margin-bottom: 2px;
}
.stage-node.boss .node-icon {
  font-size: 1.5rem;
  animation: float 2s ease-in-out infinite;
}

.node-label {
  font-size: 8px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.current-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  background: #6366f1;
  border-radius: 50%;
  border: 2px solid #0f172a;
}

@keyframes pulse-current {
  0%,
  100% {
    border-color: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  }
  50% {
    border-color: #818cf8;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
  }
}

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

/* --- UTILITIES & ANIMATIONS (Added for Rune UI) --- */

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* ========================================
   PRELOADER SYSTEM - Premium Loading Screen
   ======================================== */

/* Container do Preloader */
#preloader-container {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader-container.preloader-fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Logo Animado */
.preloader-logo {
  font-size: 4rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: preloader-pulse 2s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.preloader-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #6366f1;
  margin-bottom: 2rem;
}

@keyframes preloader-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.8));
  }
}

/* Barra de Progresso */
.preloader-progress-wrapper {
  width: 280px;
  max-width: 90%;
  margin-bottom: 1rem;
}

.preloader-progress-container {
  width: 100%;
  height: 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

#preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #a78bfa);
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.3s ease-out;
  animation: preloader-shimmer 2s linear infinite;
  position: relative;
}

#preloader-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 6px 6px 0 0;
}

@keyframes preloader-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Porcentagem */
#preloader-percent {
  font-size: 0.875rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.5rem;
  font-family: monospace;
}

/* Status */
#preloader-status {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.5em;
}

.preloader-success {
  color: #22c55e;
}

.preloader-warning {
  color: #f59e0b;
}

.preloader-error {
  color: #ef4444;
}

/* Log de Progresso */
#preloader-log {
  width: 280px;
  max-width: 90%;
  max-height: 100px;
  overflow-y: auto;
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-size: 0.65rem;
  font-family: monospace;
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preloader-log-item {
  padding: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preloader-log-item.success {
  color: #4ade80;
}

.preloader-log-item.error {
  color: #f87171;
}

/* Erros */
#preloader-errors {
  width: 280px;
  max-width: 90%;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
}

.preloader-error-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 0.5rem;
}

.preloader-error-list {
  font-size: 0.65rem;
  color: #f87171;
  font-family: monospace;
  max-height: 80px;
  overflow-y: auto;
}

.preloader-error-item {
  padding: 2px 0;
}

/* Botões */
.preloader-continue-btn,
.preloader-retry-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.preloader-continue-btn {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
}

.preloader-continue-btn:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.preloader-retry-btn {
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.preloader-retry-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

/* Spinner de carregamento inicial */
.preloader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: preloader-spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar do log */
#preloader-log::-webkit-scrollbar {
  width: 4px;
}

#preloader-log::-webkit-scrollbar-track {
  background: transparent;
}

#preloader-log::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 2px;
}

/* ============================================
   RESPONSIVIDADE DESKTOP - MODO PAISAGEM
   Aplica apenas em telas >= 1024px de largura
   Mantém layout mobile intacto
   ============================================ */

@media (min-width: 1024px) {
  /* Container principal centralizado com largura fixa */
  body {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  }
  
  #app {
    max-width: 420px;
    max-height: 90vh;
    height: 90vh;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
      0 0 60px rgba(99, 102, 241, 0.15),
      0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
  }
  
  /* Moldura decorativa simulando celular */
  #app::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    z-index: 1000;
  }
  
  /* Header ajustado para desktop */
  #ui-header {
    padding-top: 16px;
  }
  
  /* Melhor visualização das batalhas */
  .battle-scene {
    border-radius: 0;
  }
  
  /* Ajuste do HUB home */
  #view-home {
    border-radius: 0 0 24px 24px;
  }
}

/* Desktop grande - layout lado a lado com painel de info */
@media (min-width: 1280px) {
  #app {
    max-width: 450px;
    max-height: 85vh;
    height: 85vh;
  }
  
  /* Aumenta um pouco os textos para melhor leitura */
  :root {
    font-size: 105%;
  }
}

/* Desktop muito grande (monitores ultrawide) */
@media (min-width: 1600px) {
  #app {
    max-width: 480px;
    max-height: 88vh;
  }
}

/* Especificamente para landscape em dispositivos grandes */
@media (min-width: 1024px) and (orientation: landscape) {
  /* Ajusta altura máxima para landscape */
  #app {
    max-height: 92vh;
  }
  
  /* Sprites de batalha maiores em landscape desktop */
  .sprite-renderer {
    width: 280px;
    height: 280px;
  }
  
  /* Personagem do hub maior */
  #home-leader-visual {
    transform: scale(1.6);
  }
  
  /* Cards de monstros maiores */
  .monster-card {
    min-width: 100px;
  }
}

/* Hover effects apenas para desktop (não touch) */
@media (hover: hover) and (pointer: fine) {
  /* Botões com hover mais suave */
  button:hover {
    filter: brightness(1.1);
    transition: all 0.2s ease;
  }
  
  /* Cards com hover elevado */
  .monster-card:hover,
  .stage-node:hover:not(.locked) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
  
  /* Dock buttons com hover */
  #view-home .group:hover > div:first-child {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  }
}

/* ========================================
   MONSTRODEX - Cards Premium
   ======================================== */

/* Container da Monstrodex */
#view-monstrodex {
  background: linear-gradient(180deg, 
    rgba(15, 23, 42, 1) 0%, 
    rgba(30, 41, 59, 0.95) 30%,
    rgba(15, 23, 42, 1) 100%
  );
  position: relative;
}

#view-monstrodex::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at center top, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Header da Monstrodex */
.monstrodex-header {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  overflow: hidden;
}

.monstrodex-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.5), transparent);
}

/* Título animado */
.monstrodex-title {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: monstrodex-title-shine 3s ease-in-out infinite;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

@keyframes monstrodex-title-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Barra de progresso premium */
.monstrodex-progress-container {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.monstrodex-progress-bar {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
}

.monstrodex-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progress-shimmer 2s ease-in-out infinite;
}

@keyframes progress-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Cards da Monstrodex */

/* Wrapper para aspect-ratio */
.monstrodex-card-wrapper {
  position: relative;
  width: 100%;
  padding-top: 130%;
}

.monstrodex-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  cursor: pointer;
}

/* Hover apenas em desktop */
@media (hover: hover) {
  .monstrodex-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(251, 191, 36, 0.5);
  }
}

/* Glow baseado em estrelas */
.monstrodex-card-5star {
  border: 2px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3), inset 0 0 10px rgba(251, 191, 36, 0.1);
}

.monstrodex-card-5star:hover {
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.4), 0 0 20px rgba(251, 191, 36, 0.3);
}

.monstrodex-card-4star {
  border: 2px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25), inset 0 0 8px rgba(168, 85, 247, 0.08);
}

.monstrodex-card-4star:hover {
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.35), 0 0 15px rgba(168, 85, 247, 0.25);
}

.monstrodex-card-3star {
  border: 2px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.monstrodex-card-3star:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.monstrodex-card-2star, .monstrodex-card-1star {
  border: 1px solid rgba(100, 116, 139, 0.4);
}

.monstrodex-card-2star:hover, .monstrodex-card-1star:hover {
  border-color: rgba(100, 116, 139, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Efeito Shimmer para 5 estrelas */
.monstrodex-shimmer {
  position: relative;
  overflow: hidden;
}

.monstrodex-shimmer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(251, 191, 36, 0.15) 45%,
    rgba(251, 191, 36, 0.25) 50%,
    rgba(251, 191, 36, 0.15) 55%,
    transparent 70%
  );
  animation: shimmer-rotate 4s linear infinite;
  pointer-events: none;
  z-index: 5;
}

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

/* Card não obtido */
.monstrodex-card-locked {
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.monstrodex-card-locked:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

.monstrodex-card-locked .monstrodex-card-image {
  filter: grayscale(1) brightness(0.3);
}

/* Overlay do card bloqueado */
.monstrodex-locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
}

.monstrodex-locked-overlay span {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  opacity: 0.7;
}

/* Área da imagem do card */
.monstrodex-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 32px; /* Espaço para o footer */
  overflow: hidden;
}

.monstrodex-card-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  z-index: 2;
}

.monstrodex-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.monstrodex-card:hover .monstrodex-card-image img {
  transform: scale(1.08);
}

.monstrodex-card-emoji {
  font-size: 3rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.monstrodex-card:hover .monstrodex-card-emoji {
  transform: scale(1.1);
}

/* Footer do card */
.monstrodex-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.monstrodex-card-stars {
  font-size: 10px;
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: -1px;
}

.monstrodex-card-name {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

/* Cores das estrelas */
.stars-5 { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }
.stars-4 { color: #a855f7; text-shadow: 0 0 6px rgba(168, 85, 247, 0.4); }
.stars-3 { color: #3b82f6; text-shadow: 0 0 4px rgba(59, 130, 246, 0.3); }
.stars-2 { color: #22c55e; }
.stars-1 { color: #94a3b8; }

/* Badge de elemento */
.monstrodex-element-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 20;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Filtros da Monstrodex */
.monstrodex-filter {
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.monstrodex-filter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.monstrodex-filter:hover::before {
  opacity: 1;
}

.monstrodex-filter.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.monstrodex-filter:active {
  transform: scale(0.95);
}

/* Grid responsivo da Monstrodex */
#monstrodex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  align-content: start;
}

@media (min-width: 420px) {
  #monstrodex-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
  }
}

/* Delay de animação para cards */
.monstrodex-card:nth-child(1) { animation-delay: 0.02s; }
.monstrodex-card:nth-child(2) { animation-delay: 0.04s; }
.monstrodex-card:nth-child(3) { animation-delay: 0.06s; }
.monstrodex-card:nth-child(4) { animation-delay: 0.08s; }
.monstrodex-card:nth-child(5) { animation-delay: 0.1s; }
.monstrodex-card:nth-child(6) { animation-delay: 0.12s; }
.monstrodex-card:nth-child(7) { animation-delay: 0.14s; }
.monstrodex-card:nth-child(8) { animation-delay: 0.16s; }
.monstrodex-card:nth-child(9) { animation-delay: 0.18s; }
.monstrodex-card:nth-child(10) { animation-delay: 0.2s; }
.monstrodex-card:nth-child(11) { animation-delay: 0.22s; }
.monstrodex-card:nth-child(12) { animation-delay: 0.24s; }
